Commit graph

87 commits

Author SHA1 Message Date
Sergen Karaoglan
d1f55e6b53 run linkcheck in Remark CI
fix new lints link

install nightly rust-docs

run linkcheck without nightly toolchain

remove nightly toolchain, add rust-docs component

Test Remark

Update basics.md

Update basics.md

Update basics.md

update workflow

add rust docs toolchain

Update remark.yml

workflow test

manual test

update book path

add linkcheck book to CI

Update lint_passes.md
2023-04-28 15:11:48 +01:00
bors
990bbdc2be Auto merge of #10656 - Centri3:master, r=xFrednet
Add configuration for `semicolon_block` lints

Does exactly what it says on the tin, suggests moving a block's final semicolon inside if it's multiline and outside if it's singleline.

I don't really like how this is implemented so I'm not too sure if this is ready yet. Alas, it might be ok.

---

fixes #10654

changelog: Enhancement: [`semicolon_inside_block`]: Added `semicolon-inside-block-ignore-singleline` as a new config value.
[#10656](https://github.com/rust-lang/rust-clippy/pull/10656)
changelog: Enhancement: [`semicolon_outside_block`]: Added `semicolon-outside-block-ignore-multiline` as a new config value.
[#10656](https://github.com/rust-lang/rust-clippy/pull/10656)
<!-- changelog_checked -->
2023-04-25 20:12:00 +00:00
Centri3
8c8cf40707 Update lint_configuration.md 2023-04-25 14:44:56 -05:00
bors
a7335cbf90 Auto merge of #10712 - blyxyas:fix-fixflag_implies_all_targets, r=llogiq
Document that `cargo clippy --fix` implies `--all-targets`

In [`cargo fix`'s documentation](https://doc.rust-lang.org/cargo/commands/cargo-fix.html) they indicate that `fix` implies `--all-targets` if no target is supplied. As Clippy uses Cargo under the hood, this also applies to Clippy, but we didn't document that behaviour.

This PR changes that

Fixes #10690
changelog: Add to documentation that `--fix` implies `--all-targets`
2023-04-25 17:11:52 +00:00
blyxyas
4a76b6f04f
Add the warning to all documentation. 2023-04-25 02:05:32 +02:00
bors
96f8471d81 Auto merge of #10649 - jsoref:spelling, r=Jarcho
Spelling

This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling).

The misspellings have been reported at https://github.com/jsoref/rust-clippy/actions/runs/4710771873#summary-12776860721

The action reports that the changes in this PR would make it happy: https://github.com/jsoref/rust-clippy/actions/runs/4710771874#summary-12776860722

changelog: none
2023-04-23 22:30:06 +00:00
Josh Soref
d2061faf9e Spelling
* applying
* binding
* complex
* constituent
* demonstrate
* desugaring
* exact
* expression
* for
* functionalities
* github
* implementation
* infers
* multiple conflicting traits
* mutable
* necessarily
* nightly
* nonexistent
* optional
* parameter
* reassignments
* resources
* substitution
* suggestion
* that
* that array is
* using the

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-23 10:52:27 -04:00
Oli Scherer
def1705a27 Update to a compiletest-rs version that requires //@ for commands 2023-04-20 14:44:03 +00:00
bors
0c44586ff7 Auto merge of #10651 - lukaslueg:issue10641, r=xFrednet
Add size-parameter to unecessary_box_returns

Fixes #10641

This adds a configuration-knob to the `unecessary_box_returns`-lint which allows _not_ linting a `fn() -> Box<T>` if `T` is "large". The default byte size above which we no longer lint is 128 bytes (due to https://github.com/rust-lang/rust-clippy/issues/4652#issue-505670554, also used in #9373). The overall rational is given in #10641.

---

changelog: Enhancement: [`unnecessary_box_returns`]: Added new lint configuration `unnecessary-box-size` to set the maximum size of `T` in `Box<T>` to be linted
[#10651](https://github.com/rust-lang/rust-clippy/pull/10651)
<!-- changelog_checked -->
2023-04-19 12:42:33 +00:00
Lukas Lueg
4bc68f9c60 Add size-parameter to unecessary_box_returns
Fixes #10641
2023-04-19 14:32:05 +02:00
bors
90cb0fa2f3 Auto merge of #10652 - blyxyas:book-macro_expansions, r=flip1995
Clippy Book Chapter Updates Reborn: Macro Expansions

This PR adds a new chapter to the book: "Macro Expansions". There weren't big changes apart from grammar, re-phrasing and stylistic choices.

## Notes

- **Does not require any other chapter** to be merged before this
- To talk about the whole project, please use the tracking issue for the project #10597 (It also contains a timeline, discussions and more information)

changelog: Add a new "Macro Expansions" chapter to the book

r? `@flip1995`
2023-04-16 21:17:46 +00:00
blyxyas
e3a352d0bb
Add new chapter: "Macro Expansions"
Co-authored-by: Nahua <kangnahua@gmail.com>
2023-04-16 23:16:27 +02:00
Philipp Krones
b842e99ddf
Make warning about hir_ty_to_ty more visible 2023-04-16 21:08:59 +02:00
Philipp Krones
fbb69dea91
Improve type checking and lint passes chapters
Adds the lint passes chapter to the index.

Moves additional reading material for beginners to the front page of the
development section.

Clarify some details in hir::Ty vs ty::Ty.
2023-04-16 20:59:25 +02:00
bors
004981647f Auto merge of #10622 - blyxyas:book-lint_passes, r=llogiq
Clippy Book Chapter Updates Reborn: Lint Passes

This PR adds a new chapter to the book: "Lint passes". No major changes apart from some re-phrasing, fixing typos... etc.

## Notes

- Requires #10595 to be merged before this one (Or else, a link will be broken).
- To talk about the whole project, please use the tracking issue for the project #10597 (It also contains a timeline, discussions and more information)

changelog: Add a new "Lint passes" chapter to the book
r? `@flip1995`
2023-04-14 17:04:54 +00:00
blyxyas
b4732679fc
Talk about symbol information in "Early Lint Pass" 2023-04-12 23:59:56 +02:00
Philipp Krones
0266a9e9a3
Fix links in Clippy book
Links to README.md files must actually be links to index.md files,
because of the inner workings of `mdbook`.

Also use the latest mdbook version in CI.
2023-04-11 14:43:47 +02:00
blyxyas
c19c08f4b2
Fix CI 2023-04-10 11:09:52 +02:00
blyxyas
0b1b535116
Add "Lint Passes" chapter 2023-04-10 10:59:12 +02:00
bors
82d71b1b3a Auto merge of #10605 - blyxyas:book-type_checking, r=llogiq
Clippy Book Chapter Updates Reborn: Type Checking

This PR adds a new chapter to the book: "Type Checking", it hasn't changed a lot from the source mainly because there wasn't many reviews on it and I haven't see a lot of things that needed a change.

## Notes

- I have some doubts about the whole "`is_*` Usage" section, what do you think about it.
- For discussion about  the whole project, please use the tracking issue for the project #10597 (It also contains a timeline, discussions, and more information)

changelog: Add a new "Type Checking" chapter to the book

r? `@flip1995`
2023-04-08 22:22:47 +00:00
blyxyas
1cf64060e3
Add "hir::Ty and ty::Ty" section 2023-04-08 17:14:55 +02:00
blyxyas
90e6ddc8e7
New chapter: "Type Checking" 2023-04-07 13:11:18 +02:00
blyxyas
cf260bc90f
Fix broken links for Rust merge 2023-04-06 22:02:23 +02:00
bors
e903af506f Auto merge of #10229 - danielparks:doc-feature-cargo-clippy, r=flip1995
Document `cargo-clippy` feature

It is possible to use conditional compilation to prevent Clippy from evaluating certain code at all. Unfortunately, it was no longer documented anywhere. This adds a brief explanation of how to use the feature with conditional compilation, and mentions a few downsides.

Fixes #10220 — Ability to skip files or blocks entirely
changelog: none
<!-- changelog_checked -->
2023-04-03 12:12:17 +00:00
bors
207955cee5 Auto merge of #10574 - jyn514:update-docs, r=flip1995
Update subtree sync docs for changes in rustc-dev-guide

Companion PR to https://github.com/rust-lang/rustc-dev-guide/pull/1653. That still keeps a `contributing.html` with an "External Contributions" section, so hopefully it won't be too disruptive.

changelog: none
2023-04-03 11:43:22 +00:00
Yuri Astrakhan
41b367fa5f Gramar, and spelin kleanup
A few minor cleanups in various markdown files, mostly focusing on spelling and ignoring non-compilable codeblocks.
2023-03-30 15:31:14 -04:00
Jynn Nelson
d29dec1a3f Update subtree sync docs for changes in rustc-dev-guide 2023-03-30 13:23:48 -04:00
bors
799732cbd8 Auto merge of #10414 - csmoe:large-future, r=xFrednet
add large future lint

Closes #5263

---

changelog: new lint: [`large_futures`]
[#10414](https://github.com/rust-lang/rust-clippy/pull/10414)
<!-- changelog_checked -->
2023-03-30 08:51:29 +00:00
xFrednet
6e87ae0f1a
Run metadata collection 2023-03-30 10:49:29 +02:00
Micha White
a143fb7a11
Avoid breaking exported API 2023-03-26 17:49:57 -04:00
Nilstrieb
b782a071ad Add explanation on how to run cargo-clippy and clippy-driver 2023-03-24 16:26:22 +00:00
J-ZhengLi
011bb46337 update lint configuration doc for [ifs_same_cond] 2023-03-14 10:24:28 +08:00
Alex Macleod
2cadea5dc5 Fix array-size-threshold config deserialization error 2023-02-28 14:37:41 +00:00
Andreas Deininger
03a3f74365 Fixing typos 2023-02-27 21:45:26 +01:00
Liu Dingming
84ceca852e run cargo collect-metadata 2023-02-24 05:53:58 +08:00
bors
b1cf1e7b6a Auto merge of #10303 - pvdrz:pub_crate_missing_docs, r=giraffate
Add configuration to lint missing docs of `pub(crate)` items

Fixes this: https://github.com/rust-lang/rust-clippy/issues/5736#issuecomment-1412442404

TODO:
- [x] Needs docs
- [x] Needs better names
- [x] Should `pub` items be checked to when this new option is enabled? I'm saying no because `missing_docs` already exists

`@flip1995` I'd like to get some input from you :)

---

changelog: Enhancement: [`missing_docs_in_private_items`]: Added new configuration `missing-docs-in-crate-items` to lint on items visible within the current crate. For example, `pub(crate)` items.
[#10303](https://github.com/rust-lang/rust-clippy/pull/10303)
<!-- changelog_checked -->
2023-02-20 23:59:07 +00:00
Christian Poveda
790f28b153
Update documentation 2023-02-20 09:34:49 -05:00
Samuel Tardieu
21433abcea book: move warning to the right place 2023-02-12 15:29:13 +01:00
Daniel Parks
471de0cb9f
Document cargo-clippy feature
It is possible to use conditional compilation to prevent Clippy from
evaluating certain code. This adds a brief explanation of how to use the
feature with conditional compilation, and mentions that generally it’s
preferable to use something like `#[allow(clippy::all)]`.

Fixes #10220 — Ability to skip files or blocks entirely
2023-02-11 07:50:10 -08:00
Christian Poveda
cc19fbe177
update metadata 2023-02-09 16:53:34 -05:00
Michael Krasnitski
fba16e2e3a Add extra_unused_type_parameters lint 2023-02-02 19:37:34 -05:00
koka
a9e6b12854
fix: use correct lint name
fix
2023-01-30 20:35:35 +09:00
koka
af62bf95a3
fix key name of MUTABLE_KEY_TYPE 2023-01-29 03:13:30 +09:00
koka
d87a6bc9b1
add MANUAL_RETAIN to msrv
MANUAL_RETAIN uses
- msrvs::STRING_RETAIN
- msrvs::BTREE_SET_RETAIN
- msrvs::BTREE_MAP_RETAIN
- msrvs::HASH_SET_RETAIN
- msrvs::HASH_MAP_RETAIN
2023-01-29 03:07:09 +09:00
koka
2f4b047b27
add MANUAL_REM_EUCLID to msrv
MANUAL_REM_EUCLID uses msrvs::REM_EUCLID
2023-01-29 03:04:56 +09:00
koka
1766532b20
add MANUAL_IS_ASCII_CHECK to msrv
MANUAL_IS_ASCII_CHECK uses msrvs::IS_ASCII_DIGIT and msrvs::IS_ASCII_DIGIT_CONST
2023-01-29 03:02:23 +09:00
koka
25d455bd17
fix: add missing dot to suppress_restriction_lint_in_const 2023-01-29 02:54:26 +09:00
koka
e791522d35
add DERIVABLE_IMPLS to msrv
DERIVABLE_IMPLS uses msrvs::DEFAULT_ENUM_ATTRIBUTE
2023-01-29 02:39:37 +09:00
koka
fb77b02789
add NEEDLESS_BORROW to msrv
NEEDLESS_BORROW uses msrvs::ARRAY_INTO_ITERATOR
2023-01-29 02:37:00 +09:00
koka
7716d69757
fix: add missing dot to AWAIT_HOLDING_INVALID_TYPE 2023-01-29 02:27:43 +09:00