瀏覽代碼

Excluded static analysis tests

Bob Mottram 7 年之前
父節點
當前提交
6e84c5fdac
共有 1 個檔案被更改,包括 5 行新增3 行删除
  1. 5
    3
      src/freedombone-tests

+ 5
- 3
src/freedombone-tests 查看文件

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