Skip to content

Commit

Permalink
.spellcheck.yaml: Allow for a hidden file
Browse files Browse the repository at this point in the history
To keep repoistories that wish to use this action a bit cleaner, we
allow a hidden version of .spellcheck.yaml and .wordlist.txt.
  • Loading branch information
sbates130272 committed Mar 17, 2020
1 parent cad7606 commit d48cb7f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ This action uses [PySpelling](https://facelessuser.github.io/pyspelling/) to
check source files in the project.

## Configuration
If your repo contains `spellcheck.yaml` it will be used instead of the default config.
See https://facelessuser.github.io/pyspelling/configuration/ for options.
If the top-level of your repo contains `spellcheck.yaml` or
`.spellcheck.yaml` it will be used instead of the default config. See
https://facelessuser.github.io/pyspelling/configuration/ for options.
19 changes: 15 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
#!/bin/bash
if [ ! -f ./spellcheck.yaml ]; then
cp /spellcheck.yaml .

if [ ! -f "./spellcheck.yaml" ]; then
if [ -f "./.spellcheck.yaml" ]; then
cp ./.spellcheck.yaml spellcheck.yaml
else
cp /spellcheck.yaml .
fi
elif

fi

if [ ! -f ./wordlist.txt ]; then
cp /wordlist.txt .
if [ -f "./.worldlist.txt" ]; then
cp ./.wordlist.txt wordlist.txt
else
cp /wordlist.txt .
fi
fi

pyspelling -c spellcheck.yaml
pyspelling -c spellcheck.yaml

0 comments on commit d48cb7f

Please sign in to comment.