forked from locusrobotics/fuse
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add clang tidy #5
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
b4e76b6
change clang tidy conf and remove jenkinsfile
henrygerardmoore 8c00d8d
add clang-tidy workflow
henrygerardmoore 41e3692
add clang tidy pre-commit
henrygerardmoore c45e85c
add clang-tidy to pre-commit
henrygerardmoore a33b717
move pre-commit to after build in CI and make clang-tidy optional
henrygerardmoore 81ef290
default to not running clang tidy, but let the user know
henrygerardmoore e31c89b
specify version
henrygerardmoore 69af8ea
update first?
henrygerardmoore 2d66302
cd into correct wd
henrygerardmoore 04b5911
change pip cache owner
henrygerardmoore 60c46d6
remove industrial CI
henrygerardmoore 10abfa4
chown more stuff
henrygerardmoore 9a6c4ce
try without container
henrygerardmoore 66534b7
try without checkout
henrygerardmoore 6b86114
add container back
henrygerardmoore 8748a8f
try clang tidy outside pre-commit
henrygerardmoore e7ca98f
run only on changed cpp/hpp files
henrygerardmoore 2ae9f73
point to config file
henrygerardmoore 58d3ca6
change files to last
henrygerardmoore 5c4a5fa
fix clang tidy path
henrygerardmoore 6424c7a
try adding back some checks
henrygerardmoore 445fb27
try removing cache
henrygerardmoore ad64883
clang tidy fix
henrygerardmoore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -70,3 +70,28 @@ jobs: | |
if: always() | ||
run: colcon test-result --verbose | ||
working-directory: /colcon_ws | ||
|
||
clang_tidy: | ||
needs: | ||
# Ensure the test job runs after the build job finishes instead of attempting to run in parallel | ||
- build-ws | ||
name: clang-tidy | ||
runs-on: ubuntu-24.04 | ||
container: | ||
# Run on the Docker image we tagged and pushed to a private repo in the job above | ||
image: ghcr.io/picknikrobotics/fuse:${{ github.run_id }} | ||
steps: | ||
- name: Changed Files | ||
id: changed-cpp-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
# Avoid using single or double quotes for multiline patterns | ||
files: | | ||
**.cpp | ||
**.hpp | ||
- run: run-clang-tidy -j $(nproc --all) -p build/ -export-fixes clang-tidy-fixes.yaml -config-file src/fuse/.clang-tidy ${{ steps.changed-cpp-files.outputs.all_changed_files }} | ||
working-directory: /colcon_ws | ||
- uses: asarium/[email protected] | ||
with: | ||
fixesFile: /colcon_ws/clang-tidy-fixes.yaml | ||
noFailOnIssue: false |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -33,3 +33,6 @@ | |
|
||
# Python compiled bytecode files | ||
*.pyc | ||
|
||
# clang tidy fixes | ||
clang-tidy-fixes.yaml |
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
#!/bin/bash | ||
|
||
# -j $(nproc --all) runs with all cores, but the prepended nice runs with a low priority so it won't make your computer unusable while clang tidy is going. The "$@" at the end passes all the filenames from pre-commit so it should only look for clang tidy fixes in the files you directly changed in the commit that is being checked. | ||
nice run-clang-tidy -p ../../build_dbg -j $(nproc --all) -quiet -fix "$@" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer a valid option in clang tidy 18