summaryrefslogtreecommitdiffstats
path: root/check_java_packages
diff options
context:
space:
mode:
Diffstat (limited to 'check_java_packages')
-rwxr-xr-xcheck_java_packages6
1 files changed, 6 insertions, 0 deletions
diff --git a/check_java_packages b/check_java_packages
index f90e520..1b9b5f8 100755
--- a/check_java_packages
+++ b/check_java_packages
@@ -33,6 +33,12 @@ find . -name *.java | while read file; do
echo -e "$file : $RED$PACKAGE$RESET -> $GREEN$CORRECT$RESET";
touch $ERRORS
fi
+ for IMPORT in $(cat $file | sed -n 's/import\s\+.*\.\(.*\);/\1/p'); do
+ cat $file | grep $IMPORT | grep -qv import
+ if [ $? -ne 0 ]; then
+ echo -e "$file : import $RED$IMPORT$RESET might be useless";
+ fi
+ done
done
if [ -r "$ERRORS" ]; then