-
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.
Merge pull request #48 from JacobDomagala/47-add-clang-tidy-to-ci
Add clang-tidy check to github workflows (#47)
- Loading branch information
Showing
5 changed files
with
45 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
Checks: '*,-fuchsia-*,-google-*,-zircon-*,-abseil-*,-modernize-use-trailing-return-type,-llvm-*' | ||
WarningsAsErrors: '*' | ||
HeaderFilterRegex: '' | ||
FormatStyle: none |
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,36 @@ | ||
name: Code quality check | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup env | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y xorg-dev | ||
sudo apt-get install -y cppcheck | ||
sudo apt-get install -y llvm-dev | ||
sudo apt-get install -y clang-tidy | ||
cmake -E make_directory ${{runner.workspace}}/build | ||
- name: Create compile_commands.json | ||
working-directory: ${{runner.workspace}}/build | ||
run: cmake $GITHUB_WORKSPACE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON . | ||
|
||
- name: cppcheck | ||
working-directory: ${{runner.workspace}}/build | ||
run: | | ||
cppcheck src --enable=all --project=compile_commands.json -i$GITHUB_WORKSPACE/lib | ||
- name: clang-tidy | ||
working-directory: ${{runner.workspace}}/build | ||
run: | | ||
run-clang-tidy $GITHUB_WORKSPACE/src | ||
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
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