mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-03 22:54:39 +00:00
Add Static Analysis action to run on Pull Request
Unit test source files are not currently checked. Hopefully, these can be added so that all source files in a pull request are verified. Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
This commit is contained in:
parent
9a9c3042aa
commit
8d8282bac3
42
.github/workflows/static_analysis.yml
vendored
Normal file
42
.github/workflows/static_analysis.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
name: Static Analysis
|
||||
|
||||
on: pull_request
|
||||
|
||||
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
|
4
tools/static_analysis_setup.sh
Executable file
4
tools/static_analysis_setup.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Change to the "test" subdir before "build" subdir is made.
|
||||
cd test
|
Loading…
Reference in New Issue
Block a user