Browse Source

Fix/shellcheck (#2801)

* Downgrade image
Jaap Marcus 3 years ago
parent
commit
2609b6a56a
2 changed files with 4 additions and 16 deletions
  1. 2 8
      .drone.yml
  2. 2 8
      test/shellcheck.sh

+ 2 - 8
.drone.yml

@@ -106,7 +106,7 @@ concurrency:
 
 steps:
   - name: Shellcheck
-    image: koalaman/shellcheck-alpine
+    image: koalaman/shellcheck-alpine:v0.8.0
     commands:
     - ./test/shellcheck.sh
   - name: PHP 8.1
@@ -116,12 +116,6 @@ steps:
 
 trigger:
       event: [ pull_request, push ]
-      ref:
-      - refs/heads/staging/*
-      - refs/heads/beta
-      - refs/heads/release
-      - refs/heads/main
-      - refs/pull/*/head
 
 ---
 kind: pipeline
@@ -173,4 +167,4 @@ trigger:
 
 ---
 kind: signature
-hmac: a191a477aa337f2efff534022164906ff20ef2b6340ec808d128c09a06d7eaa3
+hmac: f89a311b0f023c6ee92dbdb56bcd23ec663ef9242269a6b70c1c222bac4380ee

+ 2 - 8
test/shellcheck.sh

@@ -22,11 +22,12 @@
 
 #set default value for error
 err=0;
+shellcheck --version
 
 files=$(grep -rlE '#!/bin/(bash|sh)' ./ | grep -vE '\.(git|j2$|md$)'); 
 for file in $files; do 
     echo "Linting: $file"
-    shellcheck -x "$file" --severity="error" -e "SC2086,SC2002,SC2153,SC2181,SC2153,SC2129,SC2016,SC2196,SC1090,SC2031,SC2010,SC2143,SC2046" 
+    shellcheck -x "$file" --severity="error"
     if [ $? -gt 0 ]; then 
        printf "%s: \033[0;31m Fail \033[0m\n" "$file"
        err=1
@@ -40,10 +41,3 @@ if [ $err == 1 ];
 then 
 exit "$err";
 fi
-
-for file in $files; do 
-    echo "Linting: $file"
-    shellcheck -x "$file" -e "SC2086,SC2002,SC2153,SC2181,SC2153,SC2129,SC2016,SC2196,SC1090,SC2031,SC2010,SC2143,SC2046" 
-done
-
-exit "$err";