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

Root exclusions in the server to project root #16043

Merged
merged 2 commits into from
Feb 10, 2025
Merged

Conversation

dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Feb 8, 2025

Summary

fixes: #16041

Test Plan

Using the project in the linked issue:

Notice how the project "polebot" is in the "play" directory which is included in the exclude setting as:

exclude = ["play"]

Before this fix

DEBUG ruff:worker:0 ruff_server::resolve: Ignored path via `exclude`: /private/tmp/ruff-test/play/polebot/src/utils/log_tools.py

After this fix

DEBUG ruff:worker:2 ruff_server::resolve: Included path via `include`: /private/tmp/ruff-test/play/polebot/src/utils/log_tools.py

I also updated the same project to remove the "play" directory from the exclude setting and made sure that anything under the polebot/play directory is included:

DEBUG  ruff:worker:4 ruff_server::resolve: Included path via `include`: /private/tmp/ruff-test/play/polebot/play/test.py

And, excluded when I add the directory back:

DEBUG  ruff:worker:2 ruff_server::resolve: Ignored path via `exclude`: /private/tmp/ruff-test/play/polebot/play/test.py

@dhruvmanila dhruvmanila added bug Something isn't working server Related to the LSP server labels Feb 8, 2025
@dhruvmanila dhruvmanila changed the title Directly include Settings struct for the server Root exclusions in the server to project root Feb 8, 2025
@dhruvmanila dhruvmanila marked this pull request as ready for review February 8, 2025 18:05
Copy link
Contributor

github-actions bot commented Feb 8, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Base automatically changed from dhruv/ruff-settings to main February 10, 2025 04:50
@dhruvmanila dhruvmanila linked an issue Feb 10, 2025 that may be closed by this pull request
@dhruvmanila dhruvmanila enabled auto-merge (squash) February 10, 2025 04:54
@dhruvmanila dhruvmanila merged commit 869a954 into main Feb 10, 2025
18 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/exclude-root branch February 10, 2025 04:57
dcreager added a commit that referenced this pull request Feb 10, 2025
* main: (991 commits)
  [red-knot] Resolve `Options` to `Settings` (#16000)
  Bump version to 0.9.6 (#16074)
  Revert tailwindcss v4 update (#16075)
  Improve migration document (#16072)
  Fix reference definition labels for backtick-quoted shortcut links (#16035)
  RUF009 should behave similar to B008 and ignore attributes with immutable types (#16048)
  [`pylint`] Also report when the object isn't a literal (`PLE1310`) (#15985)
  Update Rust crate rustc-hash to v2.1.1 (#16060)
  Root exclusions in the server to project root (#16043)
  Directly include `Settings` struct for the server (#16042)
  Update Rust crate clap to v4.5.28 (#16059)
  Update Rust crate strum_macros to 0.27.0 (#16065)
  Update NPM Development dependencies (#16067)
  Update Rust crate uuid to v1.13.1 (#16066)
  Update Rust crate strum to 0.27.0 (#16064)
  Update pre-commit dependencies (#16063)
  Update dependency ruff to v0.9.5 (#16062)
  Update Rust crate toml to v0.8.20 (#16061)
  [`flake8-builtins`] Make strict module name comparison optional (`A005`) (#15951)
  [`ruff`] Indented form feeds (`RUF054`) (#16049)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server Related to the LSP server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected relative path handling in native server mode
2 participants