Initial attempt at matching codespell log lines

This commit is contained in:
Peter Newman
2020-05-20 17:54:20 +01:00
parent 362aa3f2df
commit b508e1bce5
7 changed files with 20 additions and 15 deletions
+6 -3
View File
@@ -11,7 +11,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@master
- uses: actions/setup-python@v1
- run: pip install codespell
- uses: ./
- name: Check sort with disorder
run: sort -c test/test.txt || true
- name: Check codespell
run: codespell test/test.txt || true
- name: Check codespell on an unusually named file
run: codespell test/test:2.txt || true
+4 -4
View File
@@ -1,6 +1,6 @@
# sort-problem-matcher
# codespell-problem-matcher
This problem matcher lets you show errors from GNU `sort` as annotation in
This problem matcher lets you show errors from `codespell` as annotation in
GitHub Actions.
Based on [korelstar](https://github.com/korelstar)'s [xmllint-problem-matcher](https://github.com/korelstar/xmllint-problem-matcher).
@@ -15,8 +15,8 @@ No outputs are generated apart from a configured problem matcher.
## Usage
Add the step to your workflow, before `sort -c` is called.
Add the step to your workflow, before `codespell` is called.
```yaml
- uses: codespell-project/sort-problem-matcher@v1
- uses: codespell-project/codespell-problem-matcher@v1
```
+2 -2
View File
@@ -1,6 +1,6 @@
name: 'sort problem matcher'
name: 'codespell problem matcher'
author: 'Peter Newman'
description: 'Shows GNU sort errors as annotation (with file and code line) in GitHub Actions'
description: 'Shows codespell errors as annotation (with file and code line) in GitHub Actions'
runs:
using: 'node12'
main: 'index.js'
+2 -2
View File
@@ -1,10 +1,10 @@
{
"problemMatcher": [
{
"owner": "sort-matcher",
"owner": "codespell-matcher",
"pattern": [
{
"regexp": "^sort: (.+):(\\d+):\\s+(.+)$",
"regexp": "^(.+):(\\d+):\\s+(.+)$",
"file": 1,
"line": 2,
"message": 3
+1 -1
View File
@@ -1,2 +1,2 @@
#!/usr/bin/env node
console.log(`::add-matcher::${__dirname}/sort-matcher.json`);
console.log(`::add-matcher::${__dirname}/codespell-matcher.json`);
+4 -3
View File
@@ -1,3 +1,4 @@
a
c
b
abandonned
Abandonned
ABANDONNED
AbAnDoNnEd
+1
View File
@@ -0,0 +1 @@
It's ackward when you make a spelling mistake.