-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add another CI check for YAML files. They're used in Ci workflows, config files, and in the docs/ directory.
- Loading branch information
Showing
5 changed files
with
125 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Problem Matchers | ||
|
||
GitHub [Problem | ||
Matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md) | ||
are a mechanism that enable workflow steps to scan the outputs of GitHub | ||
Actions for regex patterns and automatically write annotations in the workflow | ||
summary page. Using Problem Matchers allows information to be displayed more | ||
prominently in the GitHub user interface. | ||
|
||
This directory contains Problem Matchers used by the GitHub Actions workflows | ||
in the [`workflows`](./workflows) subdirectory. | ||
|
||
The following problem matcher JSON files found in this directory were copied | ||
from the [Home Assistant](https://github.com/home-assistant/core) project on | ||
GitHub. The Home Assistant project is licensed under the Apache 2.0 open-source | ||
license. The version of the files at the time they were copied was 2025.1.2. | ||
|
||
- [`pylint.json`](https://github.com/home-assistant/core/blob/dev/.github/workflows/matchers/pylint.json) | ||
- [`yamllint.json`](https://github.com/home-assistant/core/blob/dev/.github/workflows/matchers/yamllint.json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "pylint-error", | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+):(\\d+):(\\d+):\\s(([EF]\\d{4}):\\s.+)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4, | ||
"code": 5 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "pylint-warning", | ||
"severity": "warning", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+):(\\d+):(\\d+):\\s(([CRW]\\d{4}):\\s.+)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4, | ||
"code": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "yamllint", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.*\\.ya?ml)$", | ||
"file": 1 | ||
}, | ||
{ | ||
"regexp": "^\\s{2}(\\d+):(\\d+)\\s+(error|warning)\\s+(.*?)\\s+\\((.*)\\)$", | ||
"line": 1, | ||
"column": 2, | ||
"severity": 3, | ||
"message": 4, | ||
"code": 5, | ||
"loop": true | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Summary: yamllint configuration. | ||
# See https://yamllint.readthedocs.io/ for info about configuration options. | ||
|
||
rules: | ||
line-length: | ||
# YAML files (especially GitHub Actions workflows) tend to end up with | ||
# long lines. The default of 80 is pretty limiting, and besides, in Python | ||
# code linting, we set line lengths to 100. May as well follow suit here. | ||
max: 100 | ||
# Another common occurrence in YAML files is long URLs. The next two | ||
# settings are not specific to URLs, but help. It saves developer time by | ||
# not requiring comment directives to disable warnings at every occurrence. | ||
allow-non-breakable-words: true | ||
allow-non-breakable-inline-mappings: true |