From 1e3006c9ecd9f36b35b7a40074c023429b758e88 Mon Sep 17 00:00:00 2001 From: Stanislas Lange Date: Mon, 3 Aug 2020 17:50:40 +0200 Subject: [PATCH] Shellcheck: move excludes to action env --- .github/workflows/lint.yml | 28 +++++++++++----------------- openvpn-install.sh | 3 --- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 34e2736..7aaf095 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,10 +1,4 @@ -on: - push: - branches: - - master - pull_request: - branches: - - master +on: push name: Lint @@ -12,17 +6,17 @@ jobs: shellcheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: shellcheck - uses: ludeeus/action-shellcheck@0.5.0 - env: - SHELLCHECK_OPTS: -e SC1091,SC2164,SC2034,SC1072,SC1073,SC1009 + - uses: actions/checkout@v2 + - name: shellcheck + uses: ludeeus/action-shellcheck@0.5.0 + env: + SHELLCHECK_OPTS: -e SC1091,SC2164,SC2034,SC1072,SC1073,SC1009 shfmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: shfmt - uses: bltavares/actions/shfmt@master - env: - SHFMT_ARGS: -d + - uses: actions/checkout@v2 + - name: shfmt + uses: bltavares/actions/shfmt@master + env: + SHFMT_ARGS: -d diff --git a/openvpn-install.sh b/openvpn-install.sh index c0fe624..685f607 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -18,7 +18,6 @@ function tunAvailable() { function checkOS() { if [[ -e /etc/debian_version ]]; then OS="debian" - # shellcheck disable=SC1091 source /etc/os-release if [[ $ID == "debian" || $ID == "raspbian" ]]; then @@ -51,7 +50,6 @@ function checkOS() { fi fi elif [[ -e /etc/system-release ]]; then - # shellcheck disable=SC1091 source /etc/os-release if [[ $ID == "fedora" ]]; then OS="fedora" @@ -1206,7 +1204,6 @@ function removeUnbound() { function removeOpenVPN() { echo "" - # shellcheck disable=SC2034 read -rp "Do you really want to remove OpenVPN? [y/n]: " -e -i n REMOVE if [[ $REMOVE == 'y' ]]; then # Get OpenVPN port from the configuration