diff --git a/.clang-format b/.clang-format index b41fae9..cd54eb4 100644 --- a/.clang-format +++ b/.clang-format @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + # Modified from https://github.com/ament/ament_lint/blob/master/ament_clang_format/ament_clang_format/configuration/.clang-format Language: Cpp BasedOnStyle: Google diff --git a/.clang-tidy b/.clang-tidy index c4533f5..de12fb6 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + Checks: " -*, boost-use-to-string, @@ -202,7 +206,8 @@ WarningsAsErrors: " HeaderFilterRegex: ^(?!\/usr)(?!\/opt) -AnalyzeTemporaryDtors: false +ExtraArgs: + - -std=c++17 FormatStyle: none diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml index 12a8579..5c74f7c 100644 --- a/.github/ISSUE_TEMPLATE/bug.yaml +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: Bug description: Report a bug body: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 48765c2..deccbf3 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + blank_issues_enabled: false contact_links: - name: Question diff --git a/.github/ISSUE_TEMPLATE/task.yaml b/.github/ISSUE_TEMPLATE/task.yaml index cd8322f..5830732 100644 --- a/.github/ISSUE_TEMPLATE/task.yaml +++ b/.github/ISSUE_TEMPLATE/task.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: Task description: Plan a task body: diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 0264c03..8e2d719 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -1,9 +1,14 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + version: 2 updates: - package-ecosystem: github-actions directory: / + # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleinterval schedule: - interval: daily + interval: monthly open-pull-requests-limit: 1 labels: - tag:bot diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..4c4081a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ +## Description + +## How was this PR tested? + +## Notes for reviewers + +None. + +## Effects on system behavior + +None. diff --git a/.github/stale.yml b/.github/stale.yml index bc99e43..ffce036 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + # Modified from https://github.com/probot/stale#usage # Number of days of inactivity before an Issue or Pull Request with the stale label is closed diff --git a/.github/sync-files-reverse-reference.yaml b/.github/sync-files-reverse-reference.yaml deleted file mode 100644 index f5d016c..0000000 --- a/.github/sync-files-reverse-reference.yaml +++ /dev/null @@ -1,39 +0,0 @@ -- repository: autowarefoundation/autoware.universe - files: - - source: .github/workflows/build-and-test.yaml - pre-commands: | - sd -s '${{ matrix.container-suffix }}' '' {source} - sd -f ms 'container-suffix:.*include:' 'include:' {source} - - sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} - sd "build_depends.humble.repos" "build_depends.repos" {source} - - source: .github/workflows/build-and-test-differential.yaml - pre-commands: | - sd -s '${{ matrix.container-suffix }}' '' {source} - sd -f ms 'container-suffix:.*include:' 'include:' {source} - - sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} - sd "build_depends.humble.repos" "build_depends.repos" {source} - - source: .github/workflows/build-and-test-differential-self-hosted.yaml - pre-commands: | - sd -s '${{ matrix.container-suffix }}' '' {source} - sd -f ms 'container-suffix:.*include:' 'include:' {source} - - sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} - sd "build_depends.humble.repos" "build_depends.repos" {source} - - source: .github/workflows/build-and-test-self-hosted.yaml - pre-commands: | - sd -s '${{ matrix.container-suffix }}' '' {source} - sd -f ms 'container-suffix:.*include:' 'include:' {source} - - sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} - sd "build_depends.humble.repos" "build_depends.repos" {source} - - source: .github/workflows/check-build-depends.yaml - pre-commands: | - sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} - sd "build_depends.humble.repos" "build_depends.repos" {source} - - source: .github/workflows/clang-tidy-pr-comments.yaml - - source: .github/workflows/clang-tidy-pr-comments-manually.yaml - - source: .github/workflows/update-codeowners-from-packages.yaml - - source: .pre-commit-config.yaml - - source: codecov.yaml diff --git a/.github/workflows/build-and-test-differential-self-hosted.yaml b/.github/workflows/build-and-test-differential-self-hosted.yaml deleted file mode 100644 index ae7aeca..0000000 --- a/.github/workflows/build-and-test-differential-self-hosted.yaml +++ /dev/null @@ -1,58 +0,0 @@ -name: build-and-test-differential-self-hosted - -on: - pull_request: - types: - - opened - - synchronize - - labeled - workflow_dispatch: - -jobs: - prevent-no-label-execution: - uses: autowarefoundation/autoware-github-actions/.github/workflows/prevent-no-label-execution.yaml@v1 - with: - label: ARM64 - - build-and-test-differential-self-hosted: - needs: prevent-no-label-execution - if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }} - runs-on: [self-hosted, linux, ARM64] - container: ${{ matrix.container }} - strategy: - fail-fast: false - matrix: - rosdistro: - - humble - include: - - rosdistro: humble - container: ros:humble - build-depends-repos: build_depends.repos - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Remove exec_depend - uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 - - - name: Get modified packages - id: get-modified-packages - uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 - - - name: Build - if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} - uses: autowarefoundation/autoware-github-actions/colcon-build@v1 - with: - rosdistro: ${{ matrix.rosdistro }} - target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} - build-depends-repos: ${{ matrix.build-depends-repos }} - - - name: Test - if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} - uses: autowarefoundation/autoware-github-actions/colcon-test@v1 - with: - rosdistro: ${{ matrix.rosdistro }} - target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} - build-depends-repos: ${{ matrix.build-depends-repos }} diff --git a/.github/workflows/build-and-test-differential.yaml b/.github/workflows/build-and-test-differential.yaml index 30a92fa..134a12d 100644 --- a/.github/workflows/build-and-test-differential.yaml +++ b/.github/workflows/build-and-test-differential.yaml @@ -1,11 +1,27 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: build-and-test-differential on: pull_request: + types: + - opened + - synchronize + - reopened + - labeled jobs: + make-sure-label-is-present: + uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1 + with: + label: run:build-and-test-differential + build-and-test-differential: - runs-on: ubuntu-latest + needs: make-sure-label-is-present + if: ${{ needs.make-sure-label-is-present.outputs.result == 'true' }} + runs-on: ubuntu-22.04 container: ${{ matrix.container }} strategy: fail-fast: false @@ -15,12 +31,18 @@ jobs: include: - rosdistro: humble container: ros:humble - build-depends-repos: build_depends.repos steps: - - name: Check out repository + - name: Set PR fetch depth + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" + + - name: Checkout PR branch and all PR commits uses: actions/checkout@v4 with: - fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: ${{ env.PR_FETCH_DEPTH }} + + - name: Show disk space before the tasks + run: df -h - name: Remove exec_depend uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 @@ -35,7 +57,6 @@ jobs: with: rosdistro: ${{ matrix.rosdistro }} target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} - build-depends-repos: ${{ matrix.build-depends-repos }} - name: Test id: test @@ -44,49 +65,15 @@ jobs: with: rosdistro: ${{ matrix.rosdistro }} target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} - build-depends-repos: ${{ matrix.build-depends-repos }} - name: Upload coverage to CodeCov if: ${{ steps.test.outputs.coverage-report-files != '' }} - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: files: ${{ steps.test.outputs.coverage-report-files }} fail_ci_if_error: false verbose: true flags: differential - token: ${{ secrets.CODECOV_TOKEN }} - - clang-tidy-differential: - runs-on: ubuntu-latest - container: ros:humble - needs: build-and-test-differential - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Remove exec_depend - uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 - - - name: Get modified packages - id: get-modified-packages - uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 - - - name: Get modified files - id: get-modified-files - uses: tj-actions/changed-files@v45 - with: - files: | - **/*.cpp - **/*.hpp - - - name: Run clang-tidy - if: ${{ steps.get-modified-files.outputs.all_changed_files != '' }} - uses: autowarefoundation/autoware-github-actions/clang-tidy@v1 - with: - rosdistro: humble - target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} - target-files: ${{ steps.get-modified-files.outputs.all_changed_files }} - clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy - build-depends-repos: build_depends.repos + - name: Show disk space after the tasks + run: df -h diff --git a/.github/workflows/build-and-test-self-hosted.yaml b/.github/workflows/build-and-test-self-hosted.yaml deleted file mode 100644 index 0a3c2c2..0000000 --- a/.github/workflows/build-and-test-self-hosted.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: build-and-test-self-hosted - -on: - schedule: - - cron: 0 0 * * * - workflow_dispatch: - -jobs: - build-and-test-self-hosted: - runs-on: [self-hosted, linux, ARM64] - container: ${{ matrix.container }} - strategy: - fail-fast: false - matrix: - rosdistro: - - humble - include: - - rosdistro: humble - container: ros:humble - build-depends-repos: build_depends.repos - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Remove exec_depend - uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 - - - name: Get self packages - id: get-self-packages - uses: autowarefoundation/autoware-github-actions/get-self-packages@v1 - - - name: Build - if: ${{ steps.get-self-packages.outputs.self-packages != '' }} - uses: autowarefoundation/autoware-github-actions/colcon-build@v1 - with: - rosdistro: ${{ matrix.rosdistro }} - target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: ${{ matrix.build-depends-repos }} - - - name: Test - if: ${{ steps.get-self-packages.outputs.self-packages != '' }} - uses: autowarefoundation/autoware-github-actions/colcon-test@v1 - with: - rosdistro: ${{ matrix.rosdistro }} - target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: ${{ matrix.build-depends-repos }} diff --git a/.github/workflows/build-and-test-with-reverse-depends.yaml b/.github/workflows/build-and-test-with-reverse-depends.yaml deleted file mode 100644 index 07d7a02..0000000 --- a/.github/workflows/build-and-test-with-reverse-depends.yaml +++ /dev/null @@ -1,52 +0,0 @@ -name: build-and-test-with-reverse-depends - -on: - workflow_dispatch: - -jobs: - build-and-test-with-reverse-depends: - runs-on: ubuntu-latest - container: ros:humble - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Set up yq - uses: chrisdickinson/setup-yq@v1.0.1 - with: - yq-version: v4.25.1 - - - name: Clone reverse depends - run: | - git clone https://github.com/autowarefoundation/autoware.universe.git reverse_depends - - - name: Remove exec_depend - uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 - - - name: Get self packages - id: get-self-packages - uses: autowarefoundation/autoware-github-actions/get-self-packages@v1 - - - name: Import depends of reverse depends - run: | - yq -i 'del(.repositories.* | select(.url == "https://github.com/autowarefoundation/autoware_common.git"))' reverse_depends/build_depends.repos - yq -i 'del(.repositories.* | select(.url == "https://github.com/tier4/autoware_auto_msgs.git"))' reverse_depends/build_depends.repos - vcs import reverse_depends < reverse_depends/build_depends.repos - rm -rf reverse_depends/map/lanelet2_extension - - - name: Build - if: ${{ steps.get-self-packages.outputs.self-packages != '' }} - uses: autowarefoundation/autoware-github-actions/colcon-build@v1 - with: - rosdistro: humble - target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: build_depends.repos - - - name: Test - if: ${{ steps.get-self-packages.outputs.self-packages != '' }} - id: test - uses: autowarefoundation/autoware-github-actions/colcon-test@v1 - with: - rosdistro: humble - target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: build_depends.repos diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index f944a59..2778480 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: build-and-test on: @@ -9,7 +13,7 @@ on: jobs: build-and-test: if: ${{ github.event_name != 'push' || github.ref_name == github.event.repository.default_branch }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 container: ${{ matrix.container }} strategy: fail-fast: false @@ -19,18 +23,14 @@ jobs: include: - rosdistro: humble container: ros:humble - build-depends-repos: build_depends.repos steps: - name: Check out repository uses: actions/checkout@v4 - - - name: Free disk space (Ubuntu) - uses: jlumbroso/free-disk-space@v1.3.1 with: - tool-cache: false - dotnet: false - swap-storage: false - large-packages: false + fetch-depth: 1 + + - name: Show disk space before the tasks + run: df -h - name: Remove exec_depend uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 @@ -45,7 +45,6 @@ jobs: with: rosdistro: ${{ matrix.rosdistro }} target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: ${{ matrix.build-depends-repos }} - name: Test if: ${{ steps.get-self-packages.outputs.self-packages != '' }} @@ -54,14 +53,15 @@ jobs: with: rosdistro: ${{ matrix.rosdistro }} target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: ${{ matrix.build-depends-repos }} - name: Upload coverage to CodeCov if: ${{ steps.test.outputs.coverage-report-files != '' }} - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: files: ${{ steps.test.outputs.coverage-report-files }} fail_ci_if_error: false verbose: true flags: total - token: ${{ secrets.CODECOV_TOKEN }} + + - name: Show disk space after the tasks + run: df -h diff --git a/.github/workflows/cancel-previous-workflows.yaml b/.github/workflows/cancel-previous-workflows.yaml index 44983f7..ee79ce0 100644 --- a/.github/workflows/cancel-previous-workflows.yaml +++ b/.github/workflows/cancel-previous-workflows.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: cancel-previous-workflows on: @@ -5,7 +9,7 @@ on: jobs: cancel-previous-workflows: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 diff --git a/.github/workflows/check-build-depends.yaml b/.github/workflows/check-build-depends.yaml deleted file mode 100644 index c790c21..0000000 --- a/.github/workflows/check-build-depends.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: check-build-depends - -on: - pull_request: - paths: - - build_depends*.repos - -jobs: - check-build-depends: - runs-on: ubuntu-latest - container: ${{ matrix.container }} - strategy: - fail-fast: false - matrix: - rosdistro: - - humble - include: - - rosdistro: humble - container: ros:humble - build-depends-repos: build_depends.repos - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Remove exec_depend - uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 - - - name: Get self packages - id: get-self-packages - uses: autowarefoundation/autoware-github-actions/get-self-packages@v1 - - - name: Build - uses: autowarefoundation/autoware-github-actions/colcon-build@v1 - with: - rosdistro: ${{ matrix.rosdistro }} - target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: ${{ matrix.build-depends-repos }} diff --git a/.github/workflows/comment-on-pr.yaml b/.github/workflows/comment-on-pr.yaml new file mode 100644 index 0000000..0f2ecf5 --- /dev/null +++ b/.github/workflows/comment-on-pr.yaml @@ -0,0 +1,29 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + +name: comment-on-pr +on: + pull_request_target: + +jobs: + comment-on-pr: + runs-on: ubuntu-22.04 + permissions: + pull-requests: write + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Initial PR comment + uses: marocchino/sticky-pull-request-comment@v2 + with: + message: | + Thank you for contributing to the Autoware project! + + 🚧 If your pull request is in progress, [switch it to draft mode](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#converting-a-pull-request-to-a-draft). + + Please ensure: + - You've checked our [contribution guidelines](https://autowarefoundation.github.io/autoware-documentation/main/contributing/). + - Your PR follows our [pull request guidelines](https://autowarefoundation.github.io/autoware-documentation/main/contributing/pull-request-guidelines/). + - All required CI checks pass before [marking the PR ready for review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review). diff --git a/.github/workflows/github-release.yaml b/.github/workflows/github-release.yaml index b426d0c..bbe2ac5 100644 --- a/.github/workflows/github-release.yaml +++ b/.github/workflows/github-release.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: github-release on: @@ -15,7 +19,7 @@ on: jobs: github-release: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Set tag name id: set-tag-name diff --git a/.github/workflows/pre-commit-autoupdate.yaml b/.github/workflows/pre-commit-autoupdate.yaml index 23b403f..60c17d9 100644 --- a/.github/workflows/pre-commit-autoupdate.yaml +++ b/.github/workflows/pre-commit-autoupdate.yaml @@ -1,8 +1,12 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: pre-commit-autoupdate on: schedule: - - cron: 0 0 * * * + - cron: 0 0 1 1,4,7,10 * # quarterly workflow_dispatch: jobs: @@ -14,7 +18,7 @@ jobs: pre-commit-autoupdate: needs: check-secret if: ${{ needs.check-secret.outputs.set == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Generate token id: generate-token diff --git a/.github/workflows/pre-commit-optional.yaml b/.github/workflows/pre-commit-optional.yaml index 3873819..3d08670 100644 --- a/.github/workflows/pre-commit-optional.yaml +++ b/.github/workflows/pre-commit-optional.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: pre-commit-optional on: @@ -5,7 +9,7 @@ on: jobs: pre-commit-optional: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Check out repository uses: actions/checkout@v4 diff --git a/.github/workflows/semantic-pull-request.yaml b/.github/workflows/semantic-pull-request.yaml index 71224c2..b56040b 100644 --- a/.github/workflows/semantic-pull-request.yaml +++ b/.github/workflows/semantic-pull-request.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: semantic-pull-request on: diff --git a/.github/workflows/spell-check-differential.yaml b/.github/workflows/spell-check-differential.yaml index 1fbf2ff..e3af432 100644 --- a/.github/workflows/spell-check-differential.yaml +++ b/.github/workflows/spell-check-differential.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: spell-check-differential on: @@ -5,7 +9,7 @@ on: jobs: spell-check-differential: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Check out repository uses: actions/checkout@v4 @@ -13,4 +17,7 @@ jobs: - name: Run spell-check uses: autowarefoundation/autoware-github-actions/spell-check@v1 with: - cspell-json-url: https://raw.githubusercontent.com/tier4/autoware-spell-check-dict/main/.cspell.json + cspell-json-url: https://raw.githubusercontent.com/autowarefoundation/autoware-spell-check-dict/main/.cspell.json + dict-packages: | + https://github.com/autowarefoundation/autoware-spell-check-dict + https://github.com/tier4/cspell-dicts diff --git a/.github/workflows/sync-files-reverse-reference.yaml b/.github/workflows/sync-files-reverse-reference.yaml deleted file mode 100644 index 8219686..0000000 --- a/.github/workflows/sync-files-reverse-reference.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: sync-files-reverse-reference - -on: - workflow_dispatch: - -jobs: - sync-files-reverse-reference: - runs-on: ubuntu-latest - steps: - - name: Generate token - id: generate-token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - name: Run sync-files - uses: autowarefoundation/autoware-github-actions/sync-files@v1 - with: - token: ${{ steps.generate-token.outputs.token }} - config: .github/sync-files-reverse-reference.yaml - pr-branch: sync-files-reverse-reference - pr-title: "chore: sync files of reverse references" - pr-commit-message: "chore: sync files of reverse references" diff --git a/.github/workflows/sync-files.yaml b/.github/workflows/sync-files.yaml index 51e523b..9224c15 100644 --- a/.github/workflows/sync-files.yaml +++ b/.github/workflows/sync-files.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: sync-files on: @@ -14,7 +18,7 @@ jobs: sync-files: needs: check-secret if: ${{ needs.check-secret.outputs.set == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Generate token id: generate-token diff --git a/.github/workflows/update-codeowners-from-packages.yaml b/.github/workflows/update-codeowners-from-packages.yaml index 8b3d240..c9ecdb1 100644 --- a/.github/workflows/update-codeowners-from-packages.yaml +++ b/.github/workflows/update-codeowners-from-packages.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + name: update-codeowners-from-packages on: @@ -14,7 +18,7 @@ jobs: update-codeowners-from-packages: needs: check-secret if: ${{ needs.check-secret.outputs.set == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Generate token id: generate-token diff --git a/.markdownlint.yaml b/.markdownlint.yaml index babaaa1..584154b 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + # See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for all rules. default: true MD013: false @@ -7,5 +11,6 @@ MD029: style: ordered MD033: false MD041: false +MD045: false MD046: false MD049: false diff --git a/.pre-commit-config-optional.yaml b/.pre-commit-config-optional.yaml index 3b43f9a..ff325af 100644 --- a/.pre-commit-config-optional.yaml +++ b/.pre-commit-config-optional.yaml @@ -1,6 +1,10 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + repos: - repo: https://github.com/tcort/markdown-link-check - rev: v3.11.2 + rev: v3.12.2 hooks: - id: markdown-link-check args: [--quiet, --config=.markdown-link-check.json] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19f33fe..48a97c1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,13 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + +# https://pre-commit.ci/#configuration ci: autofix_commit_msg: "style(pre-commit): autofix" + # we already have our own daily update mechanism, we set this to quarterly + autoupdate_schedule: quarterly + autoupdate_commit_msg: "ci(pre-commit): quarterly autoupdate" repos: - repo: https://github.com/pre-commit/pre-commit-hooks @@ -18,7 +26,7 @@ repos: args: [--markdown-linebreak-ext=md] - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.42.0 + rev: v0.43.0 hooks: - id: markdownlint args: [-c, .markdownlint.yaml, --fix] @@ -49,7 +57,7 @@ repos: - id: shellcheck - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.10.0-1 + rev: v3.10.0-2 hooks: - id: shfmt args: [-w, -s, -i=4] @@ -66,7 +74,7 @@ repos: args: [--line-length=100] - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v19.1.2 + rev: v19.1.5 hooks: - id: clang-format types_or: [c++, c, cuda] @@ -79,7 +87,7 @@ repos: exclude: .cu - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.30.0 hooks: - id: check-metaschema files: ^.+/schema/.*schema\.json$ @@ -93,3 +101,9 @@ repos: language: node files: .svg$ additional_dependencies: [prettier@2.7.1, "@prettier/plugin-xml@2.2.0"] + + - repo: https://github.com/AleksaC/hadolint-py + rev: v2.12.1b3 + hooks: + - id: hadolint + exclude: .svg$ diff --git a/.prettierignore b/.prettierignore index a3c34d0..3e96aac 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,6 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + *.param.yaml *.rviz diff --git a/.prettierrc.yaml b/.prettierrc.yaml index e29bf32..fe47693 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + printWidth: 100 tabWidth: 2 overrides: diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..e0be62d --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,26 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + +extends: default + +ignore: | + *.param.yaml + +rules: + braces: + level: error + max-spaces-inside: 1 # To format with Prettier + comments: + level: error + min-spaces-from-content: 1 # To be compatible with C++ and Python + document-start: + level: error + present: false # Don't need document start markers + line-length: disable # Delegate to Prettier + truthy: + level: error + check-keys: false # To allow 'on' of GitHub Actions + quoted-strings: + level: error + required: only-when-needed # To keep consistent style diff --git a/CPPLINT.cfg b/CPPLINT.cfg index ba6bdf0..159042d 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -1,12 +1,18 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + # Modified from https://github.com/ament/ament_lint/blob/ebd524bb9973d5ec1dc48a670ce54f958a5a0243/ament_cpplint/ament_cpplint/main.py#L64-L120 set noparent linelength=100 includeorder=standardcfirst filter=-build/c++11 # we do allow C++11 +filter=-build/c++17 # we allow filter=-build/namespaces_literals # we allow using namespace for literals filter=-runtime/references # we consider passing non-const references to be ok filter=-whitespace/braces # we wrap open curly braces for namespaces, classes and functions filter=-whitespace/indent # we don't indent keywords like public, protected and private with one space +filter=-whitespace/newline # we allow the developer to decide about newline at the end of file (it's clashing with clang-format) filter=-whitespace/parens # we allow closing parenthesis to be on the next line filter=-whitespace/semicolon # we allow the developer to decide about whitespace after a semicolon filter=-build/header_guard # we automatically fix the names of header guards using pre-commit diff --git a/autoware_utils/test/src/ros/test_uuid_helper.cpp b/autoware_utils/test/src/ros/test_uuid_helper.cpp index 05434fb..f8f7416 100644 --- a/autoware_utils/test/src/ros/test_uuid_helper.cpp +++ b/autoware_utils/test/src/ros/test_uuid_helper.cpp @@ -18,6 +18,8 @@ #include +#include + TEST(UUIDHelperTest, generate_uuid) { // Generate two UUIDs and ensure they are all different diff --git a/codecov.yaml b/codecov.yaml index 8ca2196..be19b8a 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -1,3 +1,7 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + coverage: status: project: diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..4d7d5e5 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,19 @@ +# This file is automatically synced from: +# https://github.com/autowarefoundation/sync-file-templates +# To make changes, update the source repository and follow the guidelines in its README. + +[flake8] +# Modified from https://github.com/ament/ament_lint/blob/ebd524bb9973d5ec1dc48a670ce54f958a5a0243/ament_flake8/ament_flake8/configuration/ament_flake8.ini +extend-ignore = B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202,CNL100,E203,E501,Q000 +import-order-style = pep8 +max-line-length = 100 +show-source = true +statistics = true + +[isort] +profile=black +line_length=100 +force_sort_within_sections=true +force_single_line=true +reverse_relative=true +known_third_party=launch