argparse/.github/workflows/static_analysis.yml
Sean Robinson 97204363b5 Refactor configuration for StaticAnalysis
Upstream StaticAnalysis looks to be changing for more flexibility with
source files to process.  While these changes may eventually benefit
argparse, the public interfaces are in flux and we need a stable tool.
argparse also needs a SA change which is not yet upstream.

Trying to run clang-tidy via StaticAnalysis on a single file in a
directory with many source file is not easy, so move the analysis kernel
to a location (i.e. tools) where it is the only C++ source file.

Another benefit is cppcheck no longer needs to be told to ignore the test
sources.

Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2022-02-07 11:51:22 -07:00

41 lines
873 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: skrobinson/StaticAnalysis@stable-for-argparse
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
--suppress=missingInclude
--suppress='*:$GITHUB_WORKSPACE/test/doctest.hpp'
init_script: tools/static_analysis_setup.sh