Skip to content

Commit b9ccf04

Browse files
authored
Remove version from clang-format (ros-controls#297)
* feat: clang-format * clang-format-12 * wip: clang-11 to keep compatibility
1 parent 8dd2b5f commit b9ccf04

File tree

4 files changed

+29
-30
lines changed

4 files changed

+29
-30
lines changed

‎.clang-format‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
Language: Cpp
3-
BasedOnStyle: Google
2+
Language: Cpp
3+
BasedOnStyle: Google
44

55
ColumnLimit: 100
66
AccessModifierOffset: -2
@@ -12,4 +12,3 @@ DerivePointerAlignment: false
1212
PointerAlignment: Middle
1313
ReflowComments: false
1414
IncludeBlocks: Preserve
15-
...

‎.github/workflows/ci.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- master
77
schedule:
88
# Run every morning to detect flakiness and broken dependencies
9-
- cron: '17 8 * * *'
9+
- cron: "17 8 * * *"
1010
env:
1111
ROS_DISTRO: galactic
1212

@@ -15,15 +15,15 @@ jobs:
1515
name: industrial ci
1616
runs-on: ubuntu-latest
1717
strategy:
18-
matrix:
19-
ROS_REPO: [main, testing]
18+
matrix:
19+
ROS_REPO: [main, testing]
2020
env:
21-
UPSTREAM_WORKSPACE: .github/workspace.repos
21+
UPSTREAM_WORKSPACE: .github/workspace.repos
2222
steps:
23-
- uses: actions/checkout@v2
24-
- uses: ros-industrial/industrial_ci@master
25-
env:
26-
ROS_REPO: ${{ matrix.ROS_REPO }}
23+
- uses: actions/checkout@v2
24+
- uses: ros-industrial/industrial_ci@master
25+
env:
26+
ROS_REPO: ${{ matrix.ROS_REPO }}
2727

2828
ros-tooling-ci:
2929
name: ros-tooling ci

‎.github/workflows/format.yml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
name: Format
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v2
19-
- uses: actions/setup-python@v2
20-
with:
21-
python-version: 3.9.7
22-
- name: Install clang-format-10
23-
run: sudo apt-get install clang-format-10 cppcheck
24-
- uses: pre-commit/action@v2.0.3
25-
with:
26-
extra_args: --all-files --hook-stage manual
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-python@v2
20+
with:
21+
python-version: 3.9.7
22+
- name: Install clang-format
23+
run: sudo apt install -qq clang-format-11 cppcheck
24+
- uses: pre-commit/action@v2.0.3
25+
with:
26+
extra_args: --all-files --hook-stage manual

‎.pre-commit-config.yaml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# To use:
32
#
43
# pre-commit run -a
@@ -36,32 +35,33 @@ repos:
3635
- repo: https://github.com/asottile/pyupgrade
3736
rev: v2.12.0
3837
hooks:
39-
- id: pyupgrade
38+
- id: pyupgrade
4039
args: [--py36-plus]
4140

4241
# PEP 257
4342
- repo: https://github.com/FalconSocial/pre-commit-mirrors-pep257
4443
rev: v0.3.3
4544
hooks:
46-
- id: pep257
47-
args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"]
45+
- id: pep257
46+
args:
47+
["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"]
4848

4949
- repo: https://github.com/pycqa/flake8
5050
rev: 3.9.0
5151
hooks:
52-
- id: flake8
53-
args: ["--ignore=E501"]
52+
- id: flake8
53+
args: ["--ignore=E501"]
5454

5555
# CPP hooks
5656
- repo: local
5757
hooks:
5858
- id: clang-format
5959
name: clang-format
6060
description: Format files with ClangFormat.
61-
entry: clang-format-10
61+
entry: clang-format-11
6262
language: system
6363
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
64-
args: ['-fallback-style=none', '-i']
64+
args: ["-fallback-style=none", "-i"]
6565

6666
- repo: local
6767
hooks:
@@ -111,7 +111,7 @@ repos:
111111
rev: 0.9.0a1
112112
hooks:
113113
- id: doc8
114-
args: ['--max-line-length=100', '--ignore=D001']
114+
args: ["--max-line-length=100", "--ignore=D001"]
115115
exclude: CHANGELOG\.rst$
116116

117117
- repo: https://github.com/pre-commit/pygrep-hooks
@@ -128,5 +128,5 @@ repos:
128128
rev: v2.0.0
129129
hooks:
130130
- id: codespell
131-
args: ['--write-changes']
131+
args: ["--write-changes"]
132132
exclude: CHANGELOG\.rst|\.(svg|pyc)$

0 commit comments

Comments
 (0)