cppclean
cppclean copied to clipboard
False positive when includes are not together in the .cpp file.
If the includes are not bunched together in the code, cppclean fails to identify some includes that are present and raises a warning.
Example:
#include "file.h"
#include <algorithm>
#include "file2.h"
#include "file3.h"
Error: file.cc: should #include header file 'file.h'
Same problem here.
With this example:
D:
└───testlib
└───src
└───testlib
└───test.cpp
└───test.h
test.h:
#pragma once
void Test();
test.cpp:
#include "testlib/test.h"
void Test()
{
}
If I run python "C:/Program Files/Python39/Scripts/cppclean" --include-path-non-system="D:/testlib/src" . from the src folder, I get the following result:
.\testlib\test.cpp: should #include header file '.\testlib\test.h'