Skip to content

Commit 6610713

Browse files
Add pre-commit
Signed-off-by: Nils-ChristianIseke <[email protected]>
1 parent 5c763e2 commit 6610713

File tree

144 files changed

+489
-405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+489
-405
lines changed

.devcontainer/caddy/Caddyfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
}
1212
# If any http scheme is "https", then use "wss"
1313
vars @http_scheme WsScheme "wss"
14-
# Else default to "ws"
15-
vars WsScheme "ws"
14+
# Else default to "ws" #codespell:ignore ws
15+
vars WsScheme "ws" #codespell:ignore ws
1616

1717
# Matcher for forwarded request headers
1818
@host_forwarded {

.devcontainer/caddy/srv/assets/foxglove/nav2_layout.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,4 +460,4 @@
460460
"direction": "row",
461461
"splitPercentage": 74.87855655794587
462462
}
463-
}
463+
}

.devcontainer/caddy/srv/nav2/github-markdown.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,4 +1099,4 @@
10991099

11001100
.markdown-body ::-webkit-calendar-picker-indicator {
11011101
filter: invert(50%);
1102-
}
1102+
}

.github/mergify.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pull_request_rules:
77
backport:
88
branches:
99
- jazzy
10-
10+
1111
- name: backport to iron at reviewers discretion
1212
conditions:
1313
- base=main
@@ -16,7 +16,7 @@ pull_request_rules:
1616
backport:
1717
branches:
1818
- iron
19-
19+
2020
- name: backport to humble at reviewers discretion
2121
conditions:
2222
- base=main

.github/workflows/codespell.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Codespell
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
codespell:
7+
name: Run codespell
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Set up Python
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.x'
15+
- name: Install codespell
16+
run: pip install codespell
17+
- name: Run codespell
18+
run: codespell --config /opt/overlay_ws/src/navigation2/tools/pyproject.toml

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
linter: [xmllint, cpplint, uncrustify, pep257, flake8]
14+
linter: [xmllint, cpplint, uncrustify, pep257, flake8, mypy]
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: ros-tooling/[email protected]

.pre-commit-config.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# To use:
2+
#
3+
# pre-commit run -a
4+
#
5+
# Or:
6+
#
7+
# pre-commit install # (runs every time you commit in git)
8+
#
9+
# To update this file:
10+
#
11+
# pre-commit autoupdate
12+
#
13+
# See https://github.com/pre-commit/pre-commit
14+
exclude: ".pgm$|.svg$"
15+
repos:
16+
- repo: https://github.com/pre-commit/pre-commit-hooks
17+
rev: v5.0.0
18+
hooks:
19+
- id: check-added-large-files
20+
- id: check-ast
21+
- id: check-case-conflict
22+
- id: check-docstring-first
23+
- id: check-merge-conflict
24+
- id: check-symlinks
25+
- id: check-xml
26+
- id: check-yaml
27+
args: ["--allow-multiple-documents"]
28+
- id: debug-statements
29+
- id: end-of-file-fixer
30+
- id: mixed-line-ending
31+
- id: trailing-whitespace
32+
exclude_types: [rst]
33+
- id: fix-byte-order-marker
34+
- repo: https://github.com/python-jsonschema/check-jsonschema
35+
rev: 0.31.1
36+
hooks:
37+
- id: check-github-workflows
38+
args: ["--verbose"]
39+
- id: check-github-actions
40+
args: ["--verbose"]
41+
- id: check-dependabot
42+
args: ["--verbose"]
43+
- repo: local
44+
hooks:
45+
- id: ament_lint_cmake
46+
name: ament_lint_cmake
47+
description: Check CMake code style using cmakelint.
48+
language: system
49+
types: [cmake]
50+
entry: ament_lint_cmake
51+
- id: ament_cpplint
52+
name: ament_cpplint
53+
description: Code style checking using cpplint.
54+
language: system
55+
types: [c++]
56+
entry: ament_cpplint
57+
- id: ament_uncrustify
58+
name: ament_uncrustify
59+
description: Code style checking using uncrustify.
60+
language: system
61+
types: [c++]
62+
args: ["--reformat"]
63+
entry: ament_uncrustify
64+
- id: ament_xmllint
65+
name: ament_xmllint
66+
description: Check XML markup using xmllint.
67+
language: system
68+
types: [xml]
69+
entry: ament_xmllint
70+
- id: ament_flake8
71+
name: ament_flake8
72+
description: Check Python code style using flake8.
73+
language: system
74+
types: [python]
75+
args: ["."]
76+
entry: ament_flake8
77+
- id: ament_pep257
78+
name: ament_pep257
79+
description: Check Python code style using pep257.
80+
language: system
81+
types: [python]
82+
entry: ament_pep257
83+
- repo: https://github.com/codespell-project/codespell
84+
rev: v2.4.1
85+
hooks:
86+
- id: codespell
87+
additional_dependencies:
88+
- tomli
89+
args:
90+
[--toml=./tools/pyproject.toml]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ RUN mkdir -p $ROOT_SRV
168168

169169
# install demo dependencies
170170
RUN apt-get update && apt-get install -y \
171-
ros-$ROS_DISTRO-rviz2
171+
ros-$ROS_DISTRO-rviz2
172172

173173
# install gzweb dependacies
174174
RUN apt-get install -y --no-install-recommends \

0 commit comments

Comments
 (0)