boyter / scc

Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
MIT License
6.28k stars 250 forks source link

Unable to use multiple count-as flags #394

Closed scottc-WellSky closed 1 year ago

scottc-WellSky commented 1 year ago

Describe the bug

To Reproduce

  1. Tell us how you were using scc either as command line or library.
    • I'm testing a few scenarios to get RPG line counts from the command line
  2. If command line please list the arguments. If library please supply code to demonstrate the issue.
    • scc --count-as lf:"Plain Text" --verbose C:\statrepos\LTAC.Interactant.Backend\FPCSOURCE\Dictionary
    • scc --count-as pf:"Plain Text" --verbose C:\statrepos\LTAC.Interactant.Backend\FPCSOURCE\Dictionary
    • scc --count-as lf,pf:"Plain Text" --verbose C:\statrepos\LTAC.Interactant.Backend\FPCSOURCE\Dictionary
    • scc --count-as pf:"Plain Text" --count-as lf:"Plain Text" --verbose C:\statrepos\LTAC.Interactant.Backend\FPCSOURCE\Dictionary

Expected behavior A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

boyter commented 1 year ago

So you need to do it like so, where I am remapping md and yml files as Go. Picked because that's what was in the repository I am looking at.

scc --count-as md:go,yml:go

In short, define each remap with , as the separator.

scottc-WellSky commented 1 year ago

Makes perfect sense. I think I just misread the sample.

Is there way to use count-as with files that don't have an extension?

boyter commented 1 year ago

So long as it matches something in scc you should be able to use the name (exact match) so

scc --count-as "Java":go

Should start counting Java as Go. Otherwise --remap-unknown might work if you have some sort of marker in the head of the file you can use to identify it.

scottc-WellSky commented 1 year ago

Thanks for the great tool and support!

boyter commented 1 year ago

@scottc-WellSky You are welcome!

Now if only I could get paid to do it too :P