Skip to content

Fix bug with getting parent directories in lookup_conf_file #10592

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

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

beetrees
Copy link
Contributor

@beetrees beetrees commented Apr 3, 2023

Currently lookup_conf_file doesn't canonicalize the configuration directory before using PathBuf::pop to get the parent directory. This isn't usually an issue when clippy is invoked via cargo clippy as CARGO_MANIFEST_DIR is already canonicalized. However, this currently causes clippy-driver to ignore any clippy.toml in any parent directories when CARGO_MANIFEST_DIR and CLIPPY_CONF_DIR are not set.

changelog: Fix a bug that would cause parent directories not to be searched for clippy.toml when using clippy-driver directly.

@rustbot
Copy link
Collaborator

rustbot commented Apr 3, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @giraffate (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 3, 2023
@giraffate
Copy link
Contributor

@bors r+

It looks good, thanks!

@bors
Copy link
Contributor

bors commented Apr 4, 2023

📌 Commit 3b22352 has been approved by giraffate

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Apr 4, 2023

⌛ Testing commit 3b22352 with merge 73e412b...

@bors
Copy link
Contributor

bors commented Apr 4, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing 73e412b to master...

@bors bors merged commit 73e412b into rust-lang:master Apr 4, 2023
@beetrees beetrees deleted the parent-dir-bug-fix branch April 6, 2023 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants