Closed Rspoon3 closed 1 year ago
Give the version on master (https://github.com/AlDanial/cloc/blob/master/cloc) a try.
Maybe this is a dumb question, but how can I try that out? I'm on the latest version of macOS and have version 1.96 downloaded with Homebrew. There doesn't appear to be a straightforward way for me to point Homebrew at a specific branch. Is there a way I can download master and run it locally?
Ah I figured it out. Navigate to the downloaded master branch file, open the folder in terminal and use the following
./cloc /Users/richardwitherspoon/Desktop/My\ folder
.
It works great! Exactly what I needed. Thank you!
glad to hear it
@AlDanial thanks for adding this feature... do you mind adding this to documentation? Maybe the README.md and the command line help?
@aaronpkelly : Thanks for pointing out the omission of --include-content
in the README (the --exclude-content
switch is already there). I'll add it.
fyi, both switches are already documented in the cloc's command line help.
Currently there is a way to exclude files that contain text using
--exclude-content=<regex>.
I’m looking for a way to do the opposite. I've triedcloc . --exclude-content='/^((?!import).)*$/s'
but it doesn't give the desired results. I have also tried writing an ignored file using--ignored
but that only gives the ignored reason, and not the line count.I would like to request the ability to have a text include option.
--include-content=<regex>.
would be exactly what I’m looking for.