mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 04:27:07 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user