Skip to content

Commit

Permalink
adding static analysis ci
Browse files Browse the repository at this point in the history
  • Loading branch information
finger563 committed Dec 27, 2023
1 parent 95d438a commit 0a9d72b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Static analysis

on: [pull_request]

jobs:
static_analysis:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Run static analysis
uses: espp/StaticAnalysis@master
with:
# Do not build the project and do not use cmake to generate compile_commands.json
use_cmake: false

# (Optional) cppcheck args
cppcheck_args: -i$GITHUB_WORKSPACE/lib -i$GITHUB_WORKSPACE/components/gbc/gnuboy -i$GITHUB_WORKSPACE/components/nes/nofrendo -i$GITHUB_WORKSPACE/components/espp --force --enable=all --inline-suppr --inconclusive --platform=mips32 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt
11 changes: 11 additions & 0 deletions suppressions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// category of errors to suppress, e.g. unusedFunction
missingInclude
missingIncludeSystem
unusedFunction
unusedStructMember
functionStatic

// Specific suppressions of the form:
// [error id]:[filename]:[line]
*:lib/*
*:components/espp/*

0 comments on commit 0a9d72b

Please sign in to comment.