Skip to content

Commit b80d5a1

Browse files
Suggestion for a pre-commit config.
Signed-off-by: Nils-ChristianIseke <nilsmailiseke@gmail.com>
1 parent 5c763e2 commit b80d5a1

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

‎.pre-commit-config.yaml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# To use:
2+
#
3+
# pre-commit run -a
4+
#
5+
# Or:
6+
#
7+
# pre-commit install # (runs every time you commit in git)
8+
#
9+
# To update this file:
10+
#
11+
# pre-commit autoupdate
12+
#
13+
# See https://github.com/pre-commit/pre-commit
14+
15+
repos:
16+
- repo: local
17+
hooks:
18+
- id: ament_lint_cmake
19+
name: ament_lint_cmake
20+
description: Check CMake code style using cmakelint.
21+
language: system
22+
types: [cmake]
23+
entry: ament_lint_cmake
24+
- id: ament_cpplint
25+
name: ament_cpplint
26+
description: Code style checking using cpplint.
27+
language: system
28+
types: [c++]
29+
entry: ament_cpplint
30+
- id: ament_uncrustify
31+
name: ament_uncrustify
32+
description: Code style checking using uncrustify.
33+
language: system
34+
types: [c++]
35+
args: ["--reformat"]
36+
entry: ament_uncrustify
37+
- id: ament_xmllint
38+
name: ament_xmllint
39+
description: Check XML markup using xmllint.
40+
language: system
41+
types: [xml]
42+
entry: ament_xmllint

‎nav2_common/cmake/nav2_package.cmake‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ macro(nav2_package)
2929

3030
# Default to C++17
3131
if(NOT CMAKE_CXX_STANDARD)
32-
if ("cxx_std_17" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
32+
if("cxx_std_17" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
3333
set(CMAKE_CXX_STANDARD 17)
3434
else()
35-
message( FATAL_ERROR "cxx_std_17 could not be found.")
35+
message(FATAL_ERROR "cxx_std_17 could not be found.")
3636
endif()
3737
endif()
3838

0 commit comments

Comments
 (0)