mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Classify unrecognized command line options as an error
Contributed by STMicroelectronics Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
This commit is contained in:
parent
4d0eaacf4a
commit
27b8da4ecd
3 changed files with 11 additions and 0 deletions
|
@ -232,4 +232,13 @@ public class GCCErrorParserTests extends GenericErrorParserTests {
|
||||||
"unused parameter 'bitrate' [-Wunused-parameter]" },
|
"unused parameter 'bitrate' [-Wunused-parameter]" },
|
||||||
new String[] { GCC_ERROR_PARSER_ID });
|
new String[] { GCC_ERROR_PARSER_ID });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGccErrorMessages_UnrecognizedCommandLineOption() throws IOException {
|
||||||
|
runParserTest(new String[] { "arm-none-eabi-gcc: error: unrecognized command-line option '--foobar'" }, 1, // errors
|
||||||
|
0, //warnings
|
||||||
|
0, //infos
|
||||||
|
null, new String[] { "unrecognized command-line option '--foobar'" },
|
||||||
|
new String[] { GCC_ERROR_PARSER_ID });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,7 @@ CDTGNUCErrorParser.regex.ParseErrorBefore=(.*?):(\\d+):(\\d+:)? (parse error bef
|
||||||
CDTGNUCErrorParser.regex.ErrorUndeclared=(.*?):(\\d+):(\\d+:)? [Ee]rror: ([`'"](.*)['"] undeclared .*)
|
CDTGNUCErrorParser.regex.ErrorUndeclared=(.*?):(\\d+):(\\d+:)? [Ee]rror: ([`'"](.*)['"] undeclared .*)
|
||||||
CDTGNUCErrorParser.regex.ErrorConflictingTypesFor=(.*?):(\\d+):(\\d+:)? [Ee]rror: (conflicting types for .*[`'"](.*)['"].*)
|
CDTGNUCErrorParser.regex.ErrorConflictingTypesFor=(.*?):(\\d+):(\\d+:)? [Ee]rror: (conflicting types for .*[`'"](.*)['"].*)
|
||||||
CDTGNUCErrorParser.regex.GenericError=(.*?):(\\d+):(\\d+:)?\\s*(([Ee]rror)|(ERROR)): (.*)
|
CDTGNUCErrorParser.regex.GenericError=(.*?):(\\d+):(\\d+:)?\\s*(([Ee]rror)|(ERROR)): (.*)
|
||||||
|
CDTGNUCErrorParser.regex.InvocationError=(.*?): (([Ee]rror)|(ERROR)): (.*)
|
||||||
CDTGNUCErrorParser.regex.DefinedButNotUsed=(.*?):(\\d+):(\\d+:)? [Ww]arning: ([`'"](.*)['"] defined but not used.*)
|
CDTGNUCErrorParser.regex.DefinedButNotUsed=(.*?):(\\d+):(\\d+:)? [Ww]arning: ([`'"](.*)['"] defined but not used.*)
|
||||||
CDTGNUCErrorParser.regex.WarningConflictingTypesFor=(.*?):(\\d+):(\\d+:)? [Ww]arning: (conflicting types for .*[`'"](.*)['"].*)
|
CDTGNUCErrorParser.regex.WarningConflictingTypesFor=(.*?):(\\d+):(\\d+:)? [Ww]arning: (conflicting types for .*[`'"](.*)['"].*)
|
||||||
CDTGNUCErrorParser.regex.GenericWarning=(.*?):(\\d+):(\\d+:)?\\s*(([Ww]arning)|(WARNING)): (.*)
|
CDTGNUCErrorParser.regex.GenericWarning=(.*?):(\\d+):(\\d+:)?\\s*(([Ww]arning)|(WARNING)): (.*)
|
||||||
|
|
|
@ -241,6 +241,7 @@
|
||||||
regex="%CDTGNUCErrorParser.regex.GenericError"
|
regex="%CDTGNUCErrorParser.regex.GenericError"
|
||||||
severity="Error"
|
severity="Error"
|
||||||
variable-expr="$3"/>
|
variable-expr="$3"/>
|
||||||
|
<pattern description-expr="$5" eat-processed-line="true" file-expr="" line-expr="" regex="%CDTGNUCErrorParser.regex.InvocationError" severity="Error" variable-expr=""/>
|
||||||
<pattern description-expr="$7" eat-processed-line="true" file-expr="$1" line-expr="$2" regex="%CDTGNUCErrorParser.regex.GenericWarning" severity="Warning"/>
|
<pattern description-expr="$7" eat-processed-line="true" file-expr="$1" line-expr="$2" regex="%CDTGNUCErrorParser.regex.GenericWarning" severity="Warning"/>
|
||||||
<pattern description-expr="$10" eat-processed-line="true" file-expr="$1" line-expr="$2" regex="%CDTGNUCErrorParser.regex.GenericInfo" severity="Info"/>
|
<pattern description-expr="$10" eat-processed-line="true" file-expr="$1" line-expr="$2" regex="%CDTGNUCErrorParser.regex.GenericInfo" severity="Info"/>
|
||||||
<pattern description-expr="$4" eat-processed-line="true" file-expr="$1" line-expr="$2" regex="%CDTGNUCErrorParser.regex.OtherError" severity="Error"/>
|
<pattern description-expr="$4" eat-processed-line="true" file-expr="$1" line-expr="$2" regex="%CDTGNUCErrorParser.regex.OtherError" severity="Error"/>
|
||||||
|
|
Loading…
Add table
Reference in a new issue