Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codespell and sort matchers #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ A screenshot and an example (further down) is worth a thousand words:
## Usage

```yaml
- name: codespell
uses: liskin/gh-problem-matcher-wrap@v1
with:
linters: codespell
run: codespell src/
- name: flake8
uses: liskin/gh-problem-matcher-wrap@v1
with:
Expand All @@ -51,6 +56,11 @@ A screenshot and an example (further down) is worth a thousand words:
with:
linters: pytest
run: pytest
- name: sort
uses: liskin/gh-problem-matcher-wrap@v1
with:
linters: sort
run: sort -c src/foo.txt
```

```yaml
Expand Down Expand Up @@ -83,11 +93,13 @@ A screenshot and an example (further down) is worth a thousand words:

### Supported linters

* [codespell](https://github.com/codespell-project/codespell/)
* [flake8](https://flake8.pycqa.org/)
* [gcc](https://gcc.gnu.org/)
* [isort](https://pycqa.github.io/isort/)
* [mypy](http://mypy-lang.org/)
* [pytest](https://pytest.org/)
* [sort](https://www.gnu.org/software/coreutils/)
* [shellcheck](https://github.com/koalaman/shellcheck#readme) (`-f gcc` + gcc problem matcher)

For details, sources and licenses of individual problem matchers, see
Expand Down
6 changes: 6 additions & 0 deletions problem-matchers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
[Problem Matcher]: https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md
[GitHub Action: Problem Matcher wrapper]: ..

* codespell:
[source](https://github.com/codespell-project/codespell-problem-matcher/blob/b80729f885d32f78a716c2f107b4db1025001c42/codespell-matcher.json),
[Copyright © 2020 Peter Newman, based on korelstar's xmllint-problem-matcher](https://github.com/codespell-project/codespell-problem-matcher/blob/ae8e5910465fb8812a4360ee74dd7a52053eb76e/LICENSE)
* flake8:
[source](https://github.com/TrueBrain/actions-flake8/blob/7e33a2bcf3bee056945183e6d08d70000de48114/flake8-matcher.json),
[Copyright © 2019, Patric "TrueBrain" Stout](https://github.com/TrueBrain/actions-flake8/blob/7e33a2bcf3bee056945183e6d08d70000de48114/LICENSE)
Expand All @@ -12,5 +15,8 @@
* isort: [Copyright © 2020 Tomáš Janoušek](../LICENSE)
* mypy: [Copyright © 2020 Tomáš Janoušek](../LICENSE)
* pytest: [Copyright © 2020 Tomáš Janoušek](../LICENSE)
* sort:
[source](https://github.com/codespell-project/sort-problem-matcher/blob/d6f1e0a94bd17a0147e4735f61eef01a96d00150/sort-matcher.json),
[Copyright © 2020 Peter Newman, based on korelstar's xmllint-problem-matcher](https://github.com/codespell-project/sort-problem-matcher/blob/ae8e5910465fb8812a4360ee74dd7a52053eb76e/LICENSE)

Pull Requests with additional linters welcome!
26 changes: 26 additions & 0 deletions problem-matchers/codespell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"problemMatcher": [
{
"owner": "codespell-matcher-default",
"pattern": [
{
"regexp": "^(.+):(\\d+):\\s+(.+)$",
"file": 1,
"line": 2,
"message": 3
}
]
},
{
"owner": "codespell-matcher-specified",
"pattern": [
{
"regexp": "^(ERROR|WARNING):\\s+(.+):\\s+(.+?)\\s*$",
"file": 3,
"severity": 1,
"message": 2
}
]
}
]
}
15 changes: 15 additions & 0 deletions problem-matchers/sort.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"problemMatcher": [
{
"owner": "sort-matcher",
"pattern": [
{
"regexp": "^sort:\\s+(.+):(\\d+):\\s+(.+)$",
"file": 1,
"line": 2,
"message": 3
}
]
}
]
}