The core issue was the usage of `reference_file_path.file_name()`, which
provided a non-existent path if the file to be updated was in a
subdirectory.
Instead we have to provide the whole path after 'tests/ui/' as the
'filename'. This part of the path is called `test_name` in the code now.
Reassign default private
changelog: fix field_reassign_with_default false positive
* Fix#6344
* Fix assumption that `field: Default::default()` is the same as `..Default::default()`
* Cleanup some redundant logic
ISSUE_TEMPLATE: add templates for false negative and false positive tickets.
These will add the correct labels automatically so we don't have to do that ourselves :)
changelog: none
fix ci on master branch; run the --fix test in the correct directory
Turned out the --fix test was run in the wrong directory.
*Please write a short comment explaining your change (or "none" for internal only changes)*
changelog: none
ci: test cargo clippy --fix -Zunstable-options
Make sure we catch cases like https://github.com/rust-lang/rust-clippy/issues/6487 in CI in the future.
---
*Please write a short comment explaining your change (or "none" for internal only changes)*
changelog: none
readme: remove paragraph about executing clippy via "cargo run .."
This most likely no longer works since we are pinning clippy on a specific nightly now.
"cargo run" would try to compile clippy with whatever version the project we want to check demands.
Also building clippy yourself to run it on a project is not really needed anymore since clippy is shipped with official rust releases.
Fixes#6489
changelog: none
Added from_over_into lint
Closes#6456
Added a lint that searches for implementations of `Into<..>` and suggests to implement `From<..>` instead, as it comes with a default implementation of `Into`. Category: style.
changelog: added `from_over_into` lint
This most likely no longer works since we are pinning clippy on a specific nightly now.
"cargo run" would try to compile clippy with whatever version the project we want to check demands.
Also building clippy yourself to run it on a project is not really needed anymore since clippy is shipped with official rust releases.
Fixes#6489
Don't trigger large_enum_variant in external macros
Closes#1776 (the potential JSON output issue is not something we can fix in Clippy and I can't reproduce it anymore)
changelog: Don't trigger [`large_enum_variant`] in external macros
readme: remove paragraph about installing clippy manually on ci, if it is missing on a nightly
Clippy should always be available on nightly because we are gating on it in rustcs CI.
changelog: remove outdated readme paragraph
Adapted the website search for better matching
* This adds the ability to search for ids with dashes and spaces in the name.
* Example: `missing-errors-doc` and `missing errors doc` are now valid aliases for lint names
* It also improves the fuzzy search in the description. This search will now match any lint that where all searched words are inside the description.
* Example: `doc section` finds two lints in our selection
This was suggested/discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Enable.20lint.20search.20with.20dashes/near/220469464)
### Testing
These changes can be tested locally by:
1. Clone this branch
2. Download the current lint index from the [gh-pages branch](https://github.com/rust-lang/rust-clippy/blob/gh-pages/master/lints.json)
3. Put it next to the `util/gh-pages/index.html` and open the html file. Make sure that it can load the lint data. (Browsers can be a bit iffy when opening a loacl html page and loading data)
### Note
I found that searching only a few characters (< 3) seams slow and deleting one even more as almost every lint description contains them. This also happens in our current [lint list](https://rust-lang.github.io/rust-clippy/master/index.html). We could change the search to only be triggered if the search field contains more than 3 letters to slightly improve performance.
---
changelog: Adapted the website search for better matching