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

Module Usage (lizard.analyze_file()) and "--modified" Option #259

Closed hgn closed 4 years ago

hgn commented 5 years ago

Hello @terryyin, one short question: I want to call analyze_file() with the same behavior as I call it as an executable lizard --modified <path>. In fact: the switch/case counting is somehow braindead for software quality, so I don't want to count it.

I grepped over the source code but didn't find a way to specify the flag. Any ideas?

Best regards!

terryyin commented 5 years ago

Sorry for the late reply.

Try this:

analyze_file = FileAnalyzer(get_extensions([‘’modified"]))

Then use the analyse_file function. The modified part is implemented in an extension. Sorry, it’s not extremely obvious from the source code.

On 9 Mar 2019, at 9:47 PM, Hagen Paul Pfeifer notifications@github.com wrote:

Hello @terryyin https://github.com/terryyin, one short question: I want to call analyze_file() with the same behavior as I call it as an executable lizard --modified . In fact: the switch/case counting is somehow braindead for software quality, so I don't want to count it.

I grepped over the source code but didn't find a way to specify the flag. Any ideas?

Best regards!

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