codespell-project / actions-codespell

MIT License
74 stars 19 forks source link

Whitelisting does not work at all #29

Closed r3econ closed 3 years ago

r3econ commented 3 years ago

Action configured to whitelist UpToDate

    - name: Check spelling
      uses: codespell-project/actions-codespell@master
      with:
        check_hidden: true
        check_filenames: true
        skip: ./.git,./.gitignore
        ignore_words_list: UpToDate

I am getting the error. The action does notwork.

Error: [...]/UiControls/Test.xaml.cs:59: UpToDate ==> up-to-date

The same happens when I use the ignore_words_file param and a file. It logs that the params are there, but it does not work.

Resulting CLI options  --check-filenames --check-hidden --skip ./.git,./.gitignore --ignore-words-list UpToDate
peternewman commented 3 years ago

From the main codespell help ( https://github.com/codespell-project/codespell#readme ):

Important note: The list passed to -I is case-sensitive based on how it is listed in the codespell dictionaries.

grep -iIR uptodate codespell_lib/data/
codespell_lib/data/dictionary.txt:uptodate->up-to-date
codespell_lib/data/dictionary.txt:uptodateness->up-to-dateness

So you want: ignore_words_list: uptodate

Is UpToDate in your own xaml or part of the spec for the system you're using? If the latter you might want to open a Pull Request in codespell to move it to the code dictionary so it doesn't trip other people up.

r3econ commented 3 years ago

Thanks, it works now

peternewman commented 3 years ago

I've made this more obvious hopefully now: https://github.com/codespell-project/actions-codespell/pull/30