GithubHelp home page GithubHelp logo

Language R ignored about cloc HOT 7 CLOSED

Chr96er avatar Chr96er commented on June 17, 2024
Language R ignored

from cloc.

Comments (7)

AlDanial avatar AlDanial commented on June 17, 2024

Strange, works for me:

> cloc ~/Downloads/MOCK-master.zip 
     180 text files.
     173 unique files.                                          
     127 files ignored.
https://github.com/AlDanial/cloc v 1.65  T=0.39 s (141.3 files/s, 9571.3 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
R                               27            357            700           1391
C++                             20             81            306            745
XML                              1              0              3             87
C/C++ Header                     7             14             14             28
-------------------------------------------------------------------------------
SUM:                            55            452           1023           2251
-------------------------------------------------------------------------------

What do you get for

cloc --version

? I'm using the current git master version, https://github.com/AlDanial/cloc/blob/master/cloc

from cloc.

AlDanial avatar AlDanial commented on June 17, 2024

Ooops, nevermind, I saw you're using 1.62 and 1.64. Can you give it a try with the git master?

I plan to release the next version, 1.66, by the end of this month.

from cloc.

Chr96er avatar Chr96er commented on June 17, 2024

Same result here, no R files recognized. Besides that, the output is the same as yours. Except for the header:
290 text files.
220 unique files.
308 files ignored.
The only difference I can see, is that I call cloc like this:
perl cloc MOCK-PESA-II
Where MOCK-PESA-II is the path to the repository's folder. I didn't want to install winzip, but I guess that can't be the reason.

For the moment I'd be grateful if you could provide the statistics for the subdirectories MOCK and PESAII.

If there's anything I can do to help debug this, let me know, although that will have to wait a couple of days.

from cloc.

AlDanial avatar AlDanial commented on June 17, 2024

Your mention of winzip indicates you're running on a Windows machine so the problem most likely has to do with that somehow.

Here are the stats for your two subdirectories:

/tmp/MOCK-master> ls
additions/  Documentation/  MOCK/  PESAII/  README.md
/tmp/MOCK-master> cloc MOCK
     115 text files.
     115 unique files.                                          
      83 files ignored.
https://github.com/AlDanial/cloc v 1.65  T=0.15 s (218.4 files/s, 16227.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
R                               11            171            458            850
C++                             14             60            259            524
C/C++ Header                     7             14             14             28
-------------------------------------------------------------------------------
SUM:                            32            245            731           1402
-------------------------------------------------------------------------------
/tmp/MOCK-master> cloc PESAII/
      34 text files.
      34 unique files.                              
      18 files ignored.
https://github.com/AlDanial/cloc v 1.65  T=0.05 s (314.9 files/s, 14857.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
R                               10             69            144            253
C++                              6             21             47            221
-------------------------------------------------------------------------------
SUM:                            16             90            191            474
-------------------------------------------------------------------------------

Since our counts for # text and # ignored files differ it suggests cloc on Windows is ignoring R files for some reason. We can use the --ignored option to figure out why:

cloc --ignored ign.txt MOCK-master/

This will create a file, ign.txt, which tells which files it ignored and why. Let me know what it says for R files.

from cloc.

Chr96er avatar Chr96er commented on June 17, 2024

Thanks a lot for the stats!

That's right, I'm running cloc on windows. I attached the output using the --ignored option.
ign.txt

from cloc.

AlDanial avatar AlDanial commented on June 17, 2024

With entries like

MOCK-PESA-II/MOCK/R/MOCK-package.R: language unknown (#3)

it sure looks like the Windows exe doesn't recognize R.

If you have the opportunity to install a Perl interpreter on your Windows box (eg Strawberry Perl or ActiveState Perl) you'll have the benefit of running with the latest source. Otherwise you'll need to wait until the next release (end January).

from cloc.

AlDanial avatar AlDanial commented on June 17, 2024

Took a while to get access to a Windows machine to see what exactly was going on. Found the problem, was related to the code, on Windows, forcing file extensions to match the known extensions in lower case and R only had .R defined. Works now with git commit 7e3995d.

from cloc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.