about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-09 18:41:30 +0000
committerbors <bors@rust-lang.org>2023-05-09 18:41:30 +0000
commit1407c7627e91e8d4472749ac9ea45d9f8a3aaab6 (patch)
treed8d6079b2a9d16ec780e00970afd5450cae97e7e /compiler/rustc_mir_transform/src/coverage/mod.rs
parent77e4d7a839665c5687a997289e2c006e5c569e42 (diff)
parent3e8fea612dd8ab8d03aaa264652ced97b800bb91 (diff)
downloadrust-1407c7627e91e8d4472749ac9ea45d9f8a3aaab6.tar.gz
rust-1407c7627e91e8d4472749ac9ea45d9f8a3aaab6.zip
Auto merge of #10751 - blyxyas:explain_with_config, r=xFrednet
Add configuration options to `--explain`

This PR rearranges some modules, taking `metadata_collector` out of `internal_lints` and making public just the necessary functions for `explain()` to use.

The output looks something like this:
```sh
$ cargo run --bin cargo-clippy --manifest-path ../rust-clippy/Cargo.toml -- --explain cognitive_complexity
### What it does
Checks for methods with high cognitive complexity.

### Why is this bad?
Methods of high cognitive complexity tend to be hard to
both read and maintain. Also LLVM will tend to optimize small methods better.

### Known problems
Sometimes it's hard to find a way to reduce the
complexity.

### Example
You'll see it when you get the warning.

========================================
Configuration for clippy::cognitive_complexity:
- cognitive-complexity-threshold: The maximum cognitive complexity a function can have (default: 25)
```

Fixes #9990
r? `@xFrednet`

---

changelog: Docs: `cargo clippy --explain LINT` now shows possible configuration options for the explained lint
[#10751](https://github.com/rust-lang/rust-clippy/pull/10751)
<!-- changelog_checked -->
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/mod.rs')
0 files changed, 0 insertions, 0 deletions