From ead6a1bf1325628021e9f4e7eb5c1b8b7548b700 Mon Sep 17 00:00:00 2001 From: dcarrillo Date: Sat, 7 Mar 2020 19:08:09 +0100 Subject: [PATCH] Add linting at github actions --- .github/workflows/main.yml | 6 ++++++ Dockerfile | 3 ++- build.sh | 1 + tests/test.sh | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 74ffc85..d80896f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,12 @@ jobs: steps: - uses: actions/checkout@v1 + - name: shellcheck + uses: ludeeus/action-shellcheck@master + + - name: hadolint + uses: brpaz/hadolint-action@master + - name: Build image run: ./build.sh diff --git a/Dockerfile b/Dockerfile index 4c4bfcb..b635332 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,8 @@ ARG ARG_NGX_GEOIP2_VERSION ENV NGINX_VERSION $ARG_NGINX_VERSION ENV NGX_GEOIP2_VERSION $ARG_NGX_GEOIP2_VERSION -RUN CONFIG="\ +# hadolint ignore=DL3018,DL3003,SC2086 +RUN CONFIG=" \ --add-module=/tmp/ngx_http_geoip2_module-$NGX_GEOIP2_VERSION \ --with-stream \ --with-http_ssl_module \ diff --git a/build.sh b/build.sh index ed29c0e..f0be79d 100755 --- a/build.sh +++ b/build.sh @@ -2,6 +2,7 @@ set -e +# shellcheck disable=SC1090 . "$(dirname "$0")"/conf.env while [ $# -gt 0 ]; do diff --git a/tests/test.sh b/tests/test.sh index 3ece44e..adf057d 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -6,11 +6,13 @@ if [ x"$DEBUG" = xtrue ]; then set -x fi +# shellcheck disable=SC2039 trap _catch_err ERR trap _cleanup EXIT ALPINE_VERSION="alpine:3.11" LOCAL_DIR="$(cd "$(dirname "$0")" ; pwd -P)" +# shellcheck disable=SC1090 . "$LOCAL_DIR"/../conf.env TMP_DIR=$(mktemp -d)