forked from RobotWebTools/rosbridge_suite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate remaining linters to pre-commit (RobotWebTools#657)
Follow up from RobotWebTools#648: - Remove separate `pre-commit.yaml` Github workflow in favor of existing `ci.yml` workflow - Removed unused json and toml linters from `.pre-commit-config.yaml` - `isort` is updated to v5.9.3 - `bandit`, `codespell`, and `flake8` are migrated to `.pre-commit-config.yaml` so all linters are in one place - Fixed wildcard and invalid imports in `rosapi_node` which were missed by RobotWebTools#609 (due to not having a .py extension)
- Loading branch information
Showing
4 changed files
with
55 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -7,13 +7,12 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
- run: pip install bandit codespell flake8 | ||
- run: bandit --recursive --skip B101,B110,B311 . | ||
- run: codespell | ||
- run: flake8 | ||
|
||
- uses: pre-commit/[email protected] | ||
|
||
test: | ||
strategy: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains 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,47 +1,43 @@ | ||
# Modified from https://github.com/ros-planning/moveit2/blob/d184714751b347a2389cf1e8742b1be94eed63b8/.pre-commit-config.yaml | ||
# | ||
# 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 | ||
|
||
# See https://pre-commit.com for more information | ||
repos: | ||
# Standard hooks | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: destroyed-symlinks | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: pretty-format-json | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.9.3 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 21.9b0 | ||
hooks: | ||
- id: black | ||
args: ["--line-length=100"] | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.8.0 | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
- id: flake8 | ||
|
||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.0 | ||
hooks: | ||
- id: bandit | ||
args: ["--skip", "B101,B110,B311"] | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.1.0 | ||
hooks: | ||
- id: codespell |
This file contains 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