kisstkondoros / codemetrics

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

Is there any way to run codemetrics on all files in workspace? #32

Closed pmunin closed 7 years ago

pmunin commented 7 years ago

Is there any way to run codemetrics on all files in workspace? And/or integrate it into a es/ts linters, webpack?

kisstkondoros commented 7 years ago

At the moment no, however one can build a webpack plugin using tsmetrics-core.

I can not support You with that now, but I'll come back to this request in about a week or two (I'll be offline for some days).

kisstkondoros commented 7 years ago

So finally I had some hours trying a few things out:

pmunin commented 7 years ago

Well the purpose of this tool would be similar to any other linter - quality control of the code on compilation time. So an output should contain, all code pointers to where code is too complicated. Config should allow to set threshold of levels of complexity and prefilter output based on those levels.

kisstkondoros commented 7 years ago

Well, that's fair enough, but sometimes it's ok that something is complicated (high complexity) and showing it always might get annoying. I'll publish the existing stuff to npm with the suggested additional filtering options. I'll post a link here of the new repo and we can iterate over the idea further there :-)

kisstkondoros commented 7 years ago

So here it is: https://github.com/kisstkondoros/tsmetrics-webpack-plugin Also as an npm package: https://www.npmjs.com/package/tsmetrics-webpack-plugin

I'm closing this issue now, but feel free to open new ones in the linked repo 🎆