-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Should exclude Lock files like Cargo.lock #206
Comments
This is one I am on the fence about. I actually have it set to count cargo.lock as a filetype which might exist in a project. Because even though its auto-generated its part of the project. It actually follows the same logic that say
Generally I suggest using a Although I am prepared to be convinced otherwise. |
It's different software as
https://dev.to/gajus/stop-using-package-lock-json-or-yarn-lock-3ddi
And most of lock file also has below lines likewise:
|
Convinced. Pushed into master. Closing down. |
* Update README.md * SLOCCount came before cloc * resolve boyter#206 * First cut at boyter#210 * Add "gohtml" and "gotxt" to the list of extensions for Go templates These are the default extensions that e.g. GoLand uses, and some other tools as well I believe. It's useful as it disambiguates between templates for html/template and text/template. * partial fix for boyter#214 * resolve after feedback * Mostly ready for boyter#211 * real fix for issue214 * few tests and typo * Resolvehttps://github.com/boyter/issues/208 * Update to remove wrong Go version mentioned boyter#220 Co-authored-by: Ben Boyter <[email protected]> Co-authored-by: AlDanial <[email protected]> Co-authored-by: Ben Boyter <[email protected]> Co-authored-by: Martin Tournoij <[email protected]>
@boyter would it be possible to also exclude |
Hmm that is just a JSON file though. If you need this now, add an exception in Have you got a sample of what it has in the header? Might be able to use that to exclude. |
I looked at that but there wasn't any useful header I think: {
"name": "name",
"version": "0.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
...
}
} I'm currently passing |
@boyter the
It's a JSON - doesn't really have a header, but here are some common fields that you can test if they exist at the root level: {
"name": "",
"lockfileVersion": 3,
"requires": true,
"packages": {}
} For a tiny 500 line project the |
I guess we could add something similar to the How does |
@boyter Yes - to both. We could really use such an argument, but also I strongly believe that generated files like |
A more convention-over-configuration approach with sane defaults would work best. |
@boyter would second here that for JS/TS projects |
Awesome tool btw! For extra context, it adds 50ksloc and $2 million to my project estimate. It's not hard to add to |
Ill ensure this gets into the next release. |
Done. Ignore files, gitignore files and the following |
Describe the bug
What count in rust project, the
Cargo.lock
file also counted.Like: https://github.com/cgag/loc
To Reproduce
scc
Expected behavior
Cargo.lock
is auto generated file, should not be counted.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: