fixed #14638 - report errors for invalid suppression lines#8404
fixed #14638 - report errors for invalid suppression lines#8404firewave wants to merge 3 commits intodanmar:mainfrom
Conversation
| try { | ||
| std::istringstream istr1(suppression.fileName.substr(pos+1)); | ||
| istr1 >> suppression.lineNumber; | ||
| } catch (...) { | ||
| suppression.lineNumber = SuppressionList::Suppression::NO_LINE; | ||
| } |
There was a problem hiding this comment.
The try-catch did nothing because the stream was not set to throw exceptions.
| } | ||
|
|
||
| suppression.fileName = Path::simplifyPath(suppression.fileName); | ||
| // TODO: make this optional - do we even encounter this in production code? |
There was a problem hiding this comment.
Lines with newlines can/are not being supported via suppression files and the --suppress option so we should disable support in those cases. After that there is not much left which parses lines.
I will look further into this in a follow-up.
There was a problem hiding this comment.
They are used in the IPC data and could be used in cppcheck.cfg. In all other cases we should be able to disable this.
There was a problem hiding this comment.
The newlines were only recently introduced in #8169 which is a very unfortunate change. It would make more sense to preserve the previous : separator and make the additional fields separated by something like , or ;.
01632ab to
47b819c
Compare
|



No description provided.