Hi Stefano,
On 09/10/2023 23:19, Stefano Stabellini wrote:
I am not sure this is better. This is a long line to read. But this is a
personal opinion.
On the technical side, can we easily teach a tool to format this kind of
exception? If not, then this should not be an exception we should implement.
I am not sure I understand what you mean by "can we easily teach a tool
to format this kind of exception". Do you mean whether we can teach a
tool to interpret a multiline statement as a single statement?
Sorry for the wording was not clear. I was referring to tools formatting
the code (e.g. clang-format). Hopefully, at some point, we will finally
have a way to automatically format the code. So we need a coding style
that can be easily be checked.
It is not clear to me whether your proposed exception would work. We may
have to allow longer lines (and this has drawback).
/* cppcheck tag */
line1
/* cppcheck tag */
line2
/* cppcheck tag */
line3
and that would end up changing the line numbers in the source files so
the cppcheck report wouldn't match with the original line numbers any
longer
Would cppcheck accepts tag at the end of the line? If so, the following
would not modify the line count:
/* cppcheck tag */
line1 /* added cppcheck tag */
line2 /* added cppcheck tag */
line3 /* added cppcheck tag */
Cheers,
--
Julien Grall