Skip to content

Commit

Permalink
add cppcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmer25 committed Feb 27, 2024
1 parent d934044 commit 2827eab
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/lint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,45 @@ jobs:
source: "./"
extensions: "h,c"
clangFormatVersion: 17

static_analysis:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: setup init_script
shell: bash
run: |
echo "#!/bin/bash
# Input args provided by StaticAnalysis action
root_dir=\${1}
build_dir=\${2}
echo \"Hello from the init script! First arg=\${root_dir} second arg=\${build_dir}\"
add-apt-repository ppa:oibaf/graphics-drivers
apt update && apt upgrade
apt install -y libvulkan1 mesa-vulkan-drivers vulkan-utils" > init_script.sh
- name: Run static analysis
uses: JacobDomagala/StaticAnalysis@master
with:
language: c++

# Exclude any issues found in ${Project_root_dir}/lib
exclude_dir: lib

use_cmake: true

# Additional apt packages that need to be installed before running Cmake
apt_pckgs: software-properties-common libglu1-mesa-dev freeglut3-dev mesa-common-dev

# Additional script that will be run (sourced) AFTER 'apt_pckgs' and before running Cmake
init_script: init_script.sh

# (Optional) clang-tidy args
clang_tidy_args: -checks='*,fuchsia-*,google-*,zircon-*,abseil-*,modernize-use-trailing-return-type'

# (Optional) cppcheck args
cppcheck_args: --enable=all --suppress=missingInclude

0 comments on commit 2827eab

Please sign in to comment.