BullyWiiPlaza

Modder
Messages
214
Reaction score
174
Points
818
I thought that it would be useful to count the total lines of code in a GSC project. For this I found CLOC which you can download
You do not have permission to view link Log in or register now.
.

Since this is a command line tool, you'll have to use CMD and type the following command:
Code:
cloc-1.64.exe --force-lang="C",gsc "D:\Bossam v6"
The first parameter specifies the language and the 2nd parameter the project folder which you need to edit every time you want to analyze a different project.

Note:
All GSC source files must have the .gsc extension, not .txt or anything else.

If you enter the command correctly and press Enter, the output will look similar to this:
Code:
http://cloc.sourceforge.net v 1.64  T=0.13 s (7.5 files/s, 100438.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                1           1016             71          12282
-------------------------------------------------------------------------------
So Bossam's menu for instance has 12.282 lines of code.

Let's do another one:
Code:
>cloc-1.64.exe --force-lang="C",gsc "D:\Jiggy v4.2"
       1 text file.
       1 unique file.
       1 file ignored.

http://cloc.sourceforge.net v 1.64  T=0.17 s (6.1 files/s, 100226.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                1            771            932          14841
-------------------------------------------------------------------------------
The biggest menu probably:
Code:
>cloc-1.64.exe --force-lang="C",gsc "D:\Project TCM v9"
       1 text file.
       1 unique file.
       1 file ignored.

http://cloc.sourceforge.net v 1.64  T=0.36 s (2.8 files/s, 108789.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                1           4117           8879          26351
-------------------------------------------------------------------------------
And one last one:
Code:
>cloc-1.64.exe --force-lang="C",gsc "D:\Dynamic v3"
      20 text files.
      20 unique files.
       5 files ignored.

http://cloc.sourceforge.net v 1.64  T=0.17 s (120.2 files/s, 91523.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                               20            163              0          15065
-------------------------------------------------------------------------------
SUM:                            20            163              0          15065
-------------------------------------------------------------------------------
Of course, the menu size does not mean much about quality but it's still interesting. I hope you enjoyed this. :tonguewink:
 
Last edited:

VerTical

CEO
Donator
Messages
0
Reaction score
-82
Points
664
Wrong, that isn't working because the gsc compiler doesn't compile Comments or any blank spaces.
 
Top