dzunke/panaly-baseline-plugin

A Panaly plugin that deliver metrics from various quality tool baselines

dev-main 2024-08-13 18:00 UTC

This package is auto-updated.

Last update: 2024-12-13 18:42:49 UTC


README

The plugin for the Panaly Project Analyzer provides metrics for various tool baselines in the development ecosystem. When introducing new quality tools or rules, it's not always feasible to fix all errors immediately. Most tools offer a "baseline" feature to store existing errors at a specific time, which are then ignored during checks. This allows developers to fix these issues over time while ensuring new code meets quality standards, preventing new technical debt.

Available Metrics

PHPMD Baseline Count

Identifier: phpmd_baseline_count

Returns an Integer result with the count of entries in a PHPMD baseline file, which can be filtered by subject.

PHPStan Baseline Count

Identifier: phpstan_baseline_count

Returns an Integer result with the sum of entries in a PHPStan baseline file, summarizing the count of each entry.

Psalm Baseline Count

Identifier: psalm_baseline_count

Returns an Integer result with the sum of all code entries representing a single error within a class.

Example Configuration

# panaly.dist.yaml
plugins:
    DZunke\PanalyBaseline\BaselinePlugin: ~ # no options available

groups:
    baselines:
        title: "Baseline Overview"
        metrics:
            phpmd_baseline_count:
                baseline: ./path/to/my/baseline.xml
            phpmd_baseline_count_cyclomatic:
                title: PHPMD Cyclomatic Complexity Baseline Count
                baseline: ./path/to/my/baseline.xml
                filter: [ 'CyclomaticComplexity' ]

Thanks and License

Panaly Project Analyzer - Baseline Plugin © 2024+, Denis Zunke. Released utilizing the MIT License.

GitHub @dzunke  ·  Twitter @DZunke