mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 19:45:11 +00:00
9 lines
404 B
Bash
9 lines
404 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
ROOT_PATH=$(git rev-parse --show-toplevel)
|
||
|
|
||
|
# Find files with includes not grouped together by first component of path
|
||
|
find $ROOT_PATH/dbms -name '*.h' -or -name '*.cpp' | while read file; do
|
||
|
[[ $(grep -oP '^#include <\w+' $file | uniq -c | wc -l) > $(grep -oP '^#include <\w+' $file | sort | uniq -c | wc -l) ]] && echo $file && grep -oP '^#include <\w+' $file | uniq -c;
|
||
|
done
|