Restrict check of right of code comments to #define in case of preprocessor lines

This commit is contained in:
Johanne Schock 2020-03-08 22:24:27 +01:00 committed by patacongo
parent 46b8347217
commit fbe65a2d7d

View File

@ -941,12 +941,15 @@ int main(int argc, char **argv, char **envp)
ncomment++;
}
rhcomment = n;
if (prevrhcmt != 0 && n != prevrhcmt)
if (!strncmp(&line[ii], "define", 6))
{
rhcomment = prevrhcmt;
WARN("Wrong column position of comment right of code",
lineno, n);
rhcomment = n;
if (prevrhcmt != 0 && n != prevrhcmt)
{
rhcomment = prevrhcmt;
WARN("Wrong column position of comment right of code",
lineno, n);
}
}
}
}