Comments (4)
Merged into master.
This will still need work to make it more flexible, so no release till that is done in #76
That said closing down because if you build from master its all fine now and will make it into the next release.
from scc.
Does not appear to be related to #72 as the file is UTF-8 encoded.
from scc.
Issue is the following line,
if (c == '\\' || (c == '\"')) {
The " is being picked up as the start of a string which is throwing out the count. Because scc
counts blank lines as being code if inside a string unlike tokei this is why the count is incorrect.
In this case we could check for \ before the string since this should only occur inside a char. However not all languages work like that. I think this is acceptable for the moment as a quick fix though and to create a new issue to evaluate how this works in other languages. It should work for most of the common languages though which is a good short term win.
from scc.
Fix for this case exists on branch #75
$ go run main.go examples/regressions/java/AbstractSACParser.java
───────────────────────────────────────────────────────────────────────────────
Language Files Lines Code Comments Blanks Complexity
───────────────────────────────────────────────────────────────────────────────
Java 1 139 103 16 20 55
───────────────────────────────────────────────────────────────────────────────
Total 1 139 103 16 20 55
───────────────────────────────────────────────────────────────────────────────
Estimated Cost to Develop $2,483
Estimated Schedule Effort 1.570432 months
Estimated People Required 0.187331
───────────────────────────────────────────────────────────────────────────────
NB complexity goes up because it spends time in the code state now which triggers that logic.
from scc.
Related Issues (20)
- How can I include all _test.go files by regex. HOT 2
- Question: Use wildcards with excludes? HOT 1
- Unable to use multiple count-as flags HOT 5
- GNUmakefile is not recognized as Makefile HOT 1
- Recognize file type base on mime type HOT 8
- --exclude-dir doesn't exclude directories HOT 4
- Shields like style HOT 2
- Different Results on Windows and Linux HOT 5
- Cut new release? HOT 2
- Why CUDA files are not supported? HOT 2
- scc handle .gitignore are unexpected HOT 1
- error in Ubuntu 18.06: file or directory does not exist HOT 4
- sourcehut on sloc.xyz HOT 8
- Wrong language Complexity/Lines calculation when using -wide
- scc version 3.2.0 fails to compile with 32 bit golang toolchain in Windows HOT 3
- "Arvo" should be "Avro" HOT 1
- Add Templ Support
- Let badge exclude/include some folders HOT 4
- scc includes the .ignore file as part of the project counting HOT 4
- Feature Request Azure Bicep Support HOT 4
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 scc.