-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
368b3f6
commit 97bef0e
Showing
5 changed files
with
67 additions
and
2 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,15 @@ | ||
UseColor: true | ||
|
||
# Discuss if we wanna add some extra checks. | ||
Checks: > | ||
bugprone-*, | ||
clang-analyzer-cplusplus*, | ||
concurrency-*, | ||
cppcoreguidelines-*, | ||
google-*, | ||
modernize-*, | ||
performance-*, | ||
readability-*, | ||
HeaderFilterRegex: '^\.\/eventuals\/.*|^\.\/test\/.*' | ||
|
||
WarningsAsErrors: "" |
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,48 @@ | ||
# Workflow for doing review based on clang-tidy. | ||
name: Code review with clang-tidy | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths-ignore: | ||
- "**.md" | ||
pull_request: | ||
paths-ignore: | ||
- "**.md" | ||
|
||
jobs: | ||
clang_tidy_checks: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# For now we run clang-tidy checks for macOS and Ubuntu. | ||
# Later we will run clang-tidy checks for Windows too. | ||
os: ["macos-latest", "ubuntu-latest"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Generate compile_commands.json | ||
run: | | ||
chmod +x dev-tools/clang-tidy-review/generate_compilation_database.sh | ||
dev-tools/clang-tidy-review/generate_compilation_database.sh | ||
- name: Install clang-tidy on Ubuntu | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: | | ||
sudo apt-get install -y clang-tidy-12 | ||
sudo ln -s $(which clang-tidy-12) /usr/bin/clang-tidy | ||
- name: Create clang-tidy symlink on macOS | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
run: | | ||
ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy" | ||
clang-tidy --version | ||
- name: Run clang-tidy checks | ||
run: | | ||
chmod +x dev-tools/clang-tidy-review/clang_tidy_review.sh | ||
dev-tools/clang-tidy-review/clang_tidy_review.sh |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[submodule "dev-tools"] | ||
path = dev-tools | ||
url = https://github.com/3rdparty/dev-tools.git | ||
branch = ArthurBandaryk.generate-compilation-database |
Submodule dev-tools
updated
2 files
+89 −0 | clang-tidy-review/clang_tidy_review.sh | |
+17 −0 | clang-tidy-review/generate_compilation_database.sh |