-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP: Added support for Psalm static analyzer #7810
Conversation
php/php.code.analysis/src/org/netbeans/modules/php/analysis/ImportantFilesImpl.java
Outdated
Show resolved
Hide resolved
4621fee
to
06f6512
Compare
php/php.code.analysis/src/org/netbeans/modules/php/analysis/parsers/CheckStyleReportParser.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me; please, let @junichi11 review it too. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great because this is implemented based on the existing code :)
Just in case, I would add unit tests using the actual results of an example. Thanks!
php/php.code.analysis/src/org/netbeans/modules/php/analysis/commands/Psalm.java
Outdated
Show resolved
Hide resolved
php/php.code.analysis/src/org/netbeans/modules/php/analysis/parsers/CheckStyleReportParser.java
Outdated
Show resolved
Hide resolved
06f6512
to
e311896
Compare
Added a test for parsing psalm output. |
php/php.code.analysis/test/unit/data/psalm/PsalmSupport/test/src/CalculatorTest.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you!
e311896
to
f05a02e
Compare
This PR adds support for the
Psalm
static analyzer.https://psalm.dev/
php_psal_support.mp4
Most of it is copying code from
PHPStan
. The main differences are in the command to start the analyzer in Psalm.java.Also in this PR the file
PHPStanStyleReportParser.java
is renamed toCheckStyleReportParser.java
and is used for bothPHPStan
andPsalm
.Also, the image file for
Psalm
is a copy oftextDetail.png
from theSearch API
module.Tested on
Psalm
version 5.26.1