terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.85k stars 250 forks source link

--exclude option does not work as expect #283

Closed raphaelsoul closed 4 years ago

raphaelsoul commented 4 years ago

On my case. The option "exclude" doesn't work as expect

my command :

./lizard.py /Users/raphaelsoul/projects/zuma/weixin/microapp -l js --exclude /Users/raphaelsoul/projects/zuma/weixin/microapp/node_modules

the output of console displaying some check result in node_modules. And finally throw an RuntimeError: maximum recursion depth exceeded, because of the directory depth of node_modules directory.😆

Any usage of --exclude options does not works as well. I am working with git commit hash 9976dcc0afdb39221a40f6187c1af9eec4e8189c

terryyin commented 4 years ago

--exclude uses Python file match patterns (https://docs.python.org/3.8/library/glob.html) So I think in this case you should use

--exclude */node_modules/*