-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from mintar/add-precommit-checks
Add pre-commit checks
- Loading branch information
Showing
44 changed files
with
1,281 additions
and
648 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[flake8] | ||
# The line length here has to match the black config in pyproject.toml | ||
max-line-length = 120 | ||
exclude = | ||
.git, | ||
__pycache__ | ||
extend-ignore = | ||
# See https://github.com/PyCQA/pycodestyle/issues/373 | ||
E203, | ||
E741, |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Style file for markdownlint | ||
|
||
all | ||
|
||
exclude_rule 'fenced-code-language' # Fenced code blocks should have a language specified | ||
exclude_rule 'first-line-h1' # First line in file should be a top level header | ||
|
||
exclude_rule 'ul-style' | ||
|
||
exclude_rule 'no-multiple-blanks' | ||
|
||
exclude_rule 'header-style' | ||
|
||
exclude_rule 'no-bare-urls' | ||
|
||
# Line lenght | ||
rule 'MD013', :line_length => 120, :code_blocks => false, :tables => false | ||
|
||
# Unordered list indentation | ||
rule 'MD007', :indent => 2 | ||
|
||
# Ordered list item prefix | ||
rule 'MD029', :style => 'ordered' | ||
|
||
# Multiple headers with the same content | ||
rule 'no-duplicate-header', :allow_different_nesting => true |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
git_recurse true | ||
style ".mdl_style.rb" |
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# 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: v4.1.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-symlinks | ||
- id: check-vcs-permalinks | ||
- id: check-xml | ||
- id: check-yaml | ||
exclude: mobipick_description/config/joint_limits.yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
exclude: &excludes | | ||
(?x)^( | ||
.*\.blend| | ||
.*\.dae| | ||
.*\.mtl| | ||
.*\.obj| | ||
.*\.pgm| | ||
.*\.step| | ||
.*\.stl | ||
)$ | ||
- id: fix-byte-order-marker | ||
- id: mixed-line-ending | ||
exclude: *excludes | ||
- id: trailing-whitespace | ||
exclude: *excludes | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/PyCQA/flake8.git | ||
rev: 5.0.4 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/markdownlint/markdownlint | ||
rev: v0.11.0 | ||
hooks: | ||
- id: markdownlint | ||
|
||
- repo: local | ||
hooks: | ||
- id: catkin_lint | ||
name: catkin_lint | ||
description: Check package.xml and cmake files | ||
entry: catkin_lint . | ||
language: system | ||
always_run: true | ||
pass_filenames: false | ||
args: [ "--strict", "--ignore", "UNINSTALLED_SCRIPT" ] |
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
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,3 +1,26 @@ | ||
# grasplan | ||
|
||
Documentation can be found under: https://grasplan-documentation.readthedocs.io/en/latest/ | ||
|
||
|
||
pre-commit Formatting Checks | ||
---------------------------- | ||
|
||
This repo has a [pre-commit](https://pre-commit.com/) check that runs in CI. | ||
You can use this locally and set it up to run automatically before you commit | ||
something. To install, use pip: | ||
|
||
```bash | ||
pip3 install --user pre-commit | ||
``` | ||
|
||
To run over all the files in the repo manually: | ||
|
||
```bash | ||
pre-commit run -a | ||
``` | ||
|
||
To run pre-commit automatically before committing in the local repo, install the git hooks: | ||
|
||
```bash | ||
pre-commit install |
Empty file.
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
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
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
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 |
---|---|---|
|
@@ -8,35 +8,49 @@ | |
|
||
<license>MIT</license> | ||
|
||
<author email="[email protected]">Oscar Lima</author> | ||
<author email="[email protected]">Oscar Lima</author> | ||
|
||
<build_export_depend>actionlib_msgs</build_export_depend> | ||
<build_export_depend>dynamic_reconfigure</build_export_depend> | ||
<build_export_depend>geometry_msgs</build_export_depend> | ||
<build_export_depend>rqt_gui</build_export_depend> | ||
<build_export_depend>rqt_gui_py</build_export_depend> | ||
<build_export_depend>dynamic_reconfigure</build_export_depend> | ||
<build_export_depend>std_msgs</build_export_depend> | ||
|
||
<build_depend>actionlib_msgs</build_depend> | ||
<build_depend>dynamic_reconfigure</build_depend> | ||
<build_depend>geometry_msgs</build_depend> | ||
<build_depend>message_generation</build_depend> | ||
<build_depend>rqt_gui</build_depend> | ||
<build_depend>rqt_gui_py</build_depend> | ||
<build_depend>std_msgs</build_depend> | ||
|
||
<exec_depend>actionlib</exec_depend> | ||
<exec_depend>actionlib_msgs</exec_depend> | ||
<exec_depend>dynamic_reconfigure</exec_depend> | ||
<exec_depend>gazebo_ros</exec_depend> | ||
<exec_depend>geometry_msgs</exec_depend> | ||
<exec_depend>message_runtime</exec_depend> | ||
<exec_depend>mobipick_description</exec_depend> | ||
<exec_depend>mobipick_gazebo</exec_depend> | ||
<exec_depend>mobipick_pick_n_place</exec_depend> | ||
<exec_depend>moveit_commander</exec_depend> | ||
<exec_depend>moveit_msgs</exec_depend> | ||
<exec_depend>rostopic</exec_depend> | ||
<exec_depend>rqt_gui</exec_depend> | ||
<exec_depend>rqt_gui_py</exec_depend> | ||
<exec_depend>rviz</exec_depend> | ||
<exec_depend>spacenav_node</exec_depend> | ||
<exec_depend>std_msgs</exec_depend> | ||
<exec_depend>std_srvs</exec_depend> | ||
<exec_depend>tables_demo_bringup</exec_depend> | ||
<exec_depend>tf</exec_depend> | ||
<exec_depend>trajectory_msgs</exec_depend> | ||
<exec_depend>xacro</exec_depend> | ||
|
||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<export> | ||
<rqt_gui plugin="${prefix}/plugin.xml"/> | ||
<rqt_gui plugin="${prefix}/plugin.xml"/> | ||
</export> | ||
|
||
</package> |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[tool.black] | ||
line-length = 120 | ||
target-version = ['py38'] | ||
skip-string-normalization = true |
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
Oops, something went wrong.