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 multiple path #260

Closed salmojunior closed 5 years ago

salmojunior commented 5 years ago

What is the pattern to user --exclude for multiple path? I've trying many examples but none of them works.

terryyin commented 5 years ago

You ca use —exclude or -X multiple times in a commend.

On 13 Mar 2019, at 5:41 PM, Salmo Junior notifications@github.com wrote:

What is the pattern to user --exclude for multiple path? I've trying many examples but none of them works.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/260, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwJYgCrUyNIQiDah-opfGNrc9KCSRhoks5vWMeygaJpZM4bsyL8.

salmojunior commented 5 years ago

It doesn't work. Actually the command runs but when I check the report file it contains results from all files, not even excluding the first --exclude argument which is working when added alone.

terryyin commented 5 years ago

Can you show me your command?

On Mar 13, 2019, at 21:51, Salmo Junior notifications@github.com wrote:

It doesn't work. Actually the command runs but when I check the report file it contains results from all files, not even excluding the first --exclude argument which is working when added alone.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

salmojunior commented 5 years ago

Hi @terryyin,

Thanks helping me. This command works: lizard ./Source -l swift --xml > ./reports/lizard-report.xml --exclude './Pods/*'

but if I try to add a new --exclude argument like below example it stops ignoring even Pods folder.

lizard ./Source -l swift --xml > ./reports/lizard-report.xml --exclude './Pods/*' --exclude './CodeGenerated/*'

terryyin commented 5 years ago

I checked the code and experimented a bit on my side. It seems working fine.

Perhaps the patterns you are using doesn’t match the folder since ‘./‘ is more current folder, but you are analysing ‘./Scoure’ folder only. Try changing . To *. The pattern matching use this function: https://docs.python.org/3.4/library/fnmatch.html

On 14 Mar 2019, at 4:15 PM, Salmo Junior notifications@github.com wrote:

Hi @terryyin https://github.com/terryyin,

Thanks helping me. This command works: lizard ./Source -l swift --xml > ./reports/lizard-report.xml --exclude './Pods/' --exclude './Pods/'

but if I try to add a new --exclude argument like below example it stops ignoring even Pods folder.

lizard ./Source -l swift --xml > ./reports/lizard-report.xml --exclude './Pods/' --exclude './Pods/' --exclude './CodeGenerated/*'

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/260#issuecomment-472746980, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwJYjJXGa_fbNz58WUgg2j9uwGmA34-ks5vWgUfgaJpZM4bsyL8.

salmojunior commented 5 years ago

it worked :)

Thanks a lot @terryyin