[PATCH] D152589: Add readability test for not allowing relative includes
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 9 16:09:32 PDT 2023
Eugene.Zelenko added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/readability/AbsoluteIncludesOnlyCheck.cpp:16
+
+
+namespace clang::tidy::readability {
----------------
Excessive newline.
================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:187
+
+Finds relative includes in your code and warn about them. for example
+don't use "readability/absolute-includes-only", use <clang-tidy/checks/readability/absolute-includes-only>
----------------
Please make it as first statement in documentation.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/absolute-includes-only.rst:8
+
+Meaning this check disallow the use of quote includes (""), and allow only angular brackets includes (<>).
+
----------------
Please highlight `""` and `<>` with double back-ticks. Please follow 80-characters limit.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/absolute-includes-only.rst:17
+
+ // #include "utility.hpp" // Wrong.
+ // #include <utility.hpp> // Wrong.
----------------
Please split example on right and wrong blocks.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/absolute-includes-only.cpp:14
+
+
+#include <s.h>
----------------
Excessive newline.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/absolute-includes-only.cpp:18
+#include <string>
+
----------------
Ditto.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152589/new/
https://reviews.llvm.org/D152589
More information about the cfe-commits
mailing list