Skip to content

--exclude-dir not working ? #549

@janpfeifer

Description

@janpfeifer

Describe the bug
I added a directory in --exclude-dir and it is still including the file in the output.

See line here, where internal/protos directory is not excluded:

$ scc --exclude-dir=internal/protos --by-file
───────────────────────────────────────────────────────────────────────────────
Language                 Files     Lines   Blanks  Comments     Code Complexity
───────────────────────────────────────────────────────────────────────────────
Go                          15      5000      531       793     3676        537
───────────────────────────────────────────────────────────────────────────────
internal/protos/onnx-ml.pb.go       3208      345       522     2341        316
~ternal/protos/onnx-data.pb.go       613       69        79      465         52
~rotos/onnx-operators-ml.pb.go       375       38        85      252         36
onnx/graph.go                        185       14        36      135         31
onnx/prettyprint.go                  138       14        10      114         35
~md/protoc_onnx_protos/main.go       113       16        21       76          9
onnx/dynamicshape.go                 105        7        11       87         25
onnx/onnx.go                          81        8        14       59         12
onnx/dynamicshape_test.go             51        7         5       39          0
internal/togomlx/tensor.go            45        3         2       40         16
internal/togomlx/dtypes.go            42        2         2       38          1
onnx/linear_test.go                   22        4         1       17          0
onnx/ops.go                           17        3         3       11          4
internal/protos/protos.go              4        1         2        1          0
internal/togomlx/model.go              1        0         0        1          0
───────────────────────────────────────────────────────────────────────────────
Protocol Buffers             3      1186      190       691      305          0
───────────────────────────────────────────────────────────────────────────────
internal/protos/onnx-ml.proto        895      132       524      239          0
~ternal/protos/onnx-data.proto       155       36        74       45          0
~rotos/onnx-operators-ml.proto       136       22        93       21          0
───────────────────────────────────────────────────────────────────────────────
Jupyter                      2       705        0         0      705          0
───────────────────────────────────────────────────────────────────────────────
onnx-py.ipynb                        362        0         0      362          0
onnx-go.ipynb                        343        0         0      343          0
───────────────────────────────────────────────────────────────────────────────
Markdown                     2        20        7         0       13          0
───────────────────────────────────────────────────────────────────────────────
internal/protos/README.md             11        4         0        7          0
README.md                              9        3         0        6          0
───────────────────────────────────────────────────────────────────────────────
License                      1       201       32         0      169          0
───────────────────────────────────────────────────────────────────────────────
LICENSE                              201       32         0      169          0
───────────────────────────────────────────────────────────────────────────────
Total                       23      7112      760      1484     4868        537
───────────────────────────────────────────────────────────────────────────────
Estimated Cost to Develop (organic) $142,335
Estimated Schedule Effort (organic) 6.56 months
Estimated People Required (organic) 1.93
───────────────────────────────────────────────────────────────────────────────
Processed 290059 bytes, 0.290 megabytes (SI)
───────────────────────────────────────────────────────────────────────────────

Expected behavior
Files in the directories marked by --exclude-dir should have been excluded.

Desktop (please complete the following information):

$ uname -a
Linux galactica 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
scc version 3.4.0

Thank you! 😃

ps. : Apologies in advance if I'm doing something wrong, it's the first time I'm using the tool. But I did read the --help of the flag, so if anything maybe whatever I'm doing wrong could be included in the documentation ?

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