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.84k stars 248 forks source link

Negated exclude, or specific include? #348

Open tknerr opened 2 years ago

tknerr commented 2 years ago

Hi everybody,

is there a way to invert / negate the -x exclude pattern?

For example, let's assume a source tree which has multiple */test/* sub-directories, e.g. one per component.

With lizard src/ -x "*/test/*" I can easily get the SLOC / CCN for everything but test code.

But how would I get the SLOC / CCN for only the test code?

(I haven't found a way to explicitly include a pattern, or alternative to negate a exclude pattern yet, there seems to be no lizard src/ --include "*/test/*" or similar...)

Cheers, Torben