clog-analysis
v2.0.0
Published
Simple CoffeeScript static analysis for code quality metrics
Downloads
12
Readme
Clog
CoffeeScript static analysis for code quality metrics. Inspired by flog for Ruby. Runs as a CLI, generating a report describing churn and complexity of each file or directory passed to it.
Installation
npm install -g clog-analysis
Usage
clog path/to/file1.coffee path/to/file2.coffee my/dir
Generates a report of churn and complexity for file1.coffee
, file2.coffee
, and all .coffee
, .coffee.md
, and .litcoffee
files inside my/dir
or any of its subdirectories.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
TODO
Stub out fs read file to speed up CLI specs
Known issues
Method length metric can be incorrect if you have comments at the same level as another function.
fnOne = ->
doSomething()
# This is what function two does
fnTwo = ->
doSomethingElse()
In the above example the comment above fnTwo
will be added to the method length calculation for fnOne
.