cppcheck: Provide consistent reason formatting for all cppcheck-suppresses#6024
cppcheck: Provide consistent reason formatting for all cppcheck-suppresses#6024x3ro merged 1 commit intoRIOT-OS:masterfrom
Conversation
|
Does this even work consistently? To my experience |
cpu/x86/x86_pci.c
Outdated
| bus, dev, fun, vendor_name, device_name, baseclass_name, subclass_name, class.revision_id); | ||
|
|
||
| /* cppcheck-suppress memleakOnRealloc */ | ||
| /* c1ppcheck-suppress memleakOnRealloc TODO */ |
There was a problem hiding this comment.
I used that for disabling the suppressions and checking whether cppcheck actually complained and forgot to take it out. But since its one of the TODOs it doesn't matter that much :) Will fix once I have a good reason to add!
|
Please properly prefix both PR and commit message ;-) |
|
Would this be prefixed doc? |
how about |
|
Regarding whether or not it works consistently: seems to work with the version I had and with what Murdock uses. I think the "directly below" thing is correct, but it must be directly below the comment? That's my best guess :D |
I don't know why, but for some reason has cppcheck set the error code for modified files to 0, so there are actually errors: The readability issue is due to your |
|
readability issue? the error makes a lot of sense since I accidentally disabled that check (what we talked about above) |
The errors are all in one line (its not just the error we talked about ;-)) |
|
Oooh okay, I didn't see that, sorry. Thanks, I'll check it out! |
|
Is this WIP? |
|
Needs rebase |
|
Ping? |
|
ping? |
49d66dc to
0a8bb29
Compare
0a8bb29 to
6998ffb
Compare
I tried to tackle #1895 by adding a rationale to all suppressions that were not explained before, and also re-formatted all existing explanations to match the format:
I would propose this format to be our "standard format", since previously everyone kind of did their own thing which sometimes made it hard to see where the reasoning was and which suppression it belonged to. I also removed suppressions which my current cppcheck (1.76.1) did not complain about. Let's see what Murdock says.
There are also two suppressions marked with
TODO, I'd appreciate help trying to explain them properly :)Fixes #1895
PS: I've added a guideline regarding the format to the coding conventions