Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to count lines of code (LOC) using IntelliJ IDEA?

Tags:

title says everything plus: - development language Lua - code revision control system - Perforce (integrated with IntelliJ IDE)

like image 360
Aleksey Dr. Avatar asked Feb 03 '12 10:02

Aleksey Dr.


People also ask

How do you count lines of code in a project?

If you want to get the lines of code of a single file, you can use cloc <filename>. We're using the command to get the lines of codes of a simple Vue file. It also recognized that it is a VueJS component. We can check all of the lines of code in a file or directory by the command cloc --by-file.

How do I search for lines in IntelliJ?

From the main menu, select Edit | Find | Find in Files Ctrl+Shift+F . In the search field, type your search string. Alternatively, in the editor, highlight the string you want to find and press Ctrl+Shift+F . IntelliJ IDEA places the highlighted string into the search field.


1 Answers

You can either turn on the display of lines of code for a single file by right clicking in the left gutter and highlighting "display lines of code". Or you can do it for your entire project by downloading the Statistic plug-in. It's very nice indeed, because it shows LOC and other metrics for your entire project.

like image 99
duffymo Avatar answered Oct 06 '22 08:10

duffymo