forked from UNICT-Quality-Development/git-course-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add cppcheck to the pipeline (UNICT-Quality-Development#203)
* feat: add cppcheck to the pipeline * chore: update cpp check ci * chore: check cpp check pipeline * fix: cpp check * wip * wip * fix: pipeline
- Loading branch information
Showing
3 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: cpp-check | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
cpp-check: | ||
strategy: | ||
fail-fast: false | ||
runs-on: [ubuntu-22.04] | ||
name: cpp check | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update -y | ||
sudo apt install -y cppcheck | ||
- name: cpp check | ||
run: | | ||
cppcheck --force --inline-suppr --output-file=report.txt exercises/ | ||
if [ -s report.txt ]; then # if file is not empty | ||
cat report.txt | ||
exit 1 # let github action fails | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.vscode/ | ||
.vscode/ | ||
report.txt | ||
|