This enforces parts of the project header include guidelines (added by @sipa in #10575).
Example run:
0$ git diff
1diff --git a/src/warnings.cpp b/src/warnings.cpp
2index c52a1fd..d8994dd 100644
3--- a/src/warnings.cpp
4+++ b/src/warnings.cpp
5@@ -5,6 +5,8 @@
6
7 #include <sync.h>
8 #include <clientversion.h>
9+#include <string>
10 #include <util.h>
11 #include <warnings.h>
12+#include <util.h>
13
14diff --git a/src/warnings.h b/src/warnings.h
15index e8e982c..8d2252e 100644
16--- a/src/warnings.h
17+++ b/src/warnings.h
18@@ -7,6 +7,7 @@
19 #define BITCOIN_WARNINGS_H
20
21 #include <stdlib.h>
22 #include <string>
23+#include <stdlib.h>
24
25 void SetMiscWarning(const std::string& strWarning);
26$ contrib/devtools/lint-includes.sh
27Duplicate include(s) in src/warnings.h:
28#include <stdlib.h>
29
30Include(s) from src/warnings.h duplicated in src/warnings.cpp:
31#include <string>
32
33Duplicate include(s) in src/warnings.cpp:
34#include <util.h>
35$ echo $?
361
37$ git checkout .
38$ contrib/devtools/lint-includes.sh
39$ echo $?
400