Skip to content

Commit

Permalink
Add files for format CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dyackzan committed Nov 9, 2023
1 parent cd49bab commit b1581ff
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Format

on:
workflow_dispatch:
pull_request:
push:
branches:
- ros2

jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
77 changes: 77 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# To use:
#
# pre-commit run -a
#
# Or:
#
# pre-commit install # (runs every time you commit in git)
#
# To update this file:
#
# pre-commit autoupdate
#
# See https://github.com/pre-commit/pre-commit
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
args: ["--unsafe"] # Fixes errors parsing custom YAML constructors like ur_description's !degrees
exclude: 'src/moveit_studio_web/pnpm-lock.yaml'
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: fix-byte-order-marker

- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black

- repo: https://github.com/codespell-project/codespell
rev: v2.0.0
hooks:
- id: codespell
args: ["--write-changes", "-L", "atleast,inout,ether"] # Provide a comma-separated list of misspelled words that codespell should ignore (for example: '-L', 'word1,word2,word3').
exclude: (\.(svg|pyc|stl|dae|asc)|pnpm-lock.yaml)$

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
hooks:
- id: clang-format
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|m|proto|vert)$
# -i arg is included by default by the hook
args: ["-fallback-style=none"]

- repo: https://github.com/adrienverge/yamllint
rev: v1.27.1
hooks:
- id: yamllint
args:
[
"--no-warnings",
"--config-data",
"{extends: default, rules: {line-length: disable, braces: {max-spaces-inside: 1}}}",
]
types: [text]
files: \.(yml|yaml)$
exclude: 'src/moveit_studio_web/pnpm-lock.yaml'

- repo: https://github.com/tcort/markdown-link-check
rev: v3.10.3
hooks:
- id: markdown-link-check
args:
- "-c"
- "markdown-link-check-config.json"

- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- id: hadolint-docker
1 change: 1 addition & 0 deletions markdown-link-check-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"ignorePatterns": [{"pattern": "^https://docs.google.com"}]}

0 comments on commit b1581ff

Please sign in to comment.