staabm / phpstan-baseline-analysis Goto Github PK
View Code? Open in Web Editor NEWAnalyzes PHPStan baseline files and creates aggregated error trend-reports
Home Page: https://staabm.github.io/
License: MIT License
Analyzes PHPStan baseline files and creates aggregated error trend-reports
Home Page: https://staabm.github.io/
License: MIT License
these errors should be counted as invalid hppdoc
------ ----------------------------------------------------------------------
Line app/shared/controllers/KMCmsfrontendController.php
------ ----------------------------------------------------------------------
8 PHPDoc tag @var has invalid value (DataLayerError|null;): Unexpected
token ";", expected TOKEN_HORIZONTAL_WS at offset 35
------ ----------------------------------------------------------------------
------ ---------------------------------------------------------------------
Line lib/KunzmannRemoteOAuthRequest.php
------ ---------------------------------------------------------------------
46 PHPDoc tag @return has invalid value (array('id' => string, 'email'
=> string, 'firstname' => string, 'lastname' => string,
'authProvider' => string}): Unexpected token "(", expected
TOKEN_HORIZONTAL_WS at offset [24](https://github.com/complex-gmbh/kunzmann/actions/runs/4818214651/jobs/8579907342?pr=4056#step:16:25)
------ ---------------------------------------------------------------------
In the upcoming PHPStan 1.11 we'll see // identifier:
comments. Could this be useful to further analyze the baseline?
support errors like Argument of an invalid type Angkdet supplied for foreach, only iterables are supported
and treat it like a Unknown-Type
atm the tool is able to analyze existing baselines and provide a summary as a result, grouped into categories:
Overall-Errors: 41
Classes-Cognitive-Complexity: 70
Deprecations: 2
Invalid-Phpdocs: 5
Unknown-Types: 1
Anonymous-Variables: 4
Native-Property-Type-Coverage: 1
Native-Param-Type-Coverage: 27
Native-Return-Type-Coverage: 4
Unused-Symbols: 3
it would be great if I could filter existing baselines, based on category, and get back a new baseline.
this would allow me to work with focus on a certain problem area, without manually searching the existing full-project-baseline
example 1 (which outputs all filtered content on stdout)
phpstan-baseline-analyze '*phpstan-baseline.neon' --filter=Deprecations
example 2(which outputs the content into new-baseline.neon
)
phpstan-baseline-analyze '*phpstan-baseline.neon' --filter=Invalid-Phpdocs > new-baseline.neon
the result should be rendered in neon
-format, like the default PHPStan baseline, so we can further process it with whatever tool which supports the default phpstan baseline format
It's great that phpstan-baseline-filter
supports reading a baseline from PHP format.
But it would be great if it would then also write it back in PHP format, instead of the default NEON format.
phpstan now supports baselines written in PHP format (to avoid the need for parsing neon, which helps with huge baselines). It would be great to be able to analyze them as well.
to read and write the same file within a single pipe we need a hack
maybe we should instead add a new option like --out-file
or similar so we can write the file from within php instead of using stdout redirection on the bash
up to discussion
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.