-
Notifications
You must be signed in to change notification settings - Fork 12
Add pre-commit for better linting #25
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
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
300f848
Add pre-commit for linting locally
bmchalenv 5ba1541
Beginning of linting journey
bmchalenv dfdf823
More config fixes
bmchalenv 624776f
Match flake8 to ament_flake8
bmchalenv e42b1d6
Run lint again
bmchalenv 1fa80bf
Only support python 3.10 features
bmchalenv 900a432
Only support python 3.10 features
bmchalenv 5c9e1cc
Fix line length issue
bmchalenv 5898ef0
Reset to main
bmchalenv 0489236
Fix lints
bmchalenv 1ff3421
Update Contributing.md to reference installation steps
bmchalenv eb66360
Add lint tests as first step since it should fail fast
bmchalenv da401d0
Tests lint in CI
bmchalenv b09b7b9
Check sign off pre-commit
bmchalenv a016e5c
Check commit
bmchalenv d676849
Update md
bmchalenv e819d07
Use proper working directory
bmchalenv 2f4721d
Test CI
bmchalenv c85bec4
Test CI
bmchalenv fb8bd6c
Test CI
bmchalenv 0b771b3
Test CI
bmchalenv 444730b
Test CI
bmchalenv 1cfb152
Test CI
bmchalenv 37f15a0
Test CI
bmchalenv 38425d7
Test CI
bmchalenv 2fac9da
Test CI
bmchalenv 1d01220
Test CI
bmchalenv 8714eb0
Test CI
bmchalenv 387403b
Test CI
bmchalenv fd0a0aa
Test CI
bmchalenv 7c23de9
Don't fix smoke tests
bmchalenv 9841804
Add uninstall for pre-commit command
bmchalenv f2c75c4
Remove ros base
bmchalenv 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -89,4 +89,4 @@ _deps | |
|
|
||
| # Temporary files | ||
| *.tmp | ||
| *.temp | ||
| *.temp | ||
This file contains hidden or 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,58 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| exclude: ^(build|install)/ | ||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v6.0.0 | ||
| hooks: | ||
| - id: check-yaml | ||
| - id: end-of-file-fixer | ||
| - id: trailing-whitespace | ||
| - repo: https://github.com/hhatto/autopep8 | ||
| rev: v2.3.1 | ||
| hooks: | ||
| - id: autopep8 | ||
| args: [--max-line-length=99, -i] | ||
| - repo: https://github.com/pycqa/flake8 | ||
| rev: 7.1.1 | ||
| hooks: | ||
| - id: flake8 | ||
| args: [--max-line-length=99, '--extend-ignore=B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202'] | ||
| - repo: https://github.com/scop/pre-commit-shfmt | ||
| rev: v3.12.0-2 | ||
| hooks: | ||
| - id: shfmt | ||
| - repo: https://github.com/sbrunner/hooks | ||
| rev: 1.6.1 | ||
| hooks: | ||
| - id: copyright-required | ||
| exclude: '(^\.git/|(\.ini|\.json|\.service|__init__\.py|\.md|\.gitkeep|\.conf|LICENSE|\.toml|\.template|\.style\..*|\.gitattributes|\.gitignore|\.editorconfig|\.bash-completion|\.install|\.links|changelog|debian/source/format|.codespellrc|copyright|ament_code_style\.cfg|test_pep257\.py|test_flake8\.py|test_copyright\.py)$)' | ||
| - repo: local | ||
| hooks: | ||
| - id: uncrustify | ||
| name: uncrustify | ||
| entry: uncrustify -c ament_code_style.cfg --replace --no-backup | ||
| language: system | ||
| types_or: [c, c++] | ||
| - id: signed-off-by | ||
| name: check commit is signed off | ||
| entry: "bash -c 'grep -q \"^Signed-off-by: \" \"$1\"' --" | ||
| language: system | ||
| stages: [commit-msg] | ||
| pass_filenames: true | ||
| - repo: https://github.com/codespell-project/codespell | ||
| rev: v2.4.1 | ||
| hooks: | ||
| - id: codespell |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.