This action runs typos with reviewdog on pull requests to improve code review experience.
name: Reviewdog
on: [pull_request]
jobs:
typos:
name: runner / typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Shemnei/reviewdog-action-typos@v0
with:
reporter: github-check
level: error
fail_on_error: true
For a complete list of accepted input values see action.yaml.
Specify files to check.
Default: .
Example
files: |
./testdir
myfile.txt
Specify glob patterns of files to ignore.
NOTE: This will also ignore any files explicitly defined with files
.
Default: <unset>
Example
exclude: |
*.yaml
*.json
Explicitly set the configuration file to use. If not set, typos
will figure out the correct config to use.
Default: <unset>
Example
config: ./config/.typos.yaml
Tells typos
to ignore any implicitly defined configuration files (ignore config files not set by config
).
Default: false
Example
isolated: true
Tells typos
to update ALL found spell mistakes. This doesn't not commit or push anything to the branch. It only writes the changes locally to disk.
NOTE: This will update ALL mistakes, not only files/changes from the current PR or commit (e.g. this acts like reviewdog
s -filter-mode=nofilter
).
Default: false
Example
write_changes: true
Language locale to suggest corrections for. Possible values are [en, en-us, en-gb, en-ca, en-au]
.
Default: <unset>
Example
locale: en-gb
Runs the action in debug mode. This enables various outputs which might be useful for debugging like:
- Dump the used
typos
config - Dump all files to be checked
- Enable
typos
verbose mode
NOTE: This is also enabled when an action is run with Enable debug logging
active (Github UI).
Default: <unset>
Example
debug: true
The original typos
action also has the following inputs which are declared but not used at all (i might be missing something):
extend_identifiers
extend_words
To allow easy porting (copy-paste) and have feature parity the inputs where included but will print a deprecated warning on usage.
NOTE: The value of these inputs will be ignored and are not used.