Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exclude_file vs. skip #33

Open
DimitriPapadopoulos opened this issue Aug 22, 2021 · 3 comments
Open

exclude_file vs. skip #33

DimitriPapadopoulos opened this issue Aug 22, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@DimitriPapadopoulos
Copy link
Collaborator

I don't understand the documentation of exclude_file:

File with lines that should not be checked for spelling mistakes.

This parameter is optional; by default codespell will check all lines.

uses: codespell-project/actions-codespell@master
with:
  exclude_file: src/foo

Does it exclude lines or files? If it excludes specific lines, please give an example how to achieve that. If it excludes files, remove any reference to line and explain how skip and exclude_file are different.

@DimitriPapadopoulos
Copy link
Collaborator Author

DimitriPapadopoulos commented Aug 22, 2021

OK, I get it. exclude_file is equivalent to the --exclude_file option. Documenting the format of the file would help understand what you mean (File with lines of other files that should not be checked instead of File with some of its own lines that should not be checked).

Note that text formatting is different in codespell --help (uppercase FILE) and does help understand a little bit:

  -x FILE, --exclude-file=FILE
                        FILE with lines that should not be changed

@DimitriPapadopoulos
Copy link
Collaborator Author

DimitriPapadopoulos commented Aug 22, 2021

The fact that the --skip option doesn't seem to be working doesn't help. All of the following commands report spelling error in file tests/ci/checkpatch/spelling.txt:

codespell --skip=./tests/ci/checkpatch/spelling.txt
codespell --skip=tests/ci/checkpatch/spelling.txt
codespell --skip=./tests/ci/checkpatch
codespell --skip=tests/ci/checkpatch

This does work:

codespell --skip=spelling.txt

@peternewman peternewman added documentation Improvements or additions to documentation question Further information is requested labels Sep 22, 2021
@peternewman
Copy link
Collaborator

See codespell-project/codespell#2052 which we should port into here.

OK, I get it. exclude_file is equivalent to the --exclude_file option.

Nearly all these options are just mirroring their base codespell ones.

Documenting the format of the file would help understand what you mean (File with lines of other files that should not be checked instead of File with some of its own lines that should not be checked).

Can you feed that into codespell-project/codespell#2052

Note that text formatting is different in codespell --help (uppercase FILE) and does help understand a little bit:

We should just take the improvements from that PR as they are when it's merged.

The fact that the --skip option doesn't seem to be working doesn't help. All of the following commands report spelling error in file tests/ci/checkpatch/spelling.txt:

See the upstream codespell-project/codespell#2047 and codespell-project/codespell#2058 amongst others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants