Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(pre-commit): autoupdate #91

Merged
merged 2 commits into from
Mar 26, 2023
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
rev: v0.33.0
hooks:
- id: markdownlint
args: [-c, .markdownlint.yaml, --fix]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
rev: v3.0.0-alpha.6
hooks:
- id: prettier

- repo: https://github.com/adrienverge/yamllint
rev: v1.28.0
rev: v1.29.0
hooks:
- id: yamllint

Expand All @@ -45,12 +45,12 @@ repos:
args: [-w, -s, -i=4]

- repo: https://github.com/pycqa/isort
rev: v5.11.3
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
args: [--line-length=100]
Expand All @@ -72,7 +72,7 @@ repos:
]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v15.0.6
rev: v15.0.7
hooks:
- id: clang-format
types_or: [c++, c, cuda]
Expand Down
2 changes: 0 additions & 2 deletions pre_commit_hooks/ros_include_guard.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def prepare(self, macro_name):


def get_include_guard_info(lines):

guard = IncludeGuard()
for line, text in enumerate(lines):
if text.startswith("#pragma once"):
Expand Down Expand Up @@ -108,7 +107,6 @@ def get_include_guard_macro_name(filepath):


def main(argv=None):

parser = argparse.ArgumentParser()
parser.add_argument("filenames", nargs="*", type=Path, help="Filenames to fix")
args = parser.parse_args(argv)
Expand Down
2 changes: 0 additions & 2 deletions tests/test_ros_include_guard.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

@pytest.mark.parametrize(("target_file"), cases_auto_fix)
def test_auto_fix(target_file, datadir):

target_path = datadir.joinpath(target_file)
right_path = target_path.with_suffix(".right" + target_path.suffix)
wrong_path = target_path.with_suffix(".wrong" + target_path.suffix)
Expand All @@ -43,7 +42,6 @@ def test_auto_fix(target_file, datadir):

@pytest.mark.parametrize(("target_file", "answer_code"), cases_no_fix)
def test_no_fix(target_file, answer_code, datadir):

target_path = datadir.joinpath(target_file)
return_code = ros_include_guard.main([str(target_path)])
assert return_code == answer_code