Comments (7)
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.
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.
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.
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.
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.
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.
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)
- Cloc doesn't support <![CDATA[ .... ]]]]><![CDATA[> ...]]> in XML HOT 2
- Cloc counts line where comment starts as comment in XML HOT 1
- Nickel config lang support
- exe version of cloc not support file name with chinese character HOT 4
- Language support for Luau .luau HOT 1
- List winget in README package maganers HOT 1
- Cloc has problems with */* in Go HOT 3
- Cloc doesn't count correctly Visual Basic code HOT 1
- Add Modelica language HOT 3
- support Processing Language
- Documentation for --force-lang is slightly wrong HOT 3
- --fullpath does not work with --vcs=git HOT 4
- Possible inconsistent counting of "same" lines HOT 5
- Add option to exclude shebang from the count HOT 5
- Add support for .gjs/.gts
- dotnet tool HOT 1
- Reading JSON file kills cloc when counting repo HOT 3
- --csv-delimiter doesn't work HOT 4
- --not-match-d= includes file at root of pattern HOT 7
- Attempt to create a file in the present working directory. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloc.