3364720f34
Delegate code style validation to computers, they're better than human at it :) This commit adds a new `tools/validate-indentation.sh` script that errors when it finds an indented Dockerfile instruction, and enables the validation in the pep8 check. Also adjust the logic of `tools/validate-all-dockerfiles.sh` so that it doesn't stop on first errors but instead shows all of them. Fixes the remaining indentations in Dockerfiles. Change-Id: I53c0d38304cb4f6d64a5dfab67f70d69b3eae587
13 lines
209 B
Bash
Executable File
13 lines
209 B
Bash
Executable File
#!/bin/bash
|
|
|
|
RES=0
|
|
|
|
for dockerfile in "$@"; do
|
|
if grep -qE '^\s+[A-Z]+\s' "$dockerfile"; then
|
|
echo "ERROR: $dockerfile has indented Dockerfile instruction" >&2
|
|
RES=1
|
|
fi
|
|
done
|
|
|
|
exit $RES
|