Skip to content

Counting files with multiple extensions #531

@gms8994

Description

@gms8994

Describe the bug
I'm trying to use --count-as to convert file.test.js to Javascript Tests, but maybe scc is only looking at the actual extension (.js) on the files when performing this conversion.

To Reproduce

> brew update && brew upgrade scc && scc --version
scc version 3.4.0

> touch blah.test.js && scc --format csv --count-as test.js:"Javascript Tests" blah.test.js
Language,Lines,Code,Comments,Blanks,Complexity,Bytes,Files,ULOC
JavaScript,0,0,0,0,0,0,1,0

This also performs the same when using the docker image

> docker run --rm -it -v "$PWD:/pwd" ghcr.io/lhoupert/scc:master scc --format csv --count-as "test.js":"Javascript Tests" /pwd/blah.test.js
Language,Lines,Code,Comments,Blanks,Complexity,Bytes
JavaScript,0,0,0,0,0,0

Expected behavior
The file and lines inside blah.test.js and any other files named like .test.js would be counted as Javascript Tests.

Desktop (please complete the following information):

  • OS: macos
  • Version 14.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    DOING

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions