mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Added a script to check for duplicate includes
This commit is contained in:
parent
09ee8816a1
commit
fdf69f38c0
6
utils/check-style/check-duplicate-includes.sh
Executable file
6
utils/check-style/check-duplicate-includes.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user