cppclean icon indicating copy to clipboard operation
cppclean copied to clipboard

False-positive when using mixed folder separator style (backslash and forward slash).

Open vaillancourt opened this issue 5 years ago • 1 comments

We have issues with false positives "bla/folder/src.cpp" should #include "bla/folder/src.h". This is due to us being on Windows, where we supply folders with backslashes (D:\dev\project\src\folder\), but we include files using forward slashes (#include "folder/file.h").

This can easily be fixed by wrapping every path that is imported into the tool with os.path.normpath.

This unfortunately breaks the tests on that line:

test/foo.h:221: unable to find 'dir//bar.h'

What's the intention behind using the double slashes here? Could we change the tests using a single slash instead?

vaillancourt avatar May 17 '19 14:05 vaillancourt

Your suggestion seems reasonable to me.

myint avatar May 24 '19 15:05 myint