新来的铿锵和铿锵整洁在这里。
我有一个具有这种结构的项目:
project/
- build/
- cmake/
- component1/
- src/
- someFile.cpp
- someFile2.cpp
- someFile.hpp
- someFile2.hpp
- component2/
- etc...
-
当我使用 clang-tidy 通过project/component1/
此命令浏览所有文件时:clang-tidy project/component1/src/* -checks=-*,clang-analyzer-*,-clang-analyzer-alpha*
它最终会抛出这样的错误:
$HOME/project/component1/src/someFile.cpp:18:10: error: 'project/component1/someFile.hpp' file not found [clang-diagnostic-error]
\#include "component1/someFile.hpp"