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

Add negated ignores support #1472

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

marschattha
Copy link
Member

Initial PR for adding negated ignores support

@marschattha marschattha requested a review from brynary February 3, 2025 14:02
Copy link
Contributor

qltysh bot commented Feb 3, 2025

The code coverage on the diff in this pull request is 100.0%

Drilldown
Path File Coverage Δ
qlty-analysis/src/workspace_entries/matchers.rs * 1.6
qlty-check/src/patcher.rs * -1.8
qlty-check/src/planner/plugin_workspace_entry_finder_builder.rs 0.3
qlty-cloud/src/auth/auth_flow.rs * -0.5
qlty-config/src/library.rs * 0.5

@brynary
Copy link
Member

brynary commented Feb 5, 2025

@marschattha in other contexts like Classic and Git, does order matter?

@marschattha
Copy link
Member Author

I don't believe order matters.

@brynary
Copy link
Member

brynary commented Feb 7, 2025

ChatGPT o3-mini-high says:

Yes, order matters. Git processes the .gitignore file top-to-bottom, so a negative pattern (using “!”) only re-includes files that were ignored by rules placed above it.

I think it's right.

I think we should do the same (with localized unit tests to prove it), otherwise users will probably expect it to work like that and we'll get escalatons.

@marschattha
Copy link
Member Author

Oh, I think I misunderstood the original question.

Also I am not sure if similar behaviour will be feasible in our case with the current implmentation (where negated ignores will be matched as a target regardless of placement), I can take another look at this.

@brynary
Copy link
Member

brynary commented Feb 9, 2025

@marschattha let's talk about this one when we see each other this week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants