-
Notifications
You must be signed in to change notification settings - Fork 20
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
Improve documentation on path
option, or rename
#38
Comments
You should be able to pass in multiple paths (you can on codespell CLI), so I guess it's a case of whether you can generate a list of changed files and pass it into an action. However this doesn't guarantee the outstanding issues won't be elsewhere in the files you're checking. Given codespell doesn't really care about context, generating a list of the added/changed lines and checking them for typos might be best, perhaps combined with loads of blank padding in the files so they kept the same line numbers. Or probably more simply a filter to run on the output of codespell which removes warnings/errors on lines which weren't in the PR. This feels like something that may have been or could be solved more generally for annotations, rather than in an individual tool like this. |
See also TrueBrain/actions-flake8#35 although heed my warning about other breakages within those files. |
Interesting, the documentation led me to believe it would be a single path since it says: "Indicates the path to run codespell in." Is "path" really just the |
seems like my assumption was correct actions-codespell/entrypoint.sh Line 45 in 2391250
|
Perhaps the documentation could be updated to make this clearer? I'd even go so far as to rename the argument from |
path
option, or rename
@robin-wayve can you please show an example of how you pass changes files in the current pr to this action? |
@Justin-JHG you probably want an action that checks out the pull request HEAD instead of a merge commit and then do a Putting that list of files into an environment variable is one way to pass them to the
and then
|
Thank you @robin-wayve 👍 |
It'd be nice if the annotations could be limited to files that changed or were added as part of the PR. If understand correctly right now, I can only limit the action to a single folder (
path
), or filter files out with globs (skip
) which does not quite cover this.If you are running with
only_warn
then its possible you'll end up with the same unaddressed misspells being annotated on every pull request (which could become quite noisy in a large monorepo).The text was updated successfully, but these errors were encountered: