mirror of https://github.com/astral-sh/ruff
## Summary Fixes https://github.com/astral-sh/ty/issues/1242 From finding references with the LSP, `FileResolver::path` is only called once, in `UnifiedFile::path`, so I went through those references, and it looked safe to make this change in every case. Most of the references are in the various output formats, where we inherited the absolute vs relative path decision from Ruff. Two other uses are as fallbacks if converting a relativized path to a string fails. Finally, we use the path for sorting and in `UnifiedFile::relative_path`. ## Test Plan Existing tests, with snapshots updated to show absolute paths (in the `TestDb` this just added a `/` in front of the file names). I also updated the GitLab CLI test to set the `CI_PROJECT_DIR` environment variable and ran a test in GitLab CI: <img width="613" height="114" alt="image" src="https://github.com/user-attachments/assets/8ab81dba-54fd-4a24-9110-77ef89293cff" /> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||