Skip to content

Commit 8b84a09

Browse files
authored
Merge pull request #12 from per1234/sync-ci-config
Sync CI configuration files with templates
2 parents 4991b2e + 14e7fce commit 8b84a09

File tree

6 files changed

+50
-38
lines changed

6 files changed

+50
-38
lines changed

.codespellrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check/.codespellrc
12
# See: https://github.com/codespell-project/codespell#using-a-config-file
23
[codespell]
3-
builtin = clear,informal,en-GB_to_en-US
44
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
55
ignore-words-list = ,
6+
skip = ./.git,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock
7+
builtin = clear,informal,en-GB_to_en-US
68
check-filenames =
79
check-hidden =
8-
skip = ./.git

.ecrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"Exclude": ["LICENSE.txt"]
2+
"Exclude": [
3+
"^LICENSE\\.txt$",
4+
"^poetry\\.lock$"
5+
]
36
}

.editorconfig

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/general/.editorconfig
12
# See: https://editorconfig.org/
2-
# The formatting style defined in this file is the official standardized style to be used in all Arduino projects and
3-
# should not be modified.
3+
# The formatting style defined in this file is the official standardized style to be used in all Arduino Tooling
4+
# projects and should not be modified.
45
# Note: indent style for each file type is defined even when it matches the universal config in order to make it clear
56
# that this type has an official style.
67

@@ -24,7 +25,7 @@ indent_style = space
2425
indent_size = 2
2526
indent_style = space
2627

27-
[*.go]
28+
[*.{go,mod}]
2829
indent_style = tab
2930

3031
[*.java]
@@ -39,6 +40,10 @@ indent_style = space
3940
indent_size = unset
4041
indent_style = space
4142

43+
[*.proto]
44+
indent_size = 2
45+
indent_style = space
46+
4247
[*.py]
4348
indent_size = 4
4449
indent_style = space
@@ -50,3 +55,6 @@ indent_style = space
5055
[*.{yaml,yml}]
5156
indent_size = 2
5257
indent_style = space
58+
59+
[{.gitconfig,.gitmodules}]
60+
indent_style = tab

.github/workflows/check-yaml.yml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -59,42 +59,20 @@ jobs:
5959
# yamllint's "github" output type produces annotated diffs, but is not useful to humans reading the log.
6060
format: github
6161
# The other matrix job is used to set the result, so this job is configured to always pass.
62-
fail-command: "true"
62+
continue-on-error: true
6363
- name: Check formatting
6464
# yamllint's "colored" output type is most suitable for humans reading the log.
6565
format: colored
66-
fail-command: "false"
66+
continue-on-error: false
6767

6868
steps:
6969
- name: Checkout repository
7070
uses: actions/checkout@v2
7171

7272
- name: Check YAML
7373
# yamllint's "colored" output type is useful for humans reading the log.
74+
continue-on-error: ${{ matrix.configuration.continue-on-error }}
7475
run: |
75-
find . \
76-
-path './.git' -prune -or \
77-
\( \
78-
\( \
79-
-name '.clang-format' -or \
80-
-name '.clang-tidy' -or \
81-
-name '.gemrc' -or \
82-
-name '*.yml' -or \
83-
-name '*.mir' -or \
84-
-name '*.reek' -or \
85-
-name '*.rviz' -or \
86-
-name '*.sublime-syntax' -or \
87-
-name '*.syntax' -or \
88-
-name '*.yaml' -or \
89-
-name '*.yaml-tmlanguage' -or \
90-
-name '*.yaml.sed' -or \
91-
-name '*.yaml.mysql' \
92-
\) \
93-
-and -type f \
94-
\) \
95-
-exec \
96-
yamllint \
97-
--format ${{ matrix.configuration.format }} \
98-
'{}' + \
99-
|| \
100-
${{ matrix.configuration.fail-command }}
76+
yamllint \
77+
--format ${{ matrix.configuration.format }} \
78+
.

.markdownlint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown/.markdownlint.yml
12
# See: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
23
# The code style defined in this file is the official standardized style to be used in all Arduino projects and should
34
# not be modified.
@@ -31,8 +32,7 @@ MD024: false
3132
MD025:
3233
level: 1
3334
front_matter_title: '^\s*"?title"?\s*[:=]'
34-
MD026:
35-
punctuation: ":"
35+
MD026: false
3636
MD027: false # Prettier
3737
MD028: false
3838
MD029:

.yamllint.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-yaml/.yamllint.yml
12
# See: https://yamllint.readthedocs.io/en/stable/configuration.html
2-
# The code style defined in this file is the official standardized style to be used in all Arduino projects and should
3-
# not be modified.
3+
# The code style defined in this file is the official standardized style to be used in all Arduino tooling projects and
4+
# should not be modified.
45
# Note: Rules disabled solely because they are redundant to Prettier are marked with a "Prettier" comment.
56

67
rules:
@@ -50,3 +51,24 @@ rules:
5051
- "false"
5152
- "on" # Used by GitHub Actions as a workflow key.
5253
check-keys: true
54+
55+
yaml-files:
56+
# Source: https://github.com/ikatyang/linguist-languages/blob/master/data/YAML.json (used by Prettier)
57+
- ".clang-format"
58+
- ".clang-tidy"
59+
- ".gemrc"
60+
- ".yamllint"
61+
- "glide.lock"
62+
- "*.yml"
63+
- "*.mir"
64+
- "*.reek"
65+
- "*.rviz"
66+
- "*.sublime-syntax"
67+
- "*.syntax"
68+
- "*.yaml"
69+
- "*.yaml-tmlanguage"
70+
- "*.yaml.sed"
71+
- "*.yml.mysql"
72+
73+
ignore: |
74+
/.git/

0 commit comments

Comments
 (0)