I suggest you ...

Ability to change message categories

Support an option that allows the user to change the message category of a message from, for example, Warning to Error.

4 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

2 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...
  • Ralf Hain commented  ·   ·  Flag as inappropriate

    This could be accomplished by sed, eg:
    sed -i -e 's|Note 960|Error 960|' output.lnt
    Of cause, this depends on the -format option, so your suggestion would still make some sense.
    Of cause, sed is not available under windows per default -> cygwin ...

    Here a more complex of sed-application:

    # 'back to the sixties'
    # ie 'Drill down' the collective message 960 MISRA X.Y to 30XY. (1960 MISRA X.Y.Z to 4XYZ)
    sed -i -e 's|Note 96[01]\(.*Rule \)\([0-9]*\)\.\([0-9]\)|Warning 30\2\3\1\2\.\3|' output.lnt
    sed -i -e 's|Note 196[03]\(.*Rule \)\([0-9]*\)-\([0-9]*\)-\([0-9]*\)|Warning 4\2\3\4\1\2-\3-\4|' output.lnt
    #
    # possible line no 1960 must not be substituded
    # -> not format-agnostic, different for XML and other formats.
    # Here for XML format:
    # 's|<code>96[01]<\(.*Rule \)\([0-9]*\)\.\([0-9]\)|<code>30\2\3<\1\2\.\3|'
    # 's|<code>196[03]<\(.*Rule \)\([0-9]*\)-\([0-9]*\)-\([0-9]*\)|<code>4\2\3\4<\1\2-\3-\4|'
    #
    # You also might want to replace "Note" by "Warning" in the sed-substitution;
    # this rises the importance of the MISRA-issues a bit.

Feedback and Knowledge Base