diff --git a/.editorconfig b/.editorconfig index f2a3982..0d0f94a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,6 +10,9 @@ trim_trailing_whitespace = true indent_style = space indent_size = 4 +[*.expect] +insert_final_newline = false; + [*.md] max_line_length = 80 diff --git a/cs2pr b/cs2pr index 55611d7..5d58d05 100755 --- a/cs2pr +++ b/cs2pr @@ -144,6 +144,7 @@ function relativePath($path) function annotateType($type, $noticeAsWarning) { + $type = strtolower($type); if (in_array($type, array('error', 'failure'))) { return 'error'; } diff --git a/tests/errors/mixed-case.expect b/tests/errors/mixed-case.expect new file mode 100644 index 0000000..7bd0c8f --- /dev/null +++ b/tests/errors/mixed-case.expect @@ -0,0 +1,3 @@ +::error file=redaxo\src\addons\2factor_auth\boot.php,line=6::Call to static method getInstance() on an unknown class rex_one_time_password. +::error file=redaxo\src\addons\2factor_auth\boot.php,line=9::Call to static method getInstance() on an unknown class rex_minibar. +::error file=redaxo\src\addons\2factor_auth\lib\one_time_password.php,line=0::Class rex_one_time_password was not found while trying to analyse it - autoloading is probably not configured properly. \ No newline at end of file diff --git a/tests/errors/mixed-case.xml b/tests/errors/mixed-case.xml new file mode 100644 index 0000000..da733d9 --- /dev/null +++ b/tests/errors/mixed-case.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/tests/tests.php b/tests/tests.php index 1ca49aa..2158b6b 100644 --- a/tests/tests.php +++ b/tests/tests.php @@ -58,3 +58,5 @@ function testXml($xmlPath, $expectedExit, $expectedOutput = null, $options = '') testXml(__DIR__.'/noerrors/only-header.xml', 0, file_get_contents(__DIR__.'/noerrors/only-header.expect')); testXml(__DIR__.'/noerrors/only-header-php-cs-fixer.xml', 0, file_get_contents(__DIR__.'/noerrors/only-header-php-cs-fixer.expect')); + +testXml(__DIR__.'/errors/mixed-case.xml', 1, file_get_contents(__DIR__.'/errors/mixed-case.expect'));