pygount icon indicating copy to clipboard operation
pygount copied to clipboard

--folders-to-skip Doesn't seem to work with path delimiters

Open qwk000 opened this issue 2 years ago • 3 comments

Hi. I have a subfolder that I want to exclude that has the same name as a subfolder in another tree which I do want to include. In this case, I can't just use the name in the --folders-to-skip option like this:

pygount --folders-to-skip=[...]com_arc

because both "com_arc" directories in the separate trees get excluded. When I do this:

pygount --folders-to-skip=[...]ip_project/com_arc

nothing gets excluded. I have tried a lot of different things with wildcards and using [regex]. Seems like a bug but I'm hoping there's some trick I'm missing.

Thanks, Wes

qwk000 avatar Sep 10 '21 05:09 qwk000

I also have the same problem, I can only exclude subdirectories of the directory I execute pygount from. The following command works just fine:

% pygount --folders-to-skip="[...],frontend,migrations,static" -f summary

However, this includes all subdirectories of my project, including frontend/node_modules:

% pygount --folders-to-skip="[...],frontend/node_modules,migrations,static"

DarthMikke avatar Jan 02 '22 15:01 DarthMikke

Same problem

Example, I want to exclude this file by excluding /libs/ : a/b/c/libs/js/tom.js

pygount --folders-to-skip="[...],*/libs/*" -f summary Nothing happen

mathben avatar Feb 11 '23 23:02 mathben

That's how the current implementation works, which is not a good thing. There also is a request to support the ** for recursive folders, see #59.

Probably this would need a major rework of some not very interesting code, so it's increasingly unlikely I will look into it.

At some point I will implement #20, which is what most people including myself need. While doing that, it would be feasible to rethink the ignore logic and go for some breaking changes.

roskakori avatar Mar 01 '23 07:03 roskakori