openapi-generator/bin/utils/detect_tab_in_java_class.sh
wing328 071c012f85 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
2017-04-02 16:05:40 +08:00

13 lines
260 B
Bash
Executable File

#!/bin/bash
# grep for \t in the generators
RESULT=`find modules/swagger-codegen/src/ -name "*.java" | xargs grep $'\t'`
echo -e "$RESULT"
if [ "$RESULT" != "" ]; then
echo "Java files contain tab '\\t'. Please remove it and try again."
exit 1;
fi