Skip to content
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

Update Clippy #107386

Merged
merged 75 commits into from
Jan 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
1a7ef02
Fix fp in unnecessary_safety_comment
koka831 Jan 9, 2023
96e3068
tests: add case for multiple semis
dswij Jan 10, 2023
d73adea
`needless_return`: remove multiple semis on suggestion
dswij Jan 10, 2023
c319440
add checks for the signature of the lang item
asquared31415 Dec 23, 2022
dd16883
Make clippy compile.
m-ou-se Jan 11, 2023
2bcd697
Update clippy for new format_args!() lang items.
m-ou-se Jan 11, 2023
51aaba6
`cast_possible_truncation` Suggest TryFrom when truncation possible
navh Dec 6, 2022
fcdd08b
update `cast_possible_truncation` documentation
navh Dec 6, 2022
e6948c4
Last PR adjustments
xFrednet Dec 6, 2022
5cb6246
Address PR reivew
xFrednet Jan 12, 2023
cfe8849
Document extending list type configs
tylerjw Jan 12, 2023
0c48b5a
Feed the `features_query` instead of grabbing it from the session lazily
oli-obk Dec 5, 2022
d216167
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
flip1995 Jan 12, 2023
b38848d
Fix suggestion in `transmutes_expressible_as_ptr_casts` when the sour…
Jarcho Jan 12, 2023
2253646
Don't suggest dyn as parameter to add
compiler-errors Jan 8, 2023
295225e
Move `unchecked_duration_subtraction` to pedantic
Alexendoo Jan 13, 2023
97fb130
Auto merge of #10194 - Alexendoo:unchecked-duration-subtraction-pedan…
bors Jan 13, 2023
83dba6e
Auto merge of #106092 - asquared31415:start_lang_item_checks, r=david…
bors Jan 13, 2023
71b99c4
Rollup merge of #106608 - compiler-errors:missing-generics-verbose, r…
Jan 13, 2023
ac95db6
Auto merge of #106801 - JohnTitor:rollup-xqkraw0, r=JohnTitor
bors Jan 13, 2023
efb631a
Auto merge of #106776 - oli-obk:om_nom_nom_nom_nom, r=cjgillot
bors Jan 13, 2023
d43dce1
Remove cognitive-complexity-threshold from docs
tylerjw Jan 13, 2023
2e2ae68
Document lint configuration values in Clippy's book
tylerjw Jan 13, 2023
93d0f47
Check ADT fields for copy implementations considering regions
compiler-errors Nov 30, 2022
93f602f
Add missing arguments to cargo lint example
MariaSolOs Jan 13, 2023
7d1609d
Document configurations in table and paragraphs
tylerjw Jan 13, 2023
a7db925
Split long line
MariaSolOs Jan 14, 2023
a160ce3
change usages of impl_trait_ref to bound_impl_trait_ref
kylematsuda Jan 10, 2023
b92d902
change impl_trait_ref query to return EarlyBinder; remove bound_impl_…
kylematsuda Jan 10, 2023
dc5ce48
Move CI tests for collect-metadata to clippy_bors.yml
tylerjw Jan 14, 2023
d950279
Document generating lint config docs for adding configuration
tylerjw Jan 14, 2023
91c8ecc
Auto merge of #10201 - MariaSolOs:patch-1, r=dswij
bors Jan 14, 2023
483b7ac
Auto merge of #10038 - xFrednet:9231-sugg-try-from, r=Jarcho
bors Jan 14, 2023
c0da8ac
Comment that lint_configuration.md is machine generated
tylerjw Jan 14, 2023
aceb443
Auto merge of #10199 - tylerjw:document-extending-list-configs, r=xFr…
bors Jan 14, 2023
07a7603
Auto merge of #10187 - dswij:issue-10182-semicolon, r=Jarcho
bors Jan 15, 2023
89d443a
Auto merge of #10193 - Jarcho:issue_9894, r=Manishearth
bors Jan 17, 2023
5dac275
change usages of item_bounds query to bound_item_bounds
kylematsuda Jan 16, 2023
a084d79
change item_bounds query to return EarlyBinder; remove bound_item_bou…
kylematsuda Jan 16, 2023
2bfba86
fix missing subst in clippy utils
kylematsuda Jan 17, 2023
875e36f
Add `multiple_unsafe_ops_per_block` lint
Niki4tap Jan 8, 2023
31a0530
Use UnordSet instead of FxHashSet in define_id_collections!().
michaelwoerister Dec 2, 2022
465ed5b
Use UnordMap instead of FxHashMap in define_id_collections!().
michaelwoerister Jan 17, 2023
c1b3589
Allow for more efficient sorting when exporting Unord collections.
michaelwoerister Jan 18, 2023
11611b0
Move `unchecked_duration_subtraction` to pedantic
Alexendoo Jan 13, 2023
d9baced
Improve the changelog update documentation
flip1995 Jan 19, 2023
36e3e26
Auto merge of #10213 - flip1995:changelog-doc, r=xFrednet
bors Jan 19, 2023
aa0eb7f
Auto merge of #10206 - Niki4tap:one_unsafe_op_per_block, r=Alexendoo
bors Jan 19, 2023
e3a09ec
Update version attribute for 1.67 lints
xFrednet Jan 19, 2023
f64efd4
Changelog for Rust 1.67 :lady_beetle:
xFrednet Jan 19, 2023
a7ae84b
Address PR feedback and change text for early merge
xFrednet Jan 20, 2023
d1a5a35
Auto merge of #10214 - xFrednet:changelog-1-67, r=Manishearth,giraffate
bors Jan 20, 2023
081c617
Fix spelling inconsistence of `mdBook`
chansuke Jan 20, 2023
ce460dc
Auto merge of #105102 - compiler-errors:copy-impl-considering-regions…
bors Jan 20, 2023
8d3c7f0
Auto merge of #10216 - chansuke:hotfix/fix-spelling, r=llogiq
bors Jan 21, 2023
298a782
Auto merge of #106977 - michaelwoerister:unord_id_collections, r=oli-obk
bors Jan 21, 2023
5f49808
Add machine applicable suggestion for `bool_assert_comparison`
Alexendoo Jan 21, 2023
e0ee58b
Auto merge of #10218 - Alexendoo:bool-assert-comparison-suggestion, r…
bors Jan 21, 2023
8874edd
Update main.rs
smoelius Jan 22, 2023
9d1bb80
Auto merge of #10221 - smoelius:patch-1, r=Jarcho
bors Jan 22, 2023
a9c251f
Auto merge of #10106 - koka831:fix/10084, r=Alexendoo
bors Jan 22, 2023
2d8ede2
fix: use LocalDefId instead of HirId in trait res
vincenzopalazzo Jan 15, 2023
20cc72e
Improve span for module_name_repetitions
not-my-profile Jan 25, 2023
23ea47b
Auto merge of #10226 - not-my-profile:module_name_repetitions-span, r…
bors Jan 26, 2023
a64940f
Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk
bors Jan 26, 2023
4441753
Mark Rust 1.67 as released in the changelog
xFrednet Jan 20, 2023
b5e3e60
Auto merge of #10232 - xFrednet:changelog-1-67, r=Alexendoo
bors Jan 26, 2023
a1a01c1
Fix docs for `suspicious_xor_used_as_pow` lint
cstyles Jan 27, 2023
54e929b
Auto merge of #10237 - cstyles:fix-docs-for-suspicious_xor_used_as_po…
bors Jan 27, 2023
2bc2431
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Jan 27, 2023
1f403e9
Bump nightly version -> 2023-01-27
flip1995 Jan 27, 2023
6f9c70a
Bump Clippy version -> 0.1.69
flip1995 Jan 27, 2023
1480cea
Auto merge of #10242 - flip1995:rustup, r=flip1995
bors Jan 27, 2023
1dd7731
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
flip1995 Jan 27, 2023
c71062a
Update Cargo.lock
flip1995 Jan 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ dependencies = [

[[package]]
name = "clippy"
version = "0.1.68"
version = "0.1.69"
dependencies = [
"clippy_lints",
"clippy_utils",
Expand Down Expand Up @@ -766,7 +766,7 @@ dependencies = [

[[package]]
name = "clippy_lints"
version = "0.1.68"
version = "0.1.69"
dependencies = [
"cargo_metadata 0.14.0",
"clippy_utils",
Expand All @@ -789,7 +789,7 @@ dependencies = [

[[package]]
name = "clippy_utils"
version = "0.1.68"
version = "0.1.69"
dependencies = [
"arrayvec",
"if_chain",
Expand Down Expand Up @@ -1168,7 +1168,7 @@ checksum = "a0afaad2b26fa326569eb264b1363e8ae3357618c43982b3f285f0774ce76b69"

[[package]]
name = "declare_clippy_lint"
version = "0.1.68"
version = "0.1.69"
dependencies = [
"itertools",
"quote",
Expand Down
5 changes: 5 additions & 0 deletions src/tools/clippy/.github/workflows/clippy_bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ jobs:
- name: Test metadata collection
run: cargo collect-metadata

- name: Test lint_configuration.md is up-to-date
run: |
echo "run \`cargo collect-metadata\` if this fails"
git update-index --refresh

integration_build:
needs: changelog
runs-on: ubuntu-latest
Expand Down
199 changes: 197 additions & 2 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,204 @@ document.

## Unreleased / Beta / In Rust Nightly

[4f142aa1...master](https://github.com/rust-lang/rust-clippy/compare/4f142aa1...master)
[d822110d...master](https://github.com/rust-lang/rust-clippy/compare/d822110d...master)

## Rust 1.67

Current stable, released 2023-01-26

[4f142aa1...d822110d](https://github.com/rust-lang/rust-clippy/compare/4f142aa1...d822110d)

### New Lints

* [`seek_from_current`]
[#9681](https://github.com/rust-lang/rust-clippy/pull/9681)
* [`from_raw_with_void_ptr`]
[#9690](https://github.com/rust-lang/rust-clippy/pull/9690)
* [`misnamed_getters`]
[#9770](https://github.com/rust-lang/rust-clippy/pull/9770)
* [`seek_to_start_instead_of_rewind`]
[#9667](https://github.com/rust-lang/rust-clippy/pull/9667)
* [`suspicious_xor_used_as_pow`]
[#9506](https://github.com/rust-lang/rust-clippy/pull/9506)
* [`unnecessary_safety_doc`]
[#9822](https://github.com/rust-lang/rust-clippy/pull/9822)
* [`unchecked_duration_subtraction`]
[#9570](https://github.com/rust-lang/rust-clippy/pull/9570)
* [`manual_is_ascii_check`]
[#9765](https://github.com/rust-lang/rust-clippy/pull/9765)
* [`unnecessary_safety_comment`]
[#9851](https://github.com/rust-lang/rust-clippy/pull/9851)
* [`let_underscore_future`]
[#9760](https://github.com/rust-lang/rust-clippy/pull/9760)
* [`manual_let_else`]
[#8437](https://github.com/rust-lang/rust-clippy/pull/8437)

### Moves and Deprecations

* Moved [`uninlined_format_args`] to `style` (Now warn-by-default)
[#9865](https://github.com/rust-lang/rust-clippy/pull/9865)
* Moved [`needless_collect`] to `nursery` (Now allow-by-default)
[#9705](https://github.com/rust-lang/rust-clippy/pull/9705)
* Moved [`or_fun_call`] to `nursery` (Now allow-by-default)
[#9829](https://github.com/rust-lang/rust-clippy/pull/9829)
* Uplifted [`let_underscore_lock`] into rustc
[#9697](https://github.com/rust-lang/rust-clippy/pull/9697)
* Uplifted [`let_underscore_drop`] into rustc
[#9697](https://github.com/rust-lang/rust-clippy/pull/9697)
* Moved [`bool_to_int_with_if`] to `pedantic` (Now allow-by-default)
[#9830](https://github.com/rust-lang/rust-clippy/pull/9830)
* Move `index_refutable_slice` to `pedantic` (Now warn-by-default)
[#9975](https://github.com/rust-lang/rust-clippy/pull/9975)
* Moved [`manual_clamp`] to `nursery` (Now allow-by-default)
[#10101](https://github.com/rust-lang/rust-clippy/pull/10101)

### Enhancements

* The scope of `#![clippy::msrv]` is now tracked correctly
[#9924](https://github.com/rust-lang/rust-clippy/pull/9924)
* `#[clippy::msrv]` can now be used as an outer attribute
[#9860](https://github.com/rust-lang/rust-clippy/pull/9860)
* Clippy will now avoid Cargo's cache, if `Cargo.toml` or `clippy.toml` have changed
[#9707](https://github.com/rust-lang/rust-clippy/pull/9707)
* [`uninlined_format_args`]: Added a new config `allow-mixed-uninlined-format-args` to allow the
lint, if only some arguments can be inlined
[#9865](https://github.com/rust-lang/rust-clippy/pull/9865)
* [`needless_lifetimes`]: Now provides suggests for individual lifetimes
[#9743](https://github.com/rust-lang/rust-clippy/pull/9743)
* [`needless_collect`]: Now detects needless `is_empty` and `contains` calls
[#8744](https://github.com/rust-lang/rust-clippy/pull/8744)
* [`blanket_clippy_restriction_lints`]: Now lints, if `clippy::restriction` is enabled via the
command line arguments
[#9755](https://github.com/rust-lang/rust-clippy/pull/9755)
* [`mutable_key_type`]: Now has the `ignore-interior-mutability` configuration, to add types which
should be ignored by the lint
[#9692](https://github.com/rust-lang/rust-clippy/pull/9692)
* [`uninlined_format_args`]: Now works for multiline `format!` expressions
[#9945](https://github.com/rust-lang/rust-clippy/pull/9945)
* [`cognitive_complexity`]: Now works for async functions
[#9828](https://github.com/rust-lang/rust-clippy/pull/9828)
[#9836](https://github.com/rust-lang/rust-clippy/pull/9836)
* [`vec_box`]: Now avoids an off-by-one error when using the `vec-box-size-threshold` configuration
[#9848](https://github.com/rust-lang/rust-clippy/pull/9848)
* [`never_loop`]: Now correctly handles breaks in nested labeled blocks
[#9858](https://github.com/rust-lang/rust-clippy/pull/9858)
[#9837](https://github.com/rust-lang/rust-clippy/pull/9837)
* [`disallowed_methods`], [`disallowed_types`], [`disallowed_macros`]: Now correctly resolve
paths, if a crate is used multiple times with different versions
[#9800](https://github.com/rust-lang/rust-clippy/pull/9800)
* [`disallowed_methods`]: Can now be used for local methods
[#9800](https://github.com/rust-lang/rust-clippy/pull/9800)
* [`print_stdout`], [`print_stderr`]: Can now be enabled in test with the `allow-print-in-tests`
config value
[#9797](https://github.com/rust-lang/rust-clippy/pull/9797)
* [`from_raw_with_void_ptr`]: Now works for `Rc`, `Arc`, `alloc::rc::Weak` and
`alloc::sync::Weak` types.
[#9700](https://github.com/rust-lang/rust-clippy/pull/9700)
* [`needless_borrowed_reference`]: Now works for struct and tuple patterns with wildcards
[#9855](https://github.com/rust-lang/rust-clippy/pull/9855)
* [`or_fun_call`]: Now supports `map_or` methods
[#9689](https://github.com/rust-lang/rust-clippy/pull/9689)
* [`unwrap_used`], [`expect_used`]: No longer lints in test code
[#9686](https://github.com/rust-lang/rust-clippy/pull/9686)
* [`fn_params_excessive_bools`]: Is now emitted with the lint level at the linted function
[#9698](https://github.com/rust-lang/rust-clippy/pull/9698)

### False Positive Fixes

* [`new_ret_no_self`]: No longer lints when `impl Trait<Self>` is returned
[#9733](https://github.com/rust-lang/rust-clippy/pull/9733)
* [`unnecessary_lazy_evaluations`]: No longer lints, if the type has a significant drop
[#9750](https://github.com/rust-lang/rust-clippy/pull/9750)
* [`option_if_let_else`]: No longer lints, if any arm has guard
[#9747](https://github.com/rust-lang/rust-clippy/pull/9747)
* [`explicit_auto_deref`]: No longer lints, if the target type is a projection with generic
arguments
[#9813](https://github.com/rust-lang/rust-clippy/pull/9813)
* [`unnecessary_to_owned`]: No longer lints, if the suggestion effects types
[#9796](https://github.com/rust-lang/rust-clippy/pull/9796)
* [`needless_borrow`]: No longer lints, if the suggestion is affected by `Deref`
[#9674](https://github.com/rust-lang/rust-clippy/pull/9674)
* [`unused_unit`]: No longer lints, if lifetimes are bound to the return type
[#9849](https://github.com/rust-lang/rust-clippy/pull/9849)
* [`mut_mut`]: No longer lints cases with unsized mutable references
[#9835](https://github.com/rust-lang/rust-clippy/pull/9835)
* [`bool_to_int_with_if`]: No longer lints in const context
[#9738](https://github.com/rust-lang/rust-clippy/pull/9738)
* [`use_self`]: No longer lints in macros
[#9704](https://github.com/rust-lang/rust-clippy/pull/9704)
* [`unnecessary_operation`]: No longer lints, if multiple macros are involved
[#9981](https://github.com/rust-lang/rust-clippy/pull/9981)
* [`allow_attributes_without_reason`]: No longer lints inside external macros
[#9630](https://github.com/rust-lang/rust-clippy/pull/9630)
* [`question_mark`]: No longer lints for `if let Err()` with an `else` branch
[#9722](https://github.com/rust-lang/rust-clippy/pull/9722)
* [`unnecessary_cast`]: No longer lints if the identifier and cast originate from different macros
[#9980](https://github.com/rust-lang/rust-clippy/pull/9980)
* [`arithmetic_side_effects`]: Now detects operations with associated constants
[#9592](https://github.com/rust-lang/rust-clippy/pull/9592)
* [`explicit_auto_deref`]: No longer lints, if the initial value is not a reference or reference
receiver
[#9997](https://github.com/rust-lang/rust-clippy/pull/9997)
* [`module_name_repetitions`], [`single_component_path_imports`]: Now handle `#[allow]`
attributes correctly
[#9879](https://github.com/rust-lang/rust-clippy/pull/9879)
* [`bool_to_int_with_if`]: No longer lints `if let` statements
[#9714](https://github.com/rust-lang/rust-clippy/pull/9714)
* [`needless_borrow`]: No longer lints, `if`-`else`-statements that require the borrow
[#9791](https://github.com/rust-lang/rust-clippy/pull/9791)
* [`needless_borrow`]: No longer lints borrows, if moves were illegal
[#9711](https://github.com/rust-lang/rust-clippy/pull/9711)
* [`manual_swap`]: No longer lints in const context
[#9871](https://github.com/rust-lang/rust-clippy/pull/9871)

### Suggestion Fixes/Improvements

* [`missing_safety_doc`], [`missing_errors_doc`], [`missing_panics_doc`]: No longer show the
entire item in the lint emission.
[#9772](https://github.com/rust-lang/rust-clippy/pull/9772)
* [`needless_lifetimes`]: Only suggests `'_` when it's applicable
[#9743](https://github.com/rust-lang/rust-clippy/pull/9743)
* [`use_self`]: Now suggests full paths correctly
[#9726](https://github.com/rust-lang/rust-clippy/pull/9726)
* [`redundant_closure_call`]: Now correctly deals with macros during suggestion creation
[#9987](https://github.com/rust-lang/rust-clippy/pull/9987)
* [`unnecessary_cast`]: Suggestions now correctly deal with references
[#9996](https://github.com/rust-lang/rust-clippy/pull/9996)
* [`unnecessary_join`]: Suggestions now correctly use [turbofish] operators
[#9779](https://github.com/rust-lang/rust-clippy/pull/9779)
* [`equatable_if_let`]: Can now suggest `matches!` replacements
[#9368](https://github.com/rust-lang/rust-clippy/pull/9368)
* [`string_extend_chars`]: Suggestions now correctly work for `str` slices
[#9741](https://github.com/rust-lang/rust-clippy/pull/9741)
* [`redundant_closure_for_method_calls`]: Suggestions now include angle brackets and generic
arguments if needed
[#9745](https://github.com/rust-lang/rust-clippy/pull/9745)
* [`manual_let_else`]: Suggestions no longer expand macro calls
[#9943](https://github.com/rust-lang/rust-clippy/pull/9943)
* [`infallible_destructuring_match`]: Suggestions now preserve references
[#9850](https://github.com/rust-lang/rust-clippy/pull/9850)
* [`result_large_err`]: The error now shows the largest enum variant
[#9662](https://github.com/rust-lang/rust-clippy/pull/9662)
* [`needless_return`]: Suggestions are now formatted better
[#9967](https://github.com/rust-lang/rust-clippy/pull/9967)
* [`unused_rounding`]: The suggestion now preserves the original float literal notation
[#9870](https://github.com/rust-lang/rust-clippy/pull/9870)

[turbofish]: https://turbo.fish/::%3CClippy%3E

### ICE Fixes

* [`result_large_err`]: Fixed ICE for empty enums
[#10007](https://github.com/rust-lang/rust-clippy/pull/10007)
* [`redundant_allocation`]: Fixed ICE for types with bounded variables
[#9773](https://github.com/rust-lang/rust-clippy/pull/9773)
* [`unused_rounding`]: Fixed ICE, if `_` was used as a separator
[#10001](https://github.com/rust-lang/rust-clippy/pull/10001)

## Rust 1.66

Current stable, released 2022-12-15
Released 2022-12-15

[b52fb523...4f142aa1](https://github.com/rust-lang/rust-clippy/compare/b52fb523...4f142aa1)

Expand Down Expand Up @@ -166,6 +359,7 @@ Current stable, released 2022-12-15

* [`unnecessary_to_owned`]: Avoid ICEs in favor of false negatives if information is missing
[#9505](https://github.com/rust-lang/rust-clippy/pull/9505)
[#10027](https://github.com/rust-lang/rust-clippy/pull/10027)
* [`manual_range_contains`]: No longer ICEs on values behind references
[#9627](https://github.com/rust-lang/rust-clippy/pull/9627)
* [`needless_pass_by_value`]: No longer ICEs on unsized `dyn Fn` arguments
Expand Down Expand Up @@ -4383,6 +4577,7 @@ Released 2018-09-13
[`multi_assignments`]: https://rust-lang.github.io/rust-clippy/master/index.html#multi_assignments
[`multiple_crate_versions`]: https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
[`multiple_inherent_impl`]: https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
[`multiple_unsafe_ops_per_block`]: https://rust-lang.github.io/rust-clippy/master/index.html#multiple_unsafe_ops_per_block
[`must_use_candidate`]: https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
[`must_use_unit`]: https://rust-lang.github.io/rust-clippy/master/index.html#must_use_unit
[`mut_from_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clippy"
version = "0.1.68"
version = "0.1.69"
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
repository = "https://github.com/rust-lang/rust-clippy"
readme = "README.md"
Expand Down
16 changes: 13 additions & 3 deletions src/tools/clippy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,21 @@ value` mapping e.g.
```toml
avoid-breaking-exported-api = false
disallowed-names = ["toto", "tata", "titi"]
cognitive-complexity-threshold = 30
```

See the [list of configurable lints](https://rust-lang.github.io/rust-clippy/master/index.html#Configuration),
the lint descriptions contain the names and meanings of these configuration variables.
The [table of configurations](https://doc.rust-lang.org/nightly/clippy/lint_configuration.html)
contains all config values, their default, and a list of lints they affect.
Each [configurable lint](https://rust-lang.github.io/rust-clippy/master/index.html#Configuration)
, also contains information about these values.

For configurations that are a list type with default values such as
[disallowed-names](https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names),
you can use the unique value `".."` to extend the default values instead of replacing them.

```toml
# default of disallowed-names is ["foo", "baz", "quux"]
disallowed-names = ["bar", ".."] # -> ["bar", "foo", "baz", "quux"]
```

> **Note**
>
Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [Installation](installation.md)
- [Usage](usage.md)
- [Configuration](configuration.md)
- [Lint Configuration](lint_configuration.md)
- [Clippy's Lints](lints.md)
- [Continuous Integration](continuous_integration/README.md)
- [GitHub Actions](continuous_integration/github_actions.md)
Expand Down
16 changes: 13 additions & 3 deletions src/tools/clippy/book/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@ basic `variable = value` mapping eg.
```toml
avoid-breaking-exported-api = false
disallowed-names = ["toto", "tata", "titi"]
cognitive-complexity-threshold = 30
```

See the [list of configurable lints](https://rust-lang.github.io/rust-clippy/master/index.html#Configuration),
the lint descriptions contain the names and meanings of these configuration variables.
The [table of configurations](./lint_configuration.md)
contains all config values, their default, and a list of lints they affect.
Each [configurable lint](https://rust-lang.github.io/rust-clippy/master/index.html#Configuration)
, also contains information about these values.

For configurations that are a list type with default values such as
[disallowed-names](https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names),
you can use the unique value `".."` to extend the default values instead of replacing them.

```toml
# default of disallowed-names is ["foo", "baz", "quux"]
disallowed-names = ["bar", ".."] # -> ["bar", "foo", "baz", "quux"]
```

To deactivate the "for further information visit *lint-link*" message you can define the `CLIPPY_DISABLE_DOCS_LINKS`
environment variable.
Expand Down
7 changes: 6 additions & 1 deletion src/tools/clippy/book/src/development/adding_lints.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ For cargo lints, the process of testing differs in that we are interested in the
manifest.

If our new lint is named e.g. `foo_categories`, after running `cargo dev
new_lint` we will find by default two new crates, each with its manifest file:
new_lint --name=foo_categories --type=cargo --category=cargo` we will find by
default two new crates, each with its manifest file:

* `tests/ui-cargo/foo_categories/fail/Cargo.toml`: this file should cause the
new lint to raise an error.
Expand Down Expand Up @@ -699,6 +700,10 @@ for some users. Adding a configuration is done in the following steps:
`clippy.toml` file with the configuration value and a rust file that
should be linted by Clippy. The test can otherwise be written as usual.

5. Update [Lint Configuration](../lint_configuration.md)

Run `cargo collect-metadata` to generate documentation changes for the book.

[`clippy_lints::utils::conf`]: https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/utils/conf.rs
[`clippy_lints` lib file]: https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/lib.rs
[`tests/ui`]: https://github.com/rust-lang/rust-clippy/blob/master/tests/ui
Expand Down
Loading