Skip to content

Commit 00a051c

Browse files
Increase base linters (#29)
* Added yamllint to standardise yaml files. Signed-off-by: Leander Stephen D'Souza <leanderdsouza1234@gmail.com> * Added doc8 for standardizing incoming Changelog. Signed-off-by: Leander Stephen D'Souza <leanderdsouza1234@gmail.com> --------- Signed-off-by: Leander Stephen D'Souza <leanderdsouza1234@gmail.com>
1 parent 0e98339 commit 00a051c

File tree

4 files changed

+74
-55
lines changed

4 files changed

+74
-55
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
---
12
name: Lint
23

34
on:
45
pull_request:
56
push:
6-
branches: [ main ]
7+
branches: main
78

89
jobs:
910
pre-commit:

.pre-commit-config.yaml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
1+
---
12
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
34
rev: v5.0.0
45
hooks:
56
- id: end-of-file-fixer
67
- id: mixed-line-ending
78
- id: trailing-whitespace
89

9-
- repo: https://github.com/pycqa/isort
10+
- repo: https://github.com/pycqa/isort
1011
rev: 6.0.1
1112
hooks:
1213
- id: isort
1314
types: [python]
1415

15-
- repo: https://github.com/codespell-project/codespell
16+
- repo: https://github.com/codespell-project/codespell
1617
rev: v2.4.1
1718
hooks:
18-
- id: codespell
19+
- id: codespell
1920

20-
- repo: https://github.com/leander-dsouza/ament-lint-pre-commit-hooks.git
21+
- repo: https://github.com/adrienverge/yamllint.git
22+
rev: v1.37.1
23+
hooks:
24+
- id: yamllint
25+
args: [--strict, -c=.yamllint.yaml]
26+
27+
- repo: https://github.com/pycqa/doc8
28+
rev: v2.0.0
29+
hooks:
30+
- id: doc8
31+
32+
- repo: https://github.com/leander-dsouza/ament-lint-pre-commit-hooks.git
2133
rev: v1.0.0
2234
hooks:
23-
- id: ament_cpplint
24-
- id: ament_flake8
25-
- id: ament_lint_cmake
26-
- id: ament_mypy
27-
- id: ament_pep257
28-
- id: ament_uncrustify
29-
- id: ament_xmllint
35+
- id: ament_cpplint
36+
- id: ament_flake8
37+
- id: ament_lint_cmake
38+
- id: ament_mypy
39+
- id: ament_pep257
40+
- id: ament_uncrustify
41+
- id: ament_xmllint

.pre-commit-hooks.yaml

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,49 @@
1-
- id: ament_cpplint
2-
name: ament_cpplint
3-
description: Code style checking using cpplint.
4-
language: python
5-
entry: ament_cpplint
6-
types: [c++]
1+
---
2+
- id: ament_cpplint
3+
name: ament_cpplint
4+
description: Code style checking using cpplint.
5+
language: python
6+
entry: ament_cpplint
7+
types: [c++]
78

8-
- id: ament_flake8
9-
name: ament_flake8
10-
description: Check Python code style using flake8.
11-
language: python
12-
entry: ament_flake8
13-
types: [python]
9+
- id: ament_flake8
10+
name: ament_flake8
11+
description: Check Python code style using flake8.
12+
language: python
13+
entry: ament_flake8
14+
types: [python]
1415

15-
- id: ament_lint_cmake
16-
name: ament_lint_cmake
17-
description: Check CMake code style using cmakelint.
18-
language: python
19-
entry: ament_lint_cmake
20-
types: [cmake]
16+
- id: ament_lint_cmake
17+
name: ament_lint_cmake
18+
description: Check CMake code style using cmakelint.
19+
language: python
20+
entry: ament_lint_cmake
21+
types: [cmake]
2122

22-
- id: ament_mypy
23-
name: ament_mypy
24-
description: Check Python code style using mypy.
25-
language: python
26-
entry: ament_mypy
27-
types: [python]
23+
- id: ament_mypy
24+
name: ament_mypy
25+
description: Check Python code style using mypy.
26+
language: python
27+
entry: ament_mypy
28+
types: [python]
2829

29-
- id: ament_pep257
30-
name: ament_pep257
31-
description: Check Python code style using pep257.
32-
language: python
33-
entry: ament_pep257
34-
types: [python]
30+
- id: ament_pep257
31+
name: ament_pep257
32+
description: Check Python code style using pep257.
33+
language: python
34+
entry: ament_pep257
35+
types: [python]
3536

36-
- id: ament_uncrustify
37-
name: ament_uncrustify
38-
description: Code style checking using uncrustify.
39-
language: python
40-
entry: ament_uncrustify
41-
types: [c++]
37+
- id: ament_uncrustify
38+
name: ament_uncrustify
39+
description: Code style checking using uncrustify.
40+
language: python
41+
entry: ament_uncrustify
42+
types: [c++]
4243

43-
- id: ament_xmllint
44-
name: ament_xmllint
45-
description: Check XML markup using xmllint.
46-
language: python
47-
entry: ament_xmllint
48-
types: [xml]
44+
- id: ament_xmllint
45+
name: ament_xmllint
46+
description: Check XML markup using xmllint.
47+
language: python
48+
entry: ament_xmllint
49+
types: [xml]

.yamllint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
extends: default
3+
4+
rules:
5+
truthy: disable # Prevent false positives on 'on:' in GitHub workflows

0 commit comments

Comments
 (0)