You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The check for build/include_subdir only checks that a subdirectory is present at all; it does not check that it's complete or correct, and it does not allow for top level headers that simply don't have a subdirectory. E.g. if the file structure was
src
|
|-- main.cpp
|
|-- utils.hpp
and we had a main.cpp like
#include"utils.hpp"intmain() {
}
this would raise an error, even though everything is correct.
Did you encounter this error? Include the directory when naming header files [build/include_subdir]?
I have some subdirectories each corresponding to different subprojects, and including header files in these subprojects will raise this error even though I run cpplint just under the very subdirectory.
If I include the header files like ./feature1.h in feature1.c, cpplint will raise should include its header file . Relative paths like . and .. are not allowed. [build/include].
These two errors don't make sense as my root directory should be the subdirectory.
Activity
A-lexisL commentedon Oct 25, 2025
Did you encounter this error?
Include the directory when naming header files [build/include_subdir]?I have some subdirectories each corresponding to different subprojects, and including header files in these subprojects will raise this error even though I run cpplint just under the very subdirectory.
If I include the header files like
./feature1.hinfeature1.c, cpplint will raiseshould include its header file . Relative paths like . and .. are not allowed. [build/include].These two errors don't make sense as my root directory should be the subdirectory.