|
1 | | -# actions-codespell |
| 1 | +# Codespell with GitHub Actions -- including annotations for Pull Requests |
| 2 | + |
| 3 | +This GitHub Actions runs codespell over your code. |
| 4 | +Any warnings or errors will be annotated in the Pull Request. |
| 5 | + |
| 6 | +## Usage |
| 7 | + |
| 8 | +```yml |
| 9 | +uses: step-security/actions-codespell@v2 |
| 10 | +``` |
| 11 | +
|
| 12 | +### Parameter: check_filenames |
| 13 | +
|
| 14 | +If set, check file names for spelling mistakes as well. |
| 15 | +
|
| 16 | +This parameter is optional; by default `codespell` will only check the file contents. |
| 17 | + |
| 18 | +```yml |
| 19 | +uses: step-security/actions-codespell@v2 |
| 20 | +with: |
| 21 | + check_filenames: true |
| 22 | +``` |
| 23 | + |
| 24 | +### Parameter: check_hidden |
| 25 | + |
| 26 | +If set, check hidden files (those starting with ".") for spelling mistakes as well. |
| 27 | + |
| 28 | +This parameter is optional; by default `codespell` will not check hidden files. |
| 29 | + |
| 30 | +```yml |
| 31 | +uses: step-security/actions-codespell@v2 |
| 32 | +with: |
| 33 | + check_hidden: true |
| 34 | +``` |
| 35 | + |
| 36 | +### Parameter: exclude_file |
| 37 | + |
| 38 | +File with lines that should not be checked for spelling mistakes. |
| 39 | + |
| 40 | +This parameter is optional; by default `codespell` will check all lines. |
| 41 | + |
| 42 | +```yml |
| 43 | +uses: step-security/actions-codespell@v2 |
| 44 | +with: |
| 45 | + exclude_file: src/foo |
| 46 | +``` |
| 47 | + |
| 48 | +### Parameter: skip |
| 49 | + |
| 50 | +Comma-separated list of files to skip (it accepts globs as well). |
| 51 | + |
| 52 | +This parameter is optional; by default `codespell` won't skip any files. |
| 53 | + |
| 54 | +```yml |
| 55 | +uses: step-security/actions-codespell@v2 |
| 56 | +with: |
| 57 | + skip: foo,bar |
| 58 | +``` |
| 59 | + |
| 60 | +### Parameter: builtin |
| 61 | + |
| 62 | +Comma-separated list of builtin dictionaries to use. |
| 63 | + |
| 64 | +This parameter is optional; by default `codespell` will use its default selection of built in dictionaries. |
| 65 | + |
| 66 | +```yml |
| 67 | +uses: step-security/actions-codespell@v2 |
| 68 | +with: |
| 69 | + builtin: clear,rare |
| 70 | +``` |
| 71 | + |
| 72 | +### Parameter: ignore_words_file |
| 73 | + |
| 74 | +File that contains words which will be ignored by `codespell`. File must contain one word per line. |
| 75 | +Words are case sensitive based on how they are written in the dictionary file. |
| 76 | + |
| 77 | +This parameter is optional; by default `codespell` will check all words for typos. |
| 78 | + |
| 79 | +```yml |
| 80 | +uses: step-security/actions-codespell@v2 |
| 81 | +with: |
| 82 | + ignore_words_file: .codespellignore |
| 83 | +``` |
| 84 | + |
| 85 | +### Parameter: ignore_words_list |
| 86 | + |
| 87 | +Comma-separated list of words which will be ignored by `codespell`. |
| 88 | +Words are case sensitive based on how they are written in the dictionary file. |
| 89 | + |
| 90 | +This parameter is optional; by default `codespell` will check all words for typos. |
| 91 | + |
| 92 | +```yml |
| 93 | +uses: step-security/actions-codespell@v2 |
| 94 | +with: |
| 95 | + ignore_words_list: abandonned,ackward |
| 96 | +``` |
| 97 | + |
| 98 | +### Parameter: uri_ignore_words_list |
| 99 | + |
| 100 | +Comma-separated list of words which will be ignored by `codespell` in URIs and emails only. |
| 101 | +Words are case sensitive based on how they are written in the dictionary file. |
| 102 | +If set to "*", all misspelling in URIs and emails will be ignored. |
| 103 | + |
| 104 | +This parameter is optional; by default `codespell` will check all URIs and emails for typos. |
| 105 | + |
| 106 | +```yml |
| 107 | +uses: step-security/actions-codespell@v2 |
| 108 | +with: |
| 109 | + uri_ignore_words_list: abandonned |
| 110 | +``` |
| 111 | + |
| 112 | +### Parameter: path |
| 113 | + |
| 114 | +Indicates the path to run `codespell` in. |
| 115 | +This can be useful if your project has code you don't want to spell check for some reason. |
| 116 | + |
| 117 | +This parameter is optional; by default `codespell` will run on your whole repository. |
| 118 | + |
| 119 | +```yml |
| 120 | +uses: step-security/actions-codespell@v2 |
| 121 | +with: |
| 122 | + path: src |
| 123 | +``` |
| 124 | + |
| 125 | +### Parameter: only_warn |
| 126 | + |
| 127 | +Only warn about problems. |
| 128 | +All errors and warnings are annotated in Pull Requests, but it will act like everything was fine anyway. |
| 129 | +(In other words, the exit code is always 0.) |
| 130 | + |
| 131 | +This parameter is optional; setting this to any value will enable it. |
| 132 | + |
| 133 | +```yml |
| 134 | +uses: step-security/actions-codespell@v2 |
| 135 | +with: |
| 136 | + only_warn: 1 |
| 137 | +``` |
0 commit comments