formatting files according to standard (#1619)

* added EditorConfig linting
* adding `eclint` as Travis script target
* re-adjusted .pem files to have a newline
This commit is contained in:
Georg Lauterbach 2020-09-24 14:54:21 +02:00 committed by GitHub
parent 9f7414d95f
commit a0791ef457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 178 additions and 185 deletions

View file

@ -19,12 +19,8 @@ build:
backup:
# if backup directories exist, clean hasn't been called, therefore
# we shouldn't overwrite it. It still contains the original content.
@ if [ ! -d config.bak ]; then\
cp -rp config config.bak;\
fi
@ if [ ! -d testconfig.bak ]; then\
cp -rp test/config testconfig.bak;\
fi
@ if [ ! -d config.bak ]; then cp -rp config config.bak; fi
@ if [ ! -d testconfig.bak ]; then cp -rp test/config testconfig.bak; fi
generate-accounts:
@ docker run --rm -e MAIL_USER=user1@localhost.localdomain -e MAIL_PASS=mypassword -t $(NAME) /bin/sh -c 'echo "$$MAIL_USER|$$(doveadm pw -s SHA512-CRYPT -u $$MAIL_USER -p $$MAIL_PASS)"' > test/config/postfix-accounts.cf
@ -173,3 +169,13 @@ shellcheck:
else\
echo -e '\nSuccess' ;\
fi
eclint:
@ echo -e "Testing file formatting according to .editorconfig\n"
@ printf "Version %s\n\n" "$$(/usr/bin/eclint --version)"
@ if /usr/bin/eclint -exclude "\.bats$$" | grep .; then\
echo -e "\nError" ;\
exit 1 ;\
else\
echo -e '\nSuccess' ;\
fi