Skip to content

Commit

Permalink
Update pre-commit config and fix codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Feb 19, 2024
1 parent a0b968b commit c6164c2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
40 changes: 23 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -36,47 +36,43 @@ repos:

# Python hooks
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py36-plus]

- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
args: ["--line-length=99"]

# PyDocStyle
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"]

- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
args: ["--line-length=99"]

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
args: ["--extend-ignore=E501"]

# CPP hooks
- repo: local
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
hooks:
- id: clang-format
name: clang-format
description: Format files with ClangFormat.
entry: clang-format-14
language: system
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
args: ['-fallback-style=none', '-i']

- repo: local
hooks:
- id: ament_cppcheck
name: ament_cppcheck
description: Static code analysis of C/C++ files.
entry: ament_cppcheck
entry: env AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS=1 ament_cppcheck
language: system
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$

Expand Down Expand Up @@ -128,8 +124,18 @@ repos:
# Spellcheck in comments and docs
# skipping of *.svg files is not working...
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.6
hooks:
- id: codespell
args: ['--write-changes']
exclude: CHANGELOG\.rst|\.(svg|pyc)$

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.0
hooks:
- id: check-github-workflows
args: ["--verbose"]
- id: check-github-actions
args: ["--verbose"]
- id: check-dependabot
args: ["--verbose"]
2 changes: 1 addition & 1 deletion src/sine_sweep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool SineSweep::init(double start_freq, double end_freq, double duration, double

amplitude_ = amplitude;
duration_ = rclcpp::Duration::from_seconds(duration);
// calculate the angular fequencies
// calculate the angular frequencies
start_angular_freq_ = 2 * M_PI * start_freq;
end_angular_freq_ = 2 * M_PI * end_freq;

Expand Down

0 comments on commit c6164c2

Please sign in to comment.