Replace tab with 4 space in Java files (#5298)

* replace tab with 4 space in java files

* revise error message in shell script

* print result before checking

* revise grep expression
This commit is contained in:
wing328
2017-04-02 16:05:40 +08:00
committed by GitHub
parent ca6b5d09d0
commit 071c012f85
10 changed files with 163 additions and 165 deletions

View File

@@ -1,10 +1,12 @@
#!/bin/bash
# grep for \t in the generators
grep -RUIl $'\t$' modules/swagger-codegen/src/main/java/io/swagger/codegen/*.java
RESULT=`find modules/swagger-codegen/src/ -name "*.java" | xargs grep $'\t'`
if [ $? -ne 1 ]; then
echo "Generators (Java class files) contain tab '/t'. Please remove it and try again."
echo -e "$RESULT"
if [ "$RESULT" != "" ]; then
echo "Java files contain tab '\\t'. Please remove it and try again."
exit 1;
fi