There are several ways we can count lines of code in IntelliJ IDEA. One of the most common methods is to use the Statistic plugin.
In this article, I will show you how to count lines of code using the Statistic plugin.
First, we need to install it from Intellij IDEA:

  1. Open IntelliJ IDEA editor;
  2. Select File > Settings, Open Settings Popup Window;
  3. Select Plugins, then type “Statistic” to search plugins;
  4. Click on the Statistic install button;
  5. Click on the Apply button and close the Settings Popup Window;
  6. You will see the Statistic toolbar via tabs in bottom left of project.

image.png

image.png

image.png

Once the installation is complete, you can see the Refresh option. Click on this option and it will reload and refresh all the files in the project and calculate the statistics. As shown below, you can see the number of lines of code for each language in the current project and the total number of lines is on the last line.

image.png

For more information of Statistic plugin, please refer to the following site (https://plugins.jetbrains.com/plugin/4509-statistic)

(END)