Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Jul 10, 2025

Now every ignorePatterns configuration in nested configuration are respected.
Before, only ignorePatterns, which are located in the base-configuration of the project, would be respected.

Closes #11067
Closes #12857
Closes #11969

Copy link
Member Author

Sysix commented Jul 10, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI C-enhancement Category - New feature or request labels Jul 10, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 10, 2025

CodSpeed Instrumentation Performance Report

Merging #12210 will not alter performance

Comparing 07-10-feat_linter_support_ignorepatterns_for_nested_configs (aecacae) with main (fbe6663)

Summary

✅ 34 untouched benchmarks

@Sysix Sysix force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch 3 times, most recently from 3689fdf to 1b07bcd Compare July 11, 2025 14:55
@github-actions github-actions bot added the A-editor Area - Editor and Language Server label Jul 11, 2025
@Sysix Sysix force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch 3 times, most recently from 1eef972 to 8f3f757 Compare July 11, 2025 15:38
@Sysix Sysix marked this pull request as ready for review July 11, 2025 15:45
@Sysix Sysix requested a review from camc314 as a code owner July 11, 2025 15:45
@Sysix Sysix force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch from 8f3f757 to f43d9d5 Compare July 13, 2025 09:59
@Sysix Sysix force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch 2 times, most recently from bb5556e to 83c7ff0 Compare July 13, 2025 11:01
@Sysix Sysix force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch 2 times, most recently from 743fc71 to ca998c8 Compare July 21, 2025 18:39
@Sysix
Copy link
Member Author

Sysix commented Jul 22, 2025

@camc314 /ping

@Sysix Sysix force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch 4 times, most recently from 6a31ecc to e80b8f3 Compare August 5, 2025 18:48
@camc314 camc314 self-assigned this Aug 7, 2025
@camc314 camc314 force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch from e80b8f3 to a3a078f Compare August 7, 2025 15:32
@Sysix Sysix force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch from a3a078f to 40dd0a0 Compare August 9, 2025 16:22
@Sysix Sysix marked this pull request as draft August 9, 2025 16:36
@Sysix Sysix force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch 2 times, most recently from 30316bd to 5d133b9 Compare August 9, 2025 17:05
@Sysix Sysix marked this pull request as ready for review August 9, 2025 17:15
@Sysix Sysix requested a review from camc314 August 9, 2025 17:15
Copilot AI review requested due to automatic review settings August 15, 2025 16:34
@Sysix Sysix force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch from 5d133b9 to 129fd28 Compare August 15, 2025 16:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements support for respecting ignorePatterns configuration in nested oxlint configurations. Previously, only ignorePatterns from the base configuration file were honored, but now all nested configurations properly apply their ignore patterns to files within their respective scopes.

  • Moves ignore pattern processing from CLI to the config system
  • Updates ignore pattern syntax from exact matches to glob patterns (e.g., "test_plugin""test_plugin/**")
  • Integrates ignore functionality into the language server to respect nested ignore patterns

Reviewed Changes

Copilot reviewed 24 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
crates/oxc_linter/src/config/mod.rs Adds ignore pattern resolution and storage to LintConfig
crates/oxc_linter/src/config/config_store.rs Implements ignore pattern checking logic using nearest config resolution
crates/oxc_linter/src/config/config_builder.rs Integrates ignore pattern resolution during config building
crates/oxc_linter/src/service/mod.rs Exposes ignore checking method for language server
crates/oxc_language_server/src/linter/server_linter.rs Removes redundant ignore pattern processing from server
crates/oxc_language_server/src/linter/isolated_lint_handler.rs Adds ignore pattern check before linting files
apps/oxlint/src/lint.rs Removes CLI-level ignore pattern processing in favor of config-level handling
Multiple test fixtures Updates ignore patterns to use glob syntax

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Sysix Sysix force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch from 129fd28 to 03885ec Compare August 15, 2025 16:44
@Sysix
Copy link
Member Author

Sysix commented Aug 15, 2025

@camc314 Sorry to bother, but I am getting a bit frustrated resolving the merge conflicts >.<

Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the wait! thanks for fixing this!

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Aug 15, 2025
Copy link
Contributor

camc314 commented Aug 15, 2025

Merge activity

Now every `ignorePatterns` configuration in nested configuration are respected.
Before, only `ignorePatterns`, which are located in the base-configuration of the project, would be respected.

Closes #11067
Closes #12857
Closes #11969
@graphite-app graphite-app bot force-pushed the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch from 03885ec to aecacae Compare August 16, 2025 10:00
@graphite-app graphite-app bot merged commit aecacae into main Aug 16, 2025
29 checks passed
@graphite-app graphite-app bot deleted the 07-10-feat_linter_support_ignorepatterns_for_nested_configs branch August 16, 2025 10:06
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 16, 2025
@johnnybenson
Copy link

    "ignorePatterns": [
-       "vendor/",
+       "apps/api/public/vendor/**"
    ],

Had to alter my config after this change, the diff shows before and after. Not sure how important this is to anyone else, I don't have a nested config and want to ignore vendor in a deeper directory.

    "ignorePatterns": [
-       "vendor/",
+       "**/vendor/**"
    ],

This works too.

graphite-app bot pushed a commit that referenced this pull request Aug 22, 2025
closes #13204

Why I need now a `GitignoreBuilder` instead of `OverrideBuilder` like before #12210.
Because `Gitignore::matched_path_or_any_parents` only allows paths inside his root, I needed to "trick" a bit.
Or else the test with `--config another/directory/config.json` would fail.

Now, the base `ignorePatterns` will always be at the current working directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-editor Area - Editor and Language Server A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

4 participants