mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 17:44:23 +00:00
7 lines
308 B
Bash
Executable File
7 lines
308 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
ROOT_PATH=$(git rev-parse --show-toplevel)
|
|
|
|
# Find duplicate include directives
|
|
find $ROOT_PATH/{src,base,programs,utils} -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 | sed '/^[[:space:]]*$/d'
|