Browse Source

Excluded static analysis tests

Bob Mottram 7 years ago
parent
commit
6e84c5fdac
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      src/freedombone-tests

+ 5
- 3
src/freedombone-tests View File

@@ -70,11 +70,13 @@ function test_static_analysis {
70 70
         apt-get -yq install shellcheck
71 71
     fi
72 72
 
73
+    STATIC_ANALYSIS_EXCLUDED='SC2034,SC1090'
74
+
73 75
     FILES="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-*"
74 76
 
75 77
     for filename in $FILES
76 78
     do
77
-        if ! shellcheck --exclude SC2034,SC1090 "$filename"; then
79
+        if ! shellcheck --exclude "$STATIC_ANALYSIS_EXCLUDED" "$filename"; then
78 80
             echo ''
79 81
             echo $"${filename} failed static analysis"
80 82
             exit 24687242
@@ -85,7 +87,7 @@ function test_static_analysis {
85 87
 
86 88
     for filename in $FILES
87 89
     do
88
-        if ! shellcheck --exclude SC2034,SC1090 "$filename"; then
90
+        if ! shellcheck --exclude "$STATIC_ANALYSIS_EXCLUDED" "$filename"; then
89 91
             echo ''
90 92
             echo $"${filename} failed static analysis"
91 93
             exit 3857395935
@@ -100,7 +102,7 @@ function test_static_analysis {
100 102
            continue
101 103
         fi
102 104
 
103
-        if ! shellcheck --exclude SC2034,SC1090 "$filename"; then
105
+        if ! shellcheck --exclude "$STATIC_ANALYSIS_EXCLUDED" "$filename"; then
104 106
             echo ''
105 107
             echo $"${filename} failed static analysis"
106 108
             exit 784243468435