Preserve PHPUnit diagnostics and native annotation levels

This commit is contained in:
Shivam Mathur
2026-10-22 16:48:57 +05:30
parent fd2044be8d
commit ff0b532a6d
+19 -14
View File
@@ -21,7 +21,7 @@
"owner": "phpunit-custom-message",
"pattern": [
{ "regexp": "^\\d+\\)\\s.*$" },
{ "regexp": "^(?!.*Failed\\sasserting)(?!.*:\\d+$)(.+)$", "message": 1 },
{ "regexp": "^(?!.*Failed\\sasserting)(.+)$", "message": 1 },
{ "regexp": "^.*Failed\\sasserting\\sthat.*$" },
{ "regexp": "^(.*):(\\d+)$", "file": 1, "line": 2 }
]
@@ -30,7 +30,7 @@
"owner": "phpunit-custom-message-blank",
"pattern": [
{ "regexp": "^\\d+\\)\\s.*$" },
{ "regexp": "^(?!.*Failed\\sasserting)(?!.*:\\d+$)(.+)$", "message": 1 },
{ "regexp": "^(?!.*Failed\\sasserting)(.+)$", "message": 1 },
{ "regexp": "^.*Failed\\sasserting\\sthat.*$" },
{ "regexp": "^\\s*$" },
{ "regexp": "^(.*):(\\d+)$", "file": 1, "line": 2 }
@@ -38,37 +38,42 @@
},
{
"owner": "phpunit-other-blank",
"severity": "warning",
"pattern": [
{ "regexp": "^\\d+\\)\\s.*$" },
{ "regexp": "^(?!.*Failed\\sasserting)(?!.*:\\d+$)(.+)$", "message": 1 },
{ "regexp": "^\\s*$" },
{ "regexp": "^(?!.*Failed\\sasserting)(.+)$", "message": 1 },
{ "regexp": "^(?:\\s*|[-+@ ].*)$" },
{ "regexp": "^(.*):(\\d+)$", "file": 1, "line": 2 }
]
},
{
"owner": "phpunit-other",
"severity": "warning",
"pattern": [
{ "regexp": "^\\d+\\)\\s.*$" },
{ "regexp": "^(?!.*Failed\\sasserting)(?!.*:\\d+$)(.+)$", "message": 1 },
{ "regexp": "^(?!.*Failed\\sasserting)(.+)$", "message": 1 },
{ "regexp": "^(.*):(\\d+)$", "file": 1, "line": 2 }
]
},
{
"owner": "phpunit-skipped-no-reason",
"owner": "phpunit-warning",
"severity": "warning",
"pattern": [
{ "regexp": "^(\\d+\\)\\s.*)$", "message": 1 },
{ "regexp": "^(.*):(\\d+)$", "file": 1, "line": 2 }
{ "regexp": "^There (?:was|were) \\d+ (?:(?:risky|skipped) tests?(?: suites?)?|(?:PHPUnit(?: test runner)? )?warnings?):$" },
{ "regexp": "^(?:(\\s*(/.*|[A-Za-z]:[\\\\/].*):(\\d+)|(?!-+$|There (?:was|were) \\d+ .+:$|\\d+ tests? triggered \\d+ .+:$|OK(?: \\(\\d+ tests?, \\d+ assertions?\\)|, but (?:there were issues|some tests were skipped|incomplete, skipped, or risky tests)!)$|(?:FAILURES|ERRORS|WARNINGS)!$|Tests: \\d+(?:,|\\.?$)|PHPUnit \\d+\\.\\S+ by |Triggered by:$).*)|Triggered by:)$", "message": 1, "file": 2, "line": 3, "loop": true }
]
},
{
"owner": "phpunit-skipped-depends",
"severity": "warning",
"owner": "phpunit-notice",
"severity": "notice",
"pattern": [
{ "regexp": "^\\d+\\)\\s(.*)$" },
{ "regexp": "^(This test depends on .*)$", "message": 1 }
{ "regexp": "^There (?:was|were) \\d+ (?:incomplete tests?(?: suites?)?|(?:PHPUnit(?: test runner)? )?notices?):$" },
{ "regexp": "^(?:(\\s*(/.*|[A-Za-z]:[\\\\/].*):(\\d+)|(?!-+$|There (?:was|were) \\d+ .+:$|\\d+ tests? triggered \\d+ .+:$|OK(?: \\(\\d+ tests?, \\d+ assertions?\\)|, but (?:there were issues|some tests were skipped|incomplete, skipped, or risky tests)!)$|(?:FAILURES|ERRORS|WARNINGS)!$|Tests: \\d+(?:,|\\.?$)|PHPUnit \\d+\\.\\S+ by |Triggered by:$).*)|Triggered by:)$", "message": 1, "file": 2, "line": 3, "loop": true }
]
},
{
"owner": "phpunit-issue",
"pattern": [
{ "regexp": "^\\d+ tests? triggered \\d+ (?:PHP(?:Unit)? )?(error|warning|notice)s?:$", "severity": 1 },
{ "regexp": "^(?:\\d+\\)\\s)?(?:(\\s*(/.*|[A-Za-z]:[\\\\/].*):(\\d+)|(?!-+$|There (?:was|were) \\d+ .+:$|\\d+ tests? triggered \\d+ .+:$|OK(?: \\(\\d+ tests?, \\d+ assertions?\\)|, but (?:there were issues|some tests were skipped|incomplete, skipped, or risky tests)!)$|(?:FAILURES|ERRORS|WARNINGS)!$|Tests: \\d+(?:,|\\.?$)|PHPUnit \\d+\\.\\S+ by |Triggered by:$).*)|Triggered by:)$", "message": 1, "file": 2, "line": 3, "loop": true }
]
}
]