Skip to content

Misra severity#2674

Merged
danmar merged 2 commits intocppcheck-opensource:masterfrom
carlolars:misra-severity
Jun 8, 2020
Merged

Misra severity#2674
danmar merged 2 commits intocppcheck-opensource:masterfrom
carlolars:misra-severity

Conversation

@carlolars
Copy link
Copy Markdown
Contributor

Implemented the option --severity for misra.py to set a custom severity string for all misra warnings.

The severity string is not limited to info, warning, error etc but it will accept any string, so you could use for example misra-warning.

@danmar danmar merged commit 2abf542 into cppcheck-opensource:master Jun 8, 2020
@carlolars carlolars deleted the misra-severity branch June 8, 2020 16:07
@amai2012
Copy link
Copy Markdown
Collaborator

amai2012 commented Jun 8, 2020

@danmar IMHO add-ons should behave the same way as the cppcheck core.
So I'd expect the same severities, compliance to https://github.com/danmar/cppcheck/blob/master/cppcheck-errors.rng etc.

@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Jun 8, 2020

yes.. I think that misra-warning was a theoretical suggestion. This was added to allow setting the severity to warning in a use case as far as I know..

@carlolars
Copy link
Copy Markdown
Contributor Author

yes.. I think that misra-warning was a theoretical suggestion. This was added to allow setting the severity to warning in a use case as far as I know..

Yes misra-warning was just an example. I think most would just use error or warning, in my case it was the gcc problem matcher that didn't like style.

My initial thought behind not restricting the string was that you might want to tag misra warnings different to distinguish them, but when I think of it now it would be just as easy to search for the error-id which always starts with misra-.

Let me know if you would like me to change this.

@amai2012
Copy link
Copy Markdown
Collaborator

I'd be in favor of restricting it.
@danmar What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants