mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-03 22:54:39 +00:00
The GH security model restricts comment posting from PR actions. StaticAnalysis has added support for pull_request_target to mitigate risks while still allowing comments by the bot. Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
43 lines
953 B
YAML
43 lines
953 B
YAML
|
|
name: Static Analysis
|
|
|
|
on: pull_request_target
|
|
|
|
jobs:
|
|
|
|
static_analysis:
|
|
|
|
name: ${{ matrix.toolchain }}
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
toolchain:
|
|
- ubuntu-latest
|
|
|
|
include:
|
|
- toolchain: ubuntu-latest
|
|
os: ubuntu-latest
|
|
compiler: clang
|
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Analyze
|
|
uses: JacobDomagala/StaticAnalysis@master
|
|
with:
|
|
clang_tidy_args: >-
|
|
--config-file=$GITHUB_WORKSPACE/.clang-tidy
|
|
--extra-arg=-I$GITHUB_WORKSPACE/include --extra-arg=-std=c++17
|
|
cppcheck_args: >-
|
|
--enable=all --inconclusive --inline-suppr
|
|
-i$GITHUB_WORKSPACE/test/main.cpp
|
|
-i$GITHUB_WORKSPACE/test/test_*.cpp
|
|
--suppress=missingInclude
|
|
--suppress='*:$GITHUB_WORKSPACE/test/doctest.hpp'
|
|
init_script: tools/static_analysis_setup.sh
|