-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Hi!
I'm having a small problem with the checkstyle error formatting: errors don't have a source attribute.
Example checkstyle output from phpcs:
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="2.9.1">
<file name="/my/file.php">
<error line="42" column="1" severity="error" message="The closing brace for the class must go on the next line after the body" source="PSR2.Classes.ClassDeclaration.CloseBraceAfterBody"/>
</file>
</checkstyle>Example checkstyle output from phpstan:
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle>
<file name="/my/file.php">
<error line="34" column="1" severity="error" message="Method MyNamepspace\MyClass::getId() should return int but returns string."/>
</file>
</checkstyle>I didn't think much of it first, but it actually caused ma a problem with the "Violation Comments to GitHub" Jenkins plugin which wasn't reporting anything from phpstan.
After digging a bit, I found that the lib https://github.com/tomasbjerre/violations-lib (which this Jenkins plugin uses) considers the source attribute as mandatory.
Would it be possible to add it, even with a dummy "phpstan" value?
I am also opening an issue on the java lib to make the source attribute optional, as I am not sure which fix would be better.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels