CodeCommitsIssuesPull requestsActionsInsightsSecurity
e3ed311273f8c9905a658148f852b3c2188c4795

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

utils/check-style/check-duplicate-includes.sh

6lines · modecode

1#!/usr/bin/env bash
2
3ROOT_PATH=$(git rev-parse --show-toplevel)
4
5# Find duplicate include directives
6find $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