Skip to content

Commit a77fedf

Browse files
authored
Add optional build parameter (#157)
* Add optional build parameter * Skip vs. run * explicit set to true for static analysis * adding test logging * boolean case sensitivity
1 parent d5c2653 commit a77fedf

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ stages:
5252
- template: templates/build.yaml
5353
parameters:
5454
srcFolder: 'SysmonForLinux'
55+
runStaticAnalysis: true

templates/build.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ parameters:
22
- name: srcFolder
33
type: string
44
default: ''
5+
- name: runStaticAnalysis
6+
type: boolean
57

68
steps:
79
- script: |
@@ -25,7 +27,11 @@ steps:
2527
./diag_script.sh&
2628
fi
2729
# -------------------------- TEMP DIAG END ----------------------------------------------------
28-
rm -rf build && mkdir build && cd build
29-
scan-build cmake ..
30-
scan-build -v --status-bugs -o verifier_result --exclude ../test --exclude openssl -disable-checker cplusplus.NewDelete,cplusplus.NewDeleteLeaks make
30+
if [ ${{ parameters.runStaticAnalysis }} == True ]; then
31+
rm -rf build && mkdir build && cd build
32+
scan-build cmake ..
33+
scan-build -v --status-bugs -o verifier_result --exclude ../test --exclude openssl -disable-checker cplusplus.NewDelete,cplusplus.NewDeleteLeaks make
34+
else
35+
echo "Skipping static code analysis."
36+
fi
3137
displayName: "Static analysis of Sysmon source code"

0 commit comments

Comments
 (0)