generated from epiverse-trace/packagetemplate
-
Notifications
You must be signed in to change notification settings - Fork 2
29 lines (25 loc) · 1018 Bytes
/
Cpp-lint-check.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# GitHub Action to run cpplint recursively on all pushes and pull requests
# https://github.com/cpplint/GitHub-Action-for-cpplint
on:
workflow_dispatch:
push:
paths:
- "src/**"
- "inst/include/**"
name: Cpp-lint-check
jobs:
cpplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
- run: pip install cpplint
- run: cpplint --filter="-build/c++11, -build/include_subdir" --exclude="src/RcppExports.cpp" src/*.cpp
- run: cpplint --filter="-build/c++11, -build/include_subdir" --exclude="inst/include/epidemics.h" inst/include/*.h
cppcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt-get install cppcheck
- run: cppcheck --std=c++14 -i src/RcppExports.cpp --enable=performance,portability,warning,style --error-exitcode=1 src
- run: cppcheck --std=c++14 --language=c++ --enable=performance,portability,warning,style --error-exitcode=1 inst/include/*.h