- C++
- S955
- Does not match to any provided reference
- SonarQube for Visual Studio 8.11.0.11944
- In connected mode with Sonar Cloud
Easy to reproduce:
#include "anyfile.h"//comment
This line raises a S955 error. When inserting a space between the second double quote and the double slash, no error.
I suppose you tokenize the line by using space as sperator, and find // in what you consider as the filename (the second token). And then raise an errror according the 16-2-4 rule from MISRA C++:2008.
I know, there should be a space, but your detection is anyway faulty.