-
Notifications
You must be signed in to change notification settings - Fork 2
Clean up builds, pre-commit, and add workflows #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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5b80ad8
Add initial cleanup pass and update cmakelists for more appropriate b…
zeerekahmad c55c583
Add pre-commit
zeerekahmad 5f7266b
Run pre-commit and clean-up
zeerekahmad 1e1c98f
Update to catch2withmain style
zeerekahmad 397d345
Remove unnecessary stuff in gitignore
zeerekahmad 73a662e
Move into the right folder for workflows
zeerekahmad 63c813a
Don't have a repos file!
zeerekahmad 30509db
Remove visibility control, we don't use it. Also clean up namespacing
zeerekahmad 870e950
Remove ament lint because it's extremely constraining and conflicting…
zeerekahmad 621ebdc
Change versioning to prep for bloom and fix bad copyright
zeerekahmad 4ba3bb9
Add magic humble vs jazzy and rolling builder
zeerekahmad 84ad53d
Include the right catch versions for humble vs non
zeerekahmad 631b262
Further clean up branching
zeerekahmad 815fc1e
Add cleanup removing unnecessary packages and bad copypasta
zeerekahmad b5205f4
Revert package.xml and fix pre-commit
zeerekahmad 4b5f6f4
Fix missing rclcpp components
zeerekahmad 3b955de
Fix missing rclcpp components
zeerekahmad 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| --- | ||
|
|
||
| # See https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormatStyleOptions.html for documentation of these options | ||
| BasedOnStyle: Google | ||
| IndentWidth: 2 | ||
| ColumnLimit: 120 | ||
|
|
||
| AccessModifierOffset: -2 | ||
| AlignAfterOpenBracket: AlwaysBreak | ||
| AlignConsecutiveAssignments: None | ||
| AlignConsecutiveDeclarations: None | ||
| AlignEscapedNewlines: Left | ||
| AlignTrailingComments: false | ||
| AllowAllArgumentsOnNextLine: true | ||
| AllowAllParametersOfDeclarationOnNextLine: true | ||
| AllowShortBlocksOnASingleLine: Empty | ||
| AllowShortFunctionsOnASingleLine: false | ||
| BinPackArguments: false | ||
| BinPackParameters: false | ||
| BraceWrapping: | ||
| AfterClass: true | ||
| AfterControlStatement: MultiLine | ||
| AfterEnum: true | ||
| AfterFunction: true | ||
| AfterNamespace: true | ||
| AfterStruct: true | ||
| AfterUnion: true | ||
| AfterExternBlock: true | ||
| BeforeCatch: false | ||
| BeforeElse: false | ||
| BeforeLambdaBody: false | ||
| BeforeWhile: false | ||
| IndentBraces: false | ||
| SplitEmptyFunction: false | ||
| SplitEmptyRecord: false | ||
| SplitEmptyNamespace: false | ||
| BreakBeforeBraces: Custom | ||
| BreakConstructorInitializers: BeforeComma | ||
| CompactNamespaces: false | ||
| ContinuationIndentWidth: 2 | ||
| ConstructorInitializerIndentWidth: 0 | ||
| DerivePointerAlignment: false | ||
| EmptyLineAfterAccessModifier: Never | ||
| EmptyLineBeforeAccessModifier: LogicalBlock | ||
| FixNamespaceComments: true | ||
| IncludeBlocks: Regroup | ||
| IncludeCategories: | ||
| # Headers in <> with .h extension (best guess at C system headers) | ||
| - Regex: '<([A-Za-z0-9\Q/-_\E])+\.h>' | ||
| Priority: 1 | ||
| # Headers in <> without extension (C++ system headers) | ||
| - Regex: '<([A-Za-z0-9\Q/-_\E])+>' | ||
| Priority: 2 | ||
| # Headers in <> with other extensions. | ||
| - Regex: '<([A-Za-z0-9.\Q/-_\E])+>' | ||
| Priority: 3 | ||
| # Headers in "" | ||
| - Regex: '"([A-Za-z0-9.\Q/-_\E])+"' | ||
| Priority: 4 | ||
| IndentAccessModifiers: false | ||
| IndentPPDirectives: BeforeHash | ||
| PackConstructorInitializers: Never | ||
| PointerAlignment: Middle | ||
| ReferenceAlignment: Middle | ||
| ReflowComments: false | ||
| SeparateDefinitionBlocks: Always | ||
| SortIncludes: CaseInsensitive | ||
| SpacesBeforeTrailingComments: 2 |
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,13 @@ | ||
| Copyright (c) 2025-present Polymath Robotics, Inc. All rights reserved | ||
|
|
||
| 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. |
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,19 @@ | ||
| # Because of cpplint's config file assumptions, this can't be contained in .config/ directory | ||
| linelength=256 | ||
|
|
||
| # TODO(emerson) we need to apply a copyright check, maybe not via this tool though | ||
| filter=-legal/copyright | ||
| # TODO(emerson) we want these, but the style as enforced here is probably not quite right for us | ||
| filter=-build/header_guard | ||
| filter=-build/c++17 | ||
|
|
||
| # Per our style guide, we want to allow the use of non-const reference passing for output parameters | ||
| filter=-runtime/references | ||
|
|
||
| # Disable all formatting checks, this is handled by clang-format | ||
| filter=-readability/braces | ||
| filter=-whitespace/braces | ||
| filter=-whitespace/indent | ||
| filter=-whitespace/newline | ||
| filter=-whitespace/parens | ||
| filter=-whitespace/semicolon |
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,37 @@ | ||
| --- | ||
|
|
||
| name: Build and test | ||
| "on": | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| build_and_test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - ros: humble | ||
| ubuntu: jammy | ||
| - ros: jazzy | ||
| ubuntu: noble | ||
| - ros: rolling | ||
| ubuntu: noble | ||
| name: ROS 2 ${{ matrix.ros }} | ||
| container: | ||
| image: ghcr.io/ros-tooling/setup-ros-docker/setup-ros-docker-ubuntu-${{ matrix.ubuntu }}:latest | ||
| env: | ||
| ROS_DISTRO: ${{ matrix.ros }} | ||
| PIP_BREAK_SYSTEM_PACKAGES: 1 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: ros-tooling/action-ros-ci@v0.4 | ||
| with: | ||
| target-ros2-distro: ${{ matrix.ros }} | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: colcon-logs-${{ matrix.ros }} | ||
| path: ros_ws/log |
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,18 @@ | ||
| --- | ||
| name: pre-commit | ||
|
|
||
| "on": | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| pre-commit: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.10" | ||
| - run: sudo apt-get update && sudo apt-get install libxml2-utils | ||
| - uses: pre-commit/action@v3.0.1 |
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,4 @@ | ||
| # Colcon | ||
| /build/ | ||
| /install/ | ||
| /log/ |
This file was deleted.
Oops, something went wrong.
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,81 @@ | ||
| --- | ||
| # See https://pre-commit.com for more information on these settings | ||
| repos: | ||
| # Generally useful checks provided by pre-commit | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v5.0.0 | ||
| hooks: | ||
| - id: check-added-large-files | ||
| - id: check-ast | ||
| - id: check-case-conflict | ||
| - id: check-merge-conflict | ||
| - id: check-shebang-scripts-are-executable | ||
| - id: check-symlinks | ||
| - id: check-toml | ||
| - id: check-xml | ||
| - id: end-of-file-fixer | ||
| - id: forbid-submodules | ||
| - id: mixed-line-ending | ||
| - id: trailing-whitespace | ||
| # Python | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.11.5 | ||
| hooks: | ||
| - id: ruff-format | ||
| - id: ruff | ||
| args: [--fix] | ||
| # C++ formatting | ||
| - repo: https://github.com/pre-commit/mirrors-clang-format | ||
| rev: v19.1.7 | ||
| hooks: | ||
| - id: clang-format | ||
| args: ["--style=file:.config/clang-format"] | ||
| # C++ linting | ||
| - repo: https://github.com/cpplint/cpplint | ||
| rev: 2.0.0 | ||
| hooks: | ||
| - id: cpplint | ||
| args: ["--config=.cpplint.cfg", --quiet, --output=sed] | ||
| # Markdown | ||
| - repo: https://github.com/jackdewinter/pymarkdown | ||
| rev: v0.9.28 | ||
| hooks: | ||
| - id: pymarkdown | ||
| args: [-d, MD013, fix] | ||
| # XML | ||
| - repo: https://github.com/emersonknapp/ament_xmllint | ||
| rev: v0.1 | ||
| hooks: | ||
| - id: ament_xmllint | ||
| # YAML | ||
| - repo: https://github.com/adrienverge/yamllint.git | ||
| rev: v1.29.0 | ||
| hooks: | ||
| - id: yamllint | ||
| args: [-d, "{extends: default, rules: {line-length: {max: 256}, commas: false}}"] | ||
| # CMake | ||
| - repo: https://github.com/cmake-lint/cmake-lint | ||
| rev: 1.4.3 | ||
| hooks: | ||
| - id: cmakelint | ||
| args: [--linelength=140] | ||
| - repo: https://github.com/Lucas-C/pre-commit-hooks | ||
| rev: v1.5.5 | ||
| hooks: | ||
| - id: insert-license | ||
| types_or: [python, cmake, shell] | ||
| name: Copyright headers for Python/CMake | ||
| args: [ | ||
| --license-filepath, .config/copyright.txt, | ||
| --comment-style, '#', | ||
| --allow-past-years, | ||
| --no-extra-eol, | ||
| ] | ||
| - id: insert-license | ||
| types_or: [c++, c] | ||
| name: Copyright headers for C/C++ | ||
| args: [ | ||
| --license-filepath, .config/copyright.txt, | ||
| --comment-style, '//', | ||
| --allow-past-years, | ||
| ] | ||
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,18 @@ | ||
| line-length = 120 | ||
| indent-width = 4 | ||
|
|
||
| [format] | ||
| preview = true | ||
| quote-style = "single" | ||
| indent-style = "space" | ||
| skip-magic-trailing-comma = false | ||
| line-ending = "lf" | ||
|
|
||
| [lint] | ||
| select = ["E4", "E7", "E9", "F", "I"] | ||
| # Rules intended for future application | ||
| # select = ["N", "D", "C90", "PTH", "UP", "PERF", "RUF"] | ||
| ignore = [] | ||
| fixable = ["ALL"] | ||
| unfixable = [] | ||
| dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" |
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 |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # Release Notes | ||
|
|
||
| ## v0.1.0 | ||
| ## v0.0.0 | ||
| __INITIAL RELEASE__ | ||
|
|
||
| ### Features | ||
|
|
||
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.