Skip to content

Codemetrics for Dart is a simple command line utility that provides some insight into the "quality" of code.

License

Notifications You must be signed in to change notification settings

daniel-v/codemetrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codemetrics

Codemetrics for Dart is a simple command line utility that provides some insight into the "quality" of code.

It uses static analysis of the code to determine:

and provides different reporting serialization formats:

  • json
  • html

How to use

For now, there is no pub package for this project, so you have to clone it

git clone https://github.com/daniel-v/codemetrics.git
cd codemetrics
pub get
cd bin; dart codemetrics.dart --analysis-root=/path/to/your/package

Internally, Codemetrics for Dart uses glob package to find dart files within the --analysis-root folder with the **.dart glob. It will exclude all dart files in:

  • packages
  • .pub

directories.

You can also install it as a global package:

pub global activate --source git https://github.com/daniel-v/codemetrics.git

Executable name is dart-codemetrics

Reporting options

For html output use the --report-format=html and for JSON use --report-format=json. A full command could look like this:

dart bin/codemetrics.dart --analysis-root=/path/to/your/package --report-format=html > /tmp/test.html

Looking for contributors

There are number of areas you can contribute to this project:

  • code reviews: I always welcome criticism to my code, esp. when it comes to the analysis package
  • documentation: the code is mostly undocumented
  • tests: there are little if any tests written for this package
  • funtionality: if you feel contributing with some functionality, let me know!

About

Codemetrics for Dart is a simple command line utility that provides some insight into the "quality" of code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published