Added a script to check for duplicate includes

This commit is contained in:
Alexey Milovidov 2019-02-10 20:00:29 +03:00
parent 09ee8816a1
commit fdf69f38c0

View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
ROOT_PATH=$(git rev-parse --show-toplevel)
# Find duplicate include directives
find $ROOT_PATH/dbms -name '*.h' -or -name '*.cpp' | while read file; do grep -P '^#include ' $file | sort | uniq -c | grep -v -P '^\s+1\s' && echo $file; done