Skip to content

Shemnei/reviewdog-action-typos

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Shemnei/reviewdog-action-typos

reviewdog depup release GitHub release (latest SemVer) action-bumpr supported

This action runs typos with reviewdog on pull requests to improve code review experience.

Usage

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

Input

For a complete list of accepted input values see action.yaml.

files

Specify files to check.

Default: .

Example

files: |
  ./testdir
  myfile.txt

exclude

Specify glob patterns of files to ignore.

NOTE: This will also ignore any files explicitly defined with files.

Default: <unset>

Example

exclude: |
  *.yaml
  *.json

config

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

isolated

Tells typos to ignore any implicitly defined configuration files (ignore config files not set by config).

Default: false

Example

isolated: true

write_changes

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 reviewdogs -filter-mode=nofilter).

Default: false

Example

write_changes: true

locale

Language locale to suggest corrections for. Possible values are [en, en-us, en-gb, en-ca, en-au].

Default: <unset>

Example

locale: en-gb

debug

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

Deprecated inputs

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.