code_checker 0.10.0 copy "code_checker: ^0.10.0" to clipboard
code_checker: ^0.10.0 copied to clipboard

discontinued

Static source code analytics tool that helps analyse and improve quality.

Code checker #

Build Status codecov.io License Pub Version Dart SDK Version Dart Platform

Static source code analytics tool that helps analyse and improve quality, inspired by Wrike Dart code metrics. It provides additional rules for dart analyzer and collects code metrics.

Usage #

Analyzer plugin #

The plugin for the Dart analyzer provide information collected by metrics.

  1. Add dependency to pubspec.yaml

    dev_dependencies:
      code_checker: ^0.10.0
    
  2. Add configuration to analysis_options.yaml

    analyzer:
      plugins:
        - code_checker
      
    code_checker:
      metrics:
        cyclomatic-complexity: 20
        lines-of-code: 100
        maximum-nesting-level: 5
        number-of-methods: 10
        number-of-parameters: 4
        weight-of-class: 0.33
      metrics-exclude:
        - test/**
      rules:
        - double_literal_format
        - prefer_newline_before_return
        - prefer_trailing_comma
    

Command line tool #

Full usage

Usage: checker [arguments] <directories>

-h, --help                                        Print this usage information.


-r, --reporter=<console>                          The format of the output of the analysis
                                                  [console (default), json]


    --cyclomatic-complexity=<20>                  Cyclomatic Complexity threshold
    --maximum-nesting-level=<5>                   Maximum Nesting Level threshold
    --number-of-methods=<10>                      Number of Methods threshold
    --number-of-parameters=<4>                    Number of Parameters threshold
    --weight-of-class=<0.33>                      Weight Of a Class threshold


    --root-folder=<./>                            Root folder
                                                  (defaults to current directory)
    --exclude=<{/**.g.dart,/**.template.dart}>    File paths in Glob syntax to be exclude
                                                  (defaults to "{/**.g.dart,/**.template.dart}")
1
likes
40
pub points
5%
popularity

Publisher

unverified uploader

Static source code analytics tool that helps analyse and improve quality.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

analyzer, analyzer_plugin, ansicolor, args, glob, meta, path, source_span, yaml

More

Packages that depend on code_checker