Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not identify CMake file in project Vespa #11

Closed
DumAdudus opened this issue Jun 7, 2018 · 4 comments
Closed

Could not identify CMake file in project Vespa #11

DumAdudus opened this issue Jun 7, 2018 · 4 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@DumAdudus
Copy link

DumAdudus commented Jun 7, 2018

Project: https://github.com/vespa-engine/vespa
Commit: 389801098797ab37c7bc4ac5a3888ef4d92214e7
CMake files marked as Plain Text

# scc --version
scc version 1.1.0
# scc
-------------------------------------------------------------------------------
Language                 Files     Lines     Code  Comments   Blanks Complexity
-------------------------------------------------------------------------------
Java                      7264    776647   577947     84844   113856      47825
C++                       3160    568874   479707     16565    72602      51343
C Header                  2802    218981   136097     44848    38036       4763
Plain Text                1208    288657   288021         0      636          0
XML                        620    156449   155398       204      847          0
Module-Definition          252      7498     5992         0     1506        626
Shell                      189      9843     7441      1077     1325       1289
JSON                       135      9918     9904         0       14          0
C++ Header                 133     20360    17209       810     2341       2651
Scala                       59      5242     3811       303     1128        220
Markdown                    49       843      607         0      236          0
Perl                        49      7547     6076       627      844        926
HTML                        18      2171     1950        11      210          0
Autoconf                    12       131      107        19        5          6
Ruby                         9       342      294         9       39         18
Python                       9      1118      815        97      206        191
C                            7      1881     1427       179      275        141
Emacs Lisp                   4      2752     2118       403      231         93
CMake                        3       676      473        79      124         58
Makefile                     2        41       36         2        3          0
YAML                         1        27       19         1        7          0
Dockerfile                   1        16       10         2        4          3
MSBuild                      1         6        6         0        0          0
Protocol Buffers             1       464      143       255       66          0
-------------------------------------------------------------------------------
Total                    15988   2080484  1695608    150335   234541     110153
-------------------------------------------------------------------------------
Estimated Cost to Develop $66,433,488
Estimated Schedule Effort 75.578429 months
Estimated People Required 104.122323
-------------------------------------------------------------------------------
# tokei --version
tokei 7.0.3 compiled without serialization formats.
# tokei -s files
-------------------------------------------------------------------------------
 Language            Files        Lines         Code     Comments       Blanks
-------------------------------------------------------------------------------
 Java                 7264       795587       578434       103023       114130
 C++                  3160       570774       481222        16697        72855
 C Header             2802       228614       136351        53756        38507
 CMake                1018        14243        12801         1127          315
 XML                   620       157314       155418          985          911
 Module-Definition     252         7499         5993            0         1506
 Shell                 203        11145         8490         1155         1500
 Plain Text            193       275090       275090            0            0
 JSON                  135         9918         9918            0            0
 C++ Header            133        20455        17210          902         2343
 Scala                  59         5313         3817          365         1131
 Perl                   52         8409         6733          711          965
 Markdown               49          843          843            0            0
 HTML                   18         2190         1950           29          211
 Autoconf               12          131          107           19            5
 Python                  9         1118          817           95          206
 Ruby                    9          342          294            9           39
 C                       7         1918         1432          198          288
 Emacs Lisp              4         2752         2118          403          231
 Makefile                2           41           36            2            3
 Dockerfile              1           16           10            2            4
 Protocol Buffers        1          464          143          255           66
-------------------------------------------------------------------------------
 Total               16003      2114176      1699227       179733       235216
-------------------------------------------------------------------------------

@boyter
Copy link
Owner

boyter commented Jun 7, 2018

Looks like Cmake is a special case in tokei. See https://github.com/Aaronepower/tokei/blob/349fe2b585ba949c94a45e38f65e880831687a59/CONTRIBUTING.md and search for CMakeLists.txt

It appears to read from the cmakelists.txt file https://github.com/vespa-engine/vespa/blob/master/CMakeLists.txt

This is not something I am familiar with sorry to say. How do cmakelists.txt files work? Or is it just that a file called that is a Cmake file? It looks like its just any file called that is a special case to me but not 100% sure on that.

@boyter boyter self-assigned this Jun 7, 2018
@boyter boyter added help wanted Extra attention is needed question Further information is requested labels Jun 7, 2018
@boyter
Copy link
Owner

boyter commented Jun 7, 2018

Had a guess and it looks as though its just the filename. Trying it out,

$ scc vespa
-------------------------------------------------------------------------------
Language                 Files     Lines     Code  Comments   Blanks Complexity
-------------------------------------------------------------------------------
Java                      7264    776647   577947     84844   113856      47825
C++                       3160    568874   479707     16565    72602      51343
C Header                  2802    218981   136097     44848    38036       4763
CMake                     1017     14121    12698      1117      306         62
XML                        620    156449   155398       204      847          0
Module-Definition          252      7498     5992         0     1506        626
Plain Text                 194    275212   274758         0      454          0
Shell                      189      9843     7441      1077     1325       1289
JSON                       135      9918     9904         0       14          0
C++ Header                 133     20360    17209       810     2341       2651
Scala                       59      5242     3811       303     1128        220
Markdown                    49       843      607         0      236          0
Perl                        49      7547     6076       627      844        926
HTML                        18      2171     1950        11      210          0
Autoconf                    12       131      107        19        5          6
Ruby                         9       342      294         9       39         18
Python                       9      1118      815        97      206        191
C                            7      1881     1427       179      275        141
Emacs Lisp                   4      2752     2118       403      231         93
Makefile                     2        41       36         2        3          0
ASP.NET                      2         2        2         0        0          0
Protocol Buffers             1       464      143       255       66          0
YAML                         1        27       19         1        7          0
MSBuild                      1         6        6         0        0          0
Dockerfile                   1        16       10         2        4          3
-------------------------------------------------------------------------------
Total                    15990   2080486  1694572    151373   234541     110157
-------------------------------------------------------------------------------
Estimated Cost to Develop $66,390,869
Estimated Schedule Effort 75.560000 months
Estimated People Required 104.080904
-------------------------------------------------------------------------------

Which is a bit better. Odd that the count was different to tokei. I tried to work out how many there should have been,

# bboyter @ SurfaceBook2 in ~/Projects [17:49:23]
$ fd -i cmakelists.txt vespa | wc -l
1015

# bboyter @ SurfaceBook2 in ~/Projects [17:49:09] C:1
$ scc vespa | grep CMake
CMake                     1017     14121    12698      1117      306         62

# bboyter @ SurfaceBook2 in ~/Projects [17:49:29]
$ tokei vespa | grep CMake
 CMake                1018        14243        12801         1127          315

Will have to investigate this a bit further. However it should be far more accurate with the change I made.

Have submitted the PR and when its all good will merge in. If you are able to build from source you can then confirm that its working for you.

@boyter
Copy link
Owner

boyter commented Jun 7, 2018

PR merged in #12

Could you try building from source and let me know how that works for you @DumAdudus

@boyter
Copy link
Owner

boyter commented Jun 8, 2018

Going to close down. Looks good.

@boyter boyter closed this as completed Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants