Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---

repos:
- repo: https://github.com/polymathrobotics/polymath_code_standard
rev: v2.1.1
hooks:
# Everything
- id: polymath-general
- id: polymath-copyright
args: [--license, Apache-2.0, --wildcard-copyright-org, --reuse-style]
# Implementation
- id: polymath-json
- id: polymath-python
# Mark(up/down)
- id: polymath-markdown
- id: polymath-shell
# Lint shipped/deployment shell (host/setup/*). The dev-only bench and
# chaos harnesses under test/ and tools/ rely on intentional word
# splitting (tc/netem/curl argument expansion, e.g. `netem $1`), so they
# are exempt here rather than peppered with disable directives.
exclude: ^(test/|tools/).*\.sh$
- id: polymath-xml
- id: polymath-yaml

# Opt-in gate for the ROS 2 ament linters that ros2_build.yml enforces
# (flake8 / pep257 / uncrustify / xmllint / lint_cmake on jazzy). Runs ONLY on
# `git push`, never on commit or `pre-commit run --all-files`, so it does not
# slow the normal flow. Needs Docker; no local ROS install. Enable with
# `pre-commit install --hook-type pre-push`; skip once with `git push
# --no-verify` or `SKIP=ros2-ament-lint git push`.
- repo: local
hooks:
- id: ros2-ament-lint
name: ROS 2 ament lint (jazzy, via Docker)
entry: scripts/ros2_lint.sh
language: script
stages: [pre-push]
pass_filenames: false
files: ^(ros2|archive)/
Loading