Skip to content

Commit 729ccf1

Browse files
committed
Update to support JS and Vue files
1 parent cad7606 commit 729ccf1

5 files changed

Lines changed: 70 additions & 17 deletions

File tree

Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
FROM python:3.7
1+
FROM python:3.7-alpine3.10
22

3-
LABEL "com.github.actions.name"="Spellcheck Action"
4-
LABEL "com.github.actions.description"="Check spelling of files in repo"
5-
LABEL "com.github.actions.icon"="clipboard"
6-
LABEL "com.github.actions.color"="green"
7-
LABEL "repository"="http://github.com/rojopolis/spellcheck-github-actions"
8-
LABEL "homepage"="http://github.com/actions"
9-
LABEL "maintainer"="rojopolis <rojo@deba.cl>"
3+
LABEL "repository"="https://github.com/UnicornGlobal/spellcheck-github-actions"
4+
LABEL "homepage"="https://github.com/actions"
105

116
RUN apt-get update && apt-get install -y \
127
aspell \
@@ -15,4 +10,4 @@ RUN pip3 install pyspelling
1510
COPY entrypoint.sh /entrypoint.sh
1611
COPY spellcheck.yaml /spellcheck.yaml
1712
COPY wordlist.txt /wordlist.txt
18-
ENTRYPOINT ["/entrypoint.sh"]
13+
ENTRYPOINT ["/entrypoint.sh"]

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
# spellcheck-github-actions
2-
A Github Action that spell checks Python, Markdown, and Text files.
2+
3+
A Github Action that spell checks JavaScript, Vue, Markdown, HTML, and Text files.
34

45
This action uses [PySpelling](https://facelessuser.github.io/pyspelling/) to
56
check source files in the project.
67

78
## Configuration
9+
810
If your repo contains `spellcheck.yaml` it will be used instead of the default config.
9-
See https://facelessuser.github.io/pyspelling/configuration/ for options.
11+
See https://facelessuser.github.io/pyspelling/configuration/ for options.
12+
13+
## Upstream
14+
15+
Based on `rojopolis/spellcheck-github-actions`
16+
17+
That repo was not working for us so we made this fork

action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Check Spelling (JS, Vue, HTML, Markdown, Text)"
2+
description: "Check spelling in a repo"
3+
branding:
4+
icon: "info"
5+
color: "yellow"
6+
outputs:
7+
changed:
8+
description: "Check code files for spelling errors"
9+
runs:
10+
using: "docker"
11+
image: "Dockerfile"

entrypoint.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/bin/bash
22
if [ ! -f ./spellcheck.yaml ]; then
3+
echo "spellcheck.yaml not found, using default\n"
34
cp /spellcheck.yaml .
45
fi
56

67
if [ ! -f ./wordlist.txt ]; then
8+
echo "wordlist.txt not found, using default\n"
79
cp /wordlist.txt .
810
fi
911

10-
pyspelling -c spellcheck.yaml
12+
pyspelling -c spellcheck.yaml

spellcheck.yaml

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
matrix:
2-
- name: Python
2+
- name: JavaScript
33
sources:
4-
- '**/*.py'
4+
- '**/*.js'
5+
expect_match: false
56
aspell:
67
lang: en
78
dictionary:
@@ -10,16 +11,37 @@ matrix:
1011
output: wordlist.dic
1112
encoding: utf-8
1213
pipeline:
13-
- pyspelling.filters.python:
14+
- pyspelling.filters.javascript:
1415
comments: true
1516
docstrings: true
1617
group_comments: false
1718
decode_escapes: true
1819
strings: false
1920
string_types: fu
21+
- name: Vue
22+
sources:
23+
- '**/*.vue'
24+
expect_match: false
25+
aspell:
26+
lang: en
27+
dictionary:
28+
wordlists:
29+
- wordlist.txt
30+
output: wordlist.dic
31+
encoding: utf-8
32+
pipeline:
33+
- pyspelling.filters.javascript:
34+
comments: true
35+
docstrings: true
36+
group_comments: false
37+
decode_escapes: true
38+
strings: false
39+
string_types: fu
40+
- pyspelling.filters.html:
41+
- pyspelling.filters.stylesheets:
2042
- name: Markdown
2143
apsell:
22-
mode: none
44+
mode: en
2345
dictionary:
2446
wordlists:
2547
- wordlist.txt
@@ -30,14 +52,29 @@ matrix:
3052
- pyspelling.filters.html:
3153
sources:
3254
- '**/*.md'
55+
expect_match: false
56+
- name: HTML
57+
apsell:
58+
mode: en
59+
dictionary:
60+
wordlists:
61+
- wordlist.txt
62+
output: wordlist.dic
63+
encoding: utf-8
64+
pipeline:
65+
- pyspelling.filters.html:
66+
sources:
67+
- '**/*.html'
68+
expect_match: false
3369
- name: Text
3470
sources:
3571
- '**/*.txt'
72+
expect_match: false
3673
dictionary:
3774
wordlists:
3875
- wordlist.txt
3976
output: wordlist.dic
4077
encoding: utf-8
4178
pipeline:
4279
- pyspelling.filters.text:
43-
convert_encoding: utf-8
80+
convert_encoding: utf-8

0 commit comments

Comments
 (0)