Skip to content

Commit

Permalink
Add optional build parameter (#157)
Browse files Browse the repository at this point in the history
* Add optional build parameter

* Skip vs. run

* explicit set to true for static analysis

* adding test logging

* boolean case sensitivity
  • Loading branch information
MarioHewardt authored Dec 6, 2023
1 parent d5c2653 commit a77fedf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ stages:
- template: templates/build.yaml
parameters:
srcFolder: 'SysmonForLinux'
runStaticAnalysis: true
12 changes: 9 additions & 3 deletions templates/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ parameters:
- name: srcFolder
type: string
default: ''
- name: runStaticAnalysis
type: boolean

steps:
- script: |
Expand All @@ -25,7 +27,11 @@ steps:
./diag_script.sh&
fi
# -------------------------- TEMP DIAG END ----------------------------------------------------
rm -rf build && mkdir build && cd build
scan-build cmake ..
scan-build -v --status-bugs -o verifier_result --exclude ../test --exclude openssl -disable-checker cplusplus.NewDelete,cplusplus.NewDeleteLeaks make
if [ ${{ parameters.runStaticAnalysis }} == True ]; then
rm -rf build && mkdir build && cd build
scan-build cmake ..
scan-build -v --status-bugs -o verifier_result --exclude ../test --exclude openssl -disable-checker cplusplus.NewDelete,cplusplus.NewDeleteLeaks make
else
echo "Skipping static code analysis."
fi
displayName: "Static analysis of Sysmon source code"

0 comments on commit a77fedf

Please sign in to comment.