mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Added a script to check for ungrouped includes
This commit is contained in:
parent
ba3cb83a84
commit
57e038c754
8
utils/check-style/check-ungrouped-includes.sh
Executable file
8
utils/check-style/check-ungrouped-includes.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/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
|
Loading…
Reference in New Issue
Block a user