Skip to content

failing to use .sccignore  #550

@janpfeifer

Description

@janpfeifer

Describe the bug
Follow up of #549 , but the issue now is that .sccignore is not processed.

Example: my project has all the .proto and generated code in a sub-directory internal/protos:

$ cat .sccignore
internal/protos
$ scc
───────────────────────────────────────────────────────────────────────────────
Language                 Files     Lines   Blanks  Comments     Code Complexity
───────────────────────────────────────────────────────────────────────────────
Go                          15      5339      553       827     3959        632
Protocol Buffers             3      1186      190       691      305          0
Jupyter                      2       512        0         0      512          0
Markdown                     2        20        7         0       13          0
License                      1       201       32         0      169          0
gitignore                    1        29        7        11       11          0
───────────────────────────────────────────────────────────────────────────────
Total                       24      7287      789      1529     4969        632
───────────────────────────────────────────────────────────────────────────────
Estimated Cost to Develop (organic) $145,437
Estimated Schedule Effort (organic) 6.610459 months
Estimated People Required (organic) 1.954619
───────────────────────────────────────────────────────────────────────────────
Processed 288291 bytes, 0.288 megabytes (SI)
───────────────────────────────────────────────────────────────────────────────

$ scc --by-file | grep internal/protos
~internal/protos/onnx-ml.pb.go      3208      345       522     2341        316
internal/protos/protos.go              4        1         2        1          0
~internal/protos/onnx-ml.proto       895      132       524      239          0
internal/protos/README.md             11        4         0        7          0

Expected behavior
The same it does with .ignore which is currently working:

$ mv .sccignore .ignore
$ cat .ignore 
internal/protos

$ scc
───────────────────────────────────────────────────────────────────────────────
Language                 Files     Lines   Blanks  Comments     Code Complexity
───────────────────────────────────────────────────────────────────────────────
Go                          11      1139      100       139      900        228
Jupyter                      2       512        0         0      512          0
License                      1       201       32         0      169          0
Markdown                     1         9        3         0        6          0
gitignore                    1        29        7        11       11          0
ignore                       1         1        0         0        1          0
───────────────────────────────────────────────────────────────────────────────
Total                       17      1891      142       150     1599        228
───────────────────────────────────────────────────────────────────────────────
Estimated Cost to Develop (organic) $44,221
Estimated Schedule Effort (organic) 4.204901 months
Estimated People Required (organic) 0.934321
───────────────────────────────────────────────────────────────────────────────
Processed 68864 bytes, 0.069 megabytes (SI)
───────────────────────────────────────────────────────────────────────────────

$ scc --by-file | grep internal/protos
# no output

Desktop (please complete the following information):

  • OS: Linux bitly 6.8.0-47-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 21:40:26 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

  • SCC Version: current head, installed 5 minutes ago with go install github.com/boyter/scc@master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions