Skip to content

Analyzes PHPStan baseline files and creates aggregated error trend-reports

License

Notifications You must be signed in to change notification settings

p4veI/phpstan-baseline-analysis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analyzes phpstan baseline files

Analyzes PHPStan baseline files and creates aggregated error trend-reports.

Read more in the Blog post.

💌 Give back some love

Consider supporting the project, so we can make this tool even better even faster for everyone.

Supported PHPStan RuleSets

Supported PHPStan Rules

  • PHPStan\Rules\PhpDoc\InvalidPhpDocTagValueRule
  • Symplify\PHPStanRules\CognitiveComplexity\Rules\ClassLikeCognitiveComplexityRule
  • Symplify\PHPStanRules\Rules\Explicit\NoMixedMethodCallerRule
  • Symplify\PHPStanRules\Rules\Explicit\NoMixedPropertyFetcherRule

example report

$ phpstan-baseline-analyze *phpstan-baseline.neon
Analyzing app/portal/phpstan-baseline.neon
  Classes-Cognitive-Complexity: 270
  Deprecations: 2
  Invalid-Phpdocs: 5
  Unknown-Types: 1
  Anonymous-Variables: 4

example trend analysis

the following example shows the evolution of errors in your phpstan baselines. see the trend between 2 different points in time like:

$ git clone ...

$ phpstan-baseline-analyze *phpstan-baseline.neon --json > now.json

$ git checkout `git rev-list -n 1 --before="1 week ago" HEAD`

$ phpstan-baseline-analyze *phpstan-baseline.neon --json > reference.json

$ phpstan-baseline-trend reference.json now.json
Analyzing Trend for app/portal/phpstan-baseline.neon
  Classes-Cognitive-Complexity: 309 -> 177 => improved
  Deprecations: 1 -> 2 => worse
  Invalid-Phpdocs: 3 -> 1 => good
  Unknown-Types: 5 -> 15 => worse
  Anonymous-Variables: 4 -> 3 => good

About

Analyzes PHPStan baseline files and creates aggregated error trend-reports

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • PHP 100.0%