kisstkondoros / codemetrics

VSCode extension which shows the complexity information for TypeScript class members
Other
402 stars 20 forks source link

Command line app #74

Closed user753 closed 4 years ago

user753 commented 4 years ago

I use WebStorm so It would be helpful if I could use codemetrics through command line It would print all methods sorted by complexity.

kisstkondoros commented 4 years ago

There is a companion project https://github.com/kisstkondoros/codemetrics-idea it does not supports typescript / javascript at the moment, but it could do in theory (with some effort). Wouldn't that be better for your use case?

There is also https://github.com/kisstkondoros/gulp-tsmetrics which is heavily outdated, but it could be used for this purpose.

What do you really want? An IDE integration for webstorm or something like a CLI?

user753 commented 4 years ago

Wouldn't that be better for your use case?

it definitely wouldn't hurt. I use typescript so right now It isn't useful for me.

something like a CLI?

Yes, cli would be great. Something like

codemetrics --max-complexity 10 ./src

would print

./src/foo.ts bar() complexity 12
./src/bar.ts foo() complexity 11
kisstkondoros commented 4 years ago

I've just published https://www.npmjs.com/package/codemetrics-cli If you miss something feel free to open an issue in that repo, or even better provide a PR :smile: