java program to count SLOC, blank lines and comments in .java file of a given directory
There are two file inside src/main/com/SLOC
folder:
-
MainClass.java: main class used to run the program
-
LOC.java: contains the methods to satisfy below requirements.
Requirements*
- The total number of Java files.
- The total number of unique Java files. (content of files should be identical)
- The total number of blank lines. (in all unique java files)
- The total number of comment lines. (in all unique java files)
- The total number of code lines. (only code line excluding comments and blanks)
target folder contains the executable JAR with dependencies named assignment-1.0.jar.
To run jar and get the results type following command:
java -jar target/assignment-1.0.jar <file/directory-name>
prints the count of,
[allJavaFiles]-[uniqueJavafiles]-[blankLines]-[commentLines]-[codeLines]