blob: f100e41dbcb74322bf1ac02f0bb909911fa11ca0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
for file in *.cpp *.hpp *.h ; do
# non C-style headers
grep -Hn '#include\s*<[^.]\+>' "$file" | grep -v '<random>'
# forbidden STL containers
grep -Hn '\<unique_ptr\>' "$file"
grep -Hn '\<make_unique\>' "$file"
grep -Hn '\<shared_ptr\>' "$file"
grep -Hn '\<make_shared\>' "$file"
grep -Hn '\<vector\>' "$file"
grep -Hn '\<string\>[^.]' "$file" # [^.] is to ignore C's <string.h>
grep -Hn '\<pair\>' "$file"
grep -Hn '\<map\>' "$file"
grep -Hn '\<unordered_map\>' "$file"
done
exit 0
|