Merge commit 'dfae4d5bb4406de20e9e29f1fb82ecfd504ba37d' as 'codespell-problem-matcher'
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
name: Test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- uses: actions/setup-python@v1
|
||||
- run: pip install codespell
|
||||
- uses: ./
|
||||
- name: Check codespell
|
||||
run: codespell test/test.txt || true
|
||||
- name: Check codespell on an unusually named file
|
||||
run: codespell test/test:2.txt || true
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Peter Newman, based on korelstar's xmllint-problem-matcher
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,22 @@
|
||||
# codespell-problem-matcher
|
||||
|
||||
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).
|
||||
|
||||
## Inputs
|
||||
|
||||
No inputs are required.
|
||||
|
||||
## Outputs
|
||||
|
||||
No outputs are generated apart from a configured problem matcher.
|
||||
|
||||
## Usage
|
||||
|
||||
Add the step to your workflow, before `codespell` is called.
|
||||
|
||||
```yaml
|
||||
- uses: codespell-project/codespell-problem-matcher@v1
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
name: 'codespell problem matcher'
|
||||
author: 'Peter Newman'
|
||||
description: 'Shows codespell errors as annotation (with file and code line) in GitHub Actions'
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'index.js'
|
||||
branding:
|
||||
icon: 'search'
|
||||
color: 'green'
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "codespell-matcher",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):(\\d+):\\s+(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"message": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
console.log(`::add-matcher::${__dirname}/codespell-matcher.json`);
|
||||
@@ -0,0 +1,4 @@
|
||||
abandonned
|
||||
Abandonned
|
||||
ABANDONNED
|
||||
AbAnDoNnEd
|
||||
@@ -0,0 +1 @@
|
||||
It's ackward when you make a spelling mistake.
|
||||
Reference in New Issue
Block a user