-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhance PHPStan error/rule display with SARIF viewer and helpUri
- Loading branch information
Showing
6 changed files
with
28 additions
and
14 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"PHPStan","shortDescription":{"text":"PHP Static Analysis Tool"},"fullDescription":{"text":"PHPStan - PHP Static Analysis Tool"},"fullName":"PHPStan - PHP Static Analysis Tool 1.11.6.0","semanticVersion":"1.11.6.0","informationUri":"https://phpstan.org","rules":[{"id":"PHPSTAN101","shortDescription":{"text":"Analysis error"},"fullDescription":{"text":"Errors detected during analysis of source files"},"helpUri":"https://phpstan.org/user-guide/getting-started","help":{"text":"https://phpstan.org/user-guide/command-line-usage"}}]},"extensions":[{"name":"bartlett/sarif-php-converters","shortDescription":{"text":"PHPStan SARIF Converter"},"version":"1.0.9999999.9999999-dev"}]},"invocations":[{"executionSuccessful":true,"commandLine":"vendor/bin/phpstan","arguments":["analyse","--error-format","sarif","--configuration","examples/phpstan/phpstan.neon.dist","--autoload-file","examples/phpstan/bootstrap.php"],"workingDirectory":{"uri":"file:///shared/backups/bartlett/sarif-php-converters/"}}],"originalUriBaseIds":{"WORKINGDIR":{"uri":"file:///shared/backups/bartlett/sarif-php-converters/"}},"results":[{"message":{"text":"Invalid numeric literal on line 3"},"ruleId":"PHPSTAN101","locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/fixtures/php_bad_1.php","uriBaseId":"WORKINGDIR"},"region":{"startLine":3,"snippet":{"rendered":{"text":" > 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29"}}},"contextRegion":{"startLine":1,"endLine":5,"snippet":{"rendered":{"text":" > 1| <?php\n 2| \n 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n 4| "}}}}}],"partialFingerprints":{"phpstan.parse":"b72968e694d9f576c2adc3cdc3f479a0834ab688b7dc8a6fe2657d59e034ae1f"},"properties":{"ignorable":false}},{"message":{"text":"Syntax error, unexpected '=' on line 3"},"ruleId":"PHPSTAN101","locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/fixtures/php_bad_1.php","uriBaseId":"WORKINGDIR"},"region":{"startLine":3,"snippet":{"rendered":{"text":" > 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29"}}},"contextRegion":{"startLine":1,"endLine":5,"snippet":{"rendered":{"text":" > 1| <?php\n 2| \n 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n 4| "}}}}}],"partialFingerprints":{"phpstan.parse":"b72968e694d9f576c2adc3cdc3f479a0834ab688b7dc8a6fe2657d59e034ae1f"},"properties":{"ignorable":false}},{"message":{"text":"Syntax error, unexpected T_LNUMBER on line 3"},"ruleId":"PHPSTAN101","locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/fixtures/php_bad_1.php","uriBaseId":"WORKINGDIR"},"region":{"startLine":3,"snippet":{"rendered":{"text":" > 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29"}}},"contextRegion":{"startLine":1,"endLine":5,"snippet":{"rendered":{"text":" > 1| <?php\n 2| \n 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n 4| "}}}}}],"partialFingerprints":{"phpstan.parse":"b72968e694d9f576c2adc3cdc3f479a0834ab688b7dc8a6fe2657d59e034ae1f"},"properties":{"ignorable":false}},{"message":{"text":"Syntax error, unexpected T_STRING on line 3"},"ruleId":"PHPSTAN101","locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/fixtures/php_bad_1.php","uriBaseId":"WORKINGDIR"},"region":{"startLine":3,"snippet":{"rendered":{"text":" > 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29"}}},"contextRegion":{"startLine":1,"endLine":5,"snippet":{"rendered":{"text":" > 1| <?php\n 2| \n 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n 4| "}}}}}],"partialFingerprints":{"phpstan.parse":"b72968e694d9f576c2adc3cdc3f479a0834ab688b7dc8a6fe2657d59e034ae1f"},"properties":{"ignorable":false}},{"message":{"text":"Syntax error, unexpected '}' on line 15"},"ruleId":"PHPSTAN101","locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/fixtures/php_bad_2.php","uriBaseId":"WORKINGDIR"},"region":{"startLine":15,"snippet":{"rendered":{"text":" > 15| } elseif ($condition) {}"}}},"contextRegion":{"startLine":13,"endLine":17,"snippet":{"rendered":{"text":" > 13| $condition = rand(0, 5);\n 14| iff ($condition) {\n 15| } elseif ($condition) {}\n 16| "}}}}}],"partialFingerprints":{"phpstan.parse":"2e508d59ec5ba941128ccdf751869d555c2c618018b0979124ee4530b68fbc28"},"properties":{"ignorable":false}}],"automationDetails":{"id":"Daily run 2024-07-03T07:49:22+00:00"}}]} | ||
{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"PHPStan","shortDescription":{"text":"PHP Static Analysis Tool"},"fullDescription":{"text":"PHPStan - PHP Static Analysis Tool"},"fullName":"PHPStan - PHP Static Analysis Tool 1.11.8.0","semanticVersion":"1.11.8.0","informationUri":"https://phpstan.org","rules":[{"id":"PHPSTAN/phpstan.parse","name":"phpstan.parse","helpUri":"https://phpstan.org/error-identifiers/phpstan.parse","help":{"text":"https://phpstan.org/user-guide/ignoring-errors"}}]},"extensions":[{"name":"bartlett/sarif-php-converters","shortDescription":{"text":"PHPStan SARIF Converter"},"version":"1.0.9999999.9999999-dev"}]},"invocations":[{"executionSuccessful":true,"commandLine":"vendor/bin/phpstan","arguments":["analyse","--error-format","sarif","--configuration","examples/phpstan/phpstan.neon.dist","--autoload-file","examples/phpstan/bootstrap.php"],"workingDirectory":{"uri":"file:///shared/backups/bartlett/sarif-php-converters/"}}],"originalUriBaseIds":{"WORKINGDIR":{"uri":"file:///shared/backups/bartlett/sarif-php-converters/"}},"results":[{"message":{"text":"Invalid numeric literal on line 3"},"ruleId":"PHPSTAN/phpstan.parse","locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/fixtures/php_bad_1.php","uriBaseId":"WORKINGDIR"},"region":{"startLine":3,"snippet":{"rendered":{"text":" > 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29"}}},"contextRegion":{"startLine":1,"endLine":5,"snippet":{"rendered":{"text":" > 1| <?php\n 2| \n 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n 4| "}}}}}],"partialFingerprints":{"phpstan.parse":"b72968e694d9f576c2adc3cdc3f479a0834ab688b7dc8a6fe2657d59e034ae1f"},"properties":{"ignorable":false}},{"message":{"text":"Syntax error, unexpected '=' on line 3"},"ruleId":"PHPSTAN/phpstan.parse","locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/fixtures/php_bad_1.php","uriBaseId":"WORKINGDIR"},"region":{"startLine":3,"snippet":{"rendered":{"text":" > 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29"}}},"contextRegion":{"startLine":1,"endLine":5,"snippet":{"rendered":{"text":" > 1| <?php\n 2| \n 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n 4| "}}}}}],"partialFingerprints":{"phpstan.parse":"b72968e694d9f576c2adc3cdc3f479a0834ab688b7dc8a6fe2657d59e034ae1f"},"properties":{"ignorable":false}},{"message":{"text":"Syntax error, unexpected T_LNUMBER on line 3"},"ruleId":"PHPSTAN/phpstan.parse","locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/fixtures/php_bad_1.php","uriBaseId":"WORKINGDIR"},"region":{"startLine":3,"snippet":{"rendered":{"text":" > 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29"}}},"contextRegion":{"startLine":1,"endLine":5,"snippet":{"rendered":{"text":" > 1| <?php\n 2| \n 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n 4| "}}}}}],"partialFingerprints":{"phpstan.parse":"b72968e694d9f576c2adc3cdc3f479a0834ab688b7dc8a6fe2657d59e034ae1f"},"properties":{"ignorable":false}},{"message":{"text":"Syntax error, unexpected T_STRING on line 3"},"ruleId":"PHPSTAN/phpstan.parse","locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/fixtures/php_bad_1.php","uriBaseId":"WORKINGDIR"},"region":{"startLine":3,"snippet":{"rendered":{"text":" > 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29"}}},"contextRegion":{"startLine":1,"endLine":5,"snippet":{"rendered":{"text":" > 1| <?php\n 2| \n 3| 2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n 4| "}}}}}],"partialFingerprints":{"phpstan.parse":"b72968e694d9f576c2adc3cdc3f479a0834ab688b7dc8a6fe2657d59e034ae1f"},"properties":{"ignorable":false}},{"message":{"text":"Syntax error, unexpected '}' on line 15"},"ruleId":"PHPSTAN/phpstan.parse","locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/fixtures/php_bad_2.php","uriBaseId":"WORKINGDIR"},"region":{"startLine":15,"snippet":{"rendered":{"text":" > 15| } elseif ($condition) {}"}}},"contextRegion":{"startLine":13,"endLine":17,"snippet":{"rendered":{"text":" > 13| $condition = rand(0, 5);\n 14| iff ($condition) {\n 15| } elseif ($condition) {}\n 16| "}}}}}],"partialFingerprints":{"phpstan.parse":"2e508d59ec5ba941128ccdf751869d555c2c618018b0979124ee4530b68fbc28"},"properties":{"ignorable":false}}],"automationDetails":{"id":"Daily run 2024-07-31T13:48:59+00:00"}}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"require-dev": { | ||
"phpstan/phpstan": "^1.9" | ||
"phpstan/phpstan": "^1.11" | ||
} | ||
} |