GithubHelp home page GithubHelp logo

Comments (4)

boyter avatar boyter commented on May 17, 2024 1

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.

boyter avatar boyter commented on May 17, 2024

Does not appear to be related to #72 as the file is UTF-8 encoded.

from scc.

boyter avatar boyter commented on May 17, 2024

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.

boyter avatar boyter commented on May 17, 2024

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)

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.