about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-12-19 22:01:45 +0000
committerbors <bors@rust-lang.org>2020-12-19 22:01:45 +0000
commit12a35abba12f003bfc12c2b982051c3f49d9b70e (patch)
tree7e62ed1e561d23227dcf3cdbf4978b4ef09b963b /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent9f9e9f7e52e46a029f4713b466a78268ff12c11f (diff)
parent2814ee4840c775fcc546c709ffcc63c692eaf548 (diff)
downloadrust-12a35abba12f003bfc12c2b982051c3f49d9b70e.tar.gz
rust-12a35abba12f003bfc12c2b982051c3f49d9b70e.zip
Auto merge of #6477 - xFrednet:0000-enable-search-with-dashes, r=ebroto
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
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions