cppclean
cppclean copied to clipboard
False-positive when using mixed folder separator style (backslash and forward slash).
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?
Your suggestion seems reasonable to me.