mirror of https://github.com/lukechilds/node.git
Browse Source
Checks that `using` statements in src/*.cc are properly sorted and actually used.v0.11.4-release
Ben Noordhuis
12 years ago
1 changed files with 15 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||
#!/bin/sh |
|||
|
|||
cd `dirname "$0"`/../ |
|||
|
|||
for FILE in src/*.cc; do |
|||
sed -rne 's/^using (\w+::\w+);$/\1/p' $FILE | sort -c || echo "in $FILE" |
|||
done |
|||
|
|||
for FILE in src/*.cc; do |
|||
for IMPORT in `sed -rne 's/^using (\w+)::(\w+);$/\2/p' $FILE`; do |
|||
if ! sed -re '/^using (\w+)::(\w+);$/d' $FILE | grep -q "$IMPORT"; then |
|||
echo "$IMPORT unused in $FILE" |
|||
fi |
|||
done |
|||
done |
Loading…
Reference in new issue