-
Notifications
You must be signed in to change notification settings - Fork 5
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
Configured file excludes are not respected when running with changed-files: "true"
#13
Comments
This tracks with my understanding of how changed-files works in this repo. It seems like we'd have to parse the |
Thanks for the fast reply! Makes sense. Would you be open to accepting a PR that adds another config param that allows this action to ignore some directories? It doesn't feel like an ideal solution as it would mean having different file exclude handling for when |
I'm not a maintainer here, just familiar with the setting. I'd be willing to help though! Depending on what you're envisioning, this might already be possible. My reading of the CLI arguments says this might work: - uses: astral-sh/ruff-action@v1
with:
args: 'check --exclude "foo,bar,foobar/*" --force-exclude'
changed-files: 'true' or - uses: astral-sh/ruff-action@v1
with:
args: 'format --check --exclude "foo,bar,foobar/*" --force-exclude'
changed-files: 'true' This isn't quite as good as parsing the pyproject section, but might be similar to the workaround proposed. |
It seems that when using Line 27 in d0a0e81
Also, when using changed-files and args: check --exclude dir , changed files in dir are still checked. I think that changed-files: "true" will overwrite everything
|
@dmweis with v2 the I would like to take you up on your offer to put up a public replication. Could you please do that with the above described use of Even though it is not a built-in part of this action anymore I want to make sure it works as smoothly as possible or at the very least be clear about it in the docs. |
Hi,
It seems that when using
changed-files: "true"
the file excludes configured in apyproject.toml
at the root of the repository are not respected.I believe this is because when using
changed-files
the action provides a direct list of files to theruff
command which overrides any files excludes in the config file.The repository I have this issue is in private but I'd be happy to create a public one and replicate it if needed.
Thank you!
The text was updated successfully, but these errors were encountered: