Skip to content

Clippy subtree update #132746

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

Merged
merged 162 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
62026c3
Add units/unit prefixes of frequency to doc-valid-idents
ROMemories Sep 26, 2024
b95aa31
Stabilize `isqrt` feature
ChaiTRex Oct 8, 2024
6b1779b
Add lint to check for slow symbol comparisons
GnomedDev Oct 12, 2024
dedc380
Apply fixes from lint
GnomedDev Oct 13, 2024
a650692
Add test
GnomedDev Oct 13, 2024
979e297
Update book
GnomedDev Oct 13, 2024
11162d1
fix: remove unnecessary unfilter_map usages
wowinter13 Oct 14, 2024
40cb24f
fix: simplify suggestion
wowinter13 Oct 15, 2024
ad002ea
fix: linter
wowinter13 Oct 15, 2024
8555922
Don't trigger const_is_empty for inline const assertions
alex-semenyuk Oct 17, 2024
fea5e77
Merge commit 'a109190d7060236e655fc75533373fa274ec5343' into clippy-s…
flip1995 Oct 18, 2024
91a458f
Hotfix TRAIT_METHODS static->const
flip1995 Oct 18, 2024
2c3a34a
pulldown-cmark: don't pull getopts dep
klensy Oct 18, 2024
82969e5
Allow to go through clippy lints page without javascript
GuillaumeGomez Oct 11, 2024
da19d47
Fix lints syntax highlighting
GuillaumeGomez Oct 14, 2024
47effe4
Auto merge of #13562 - klensy:pc, r=flip1995
bors Oct 18, 2024
6a79588
Auto merge of #13539 - GuillaumeGomez:allow-no-js, r=Alexendoo
bors Oct 18, 2024
a739cc3
Stop linting manual_bits in any macro invoke
GnomedDev Oct 18, 2024
f2f0175
Auto merge of #13543 - GnomedDev:symbol-comparisons, r=y21
bors Oct 18, 2024
5678531
Auto merge of #13564 - GnomedDev:fix-manualbits-in-macro, r=blyxyas
bors Oct 19, 2024
6983631
Do not run lints that cannot emit
blyxyas Nov 13, 2023
8f8aa46
Follow review comments (optimize the filtering)
blyxyas Jun 18, 2024
e427a4e
Remove module passes filtering
blyxyas Sep 7, 2024
e518d66
Apply review comments + use `shallow_lint_levels_on`
blyxyas Oct 15, 2024
38cf3f3
add debug assertions for overlapping spans and empty replacements
y21 Oct 19, 2024
4de65a1
fix empty suggestion ICE in from_over_into
y21 Oct 19, 2024
69b0886
Fix tests
compiler-errors Sep 27, 2024
64c4cf1
Fix version for `ref_option`
alex-semenyuk Oct 20, 2024
2a5de35
docs: remove stray comma
Kijewski Oct 20, 2024
aab0eee
make unsupported_calling_conventions a hard error
RalfJung Sep 3, 2024
d8b2f93
Rip out old effects var handling code from traits
compiler-errors Oct 20, 2024
65eb1ec
remove the semicolon for builtin macro call statements in `statement_…
y21 Oct 20, 2024
2666ed6
Fix indentation of website code snippets
Alexendoo Oct 20, 2024
2f71ce6
don't lint unnamed constants in `missing_docs_in_private_items`
y21 Oct 20, 2024
b3bf128
don't lint nested items that don't have generated documentation in `m…
y21 Oct 20, 2024
d00ab2e
Auto merge of #13569 - alex-semenyuk:fix_version, r=blyxyas
bors Oct 20, 2024
1d0dad5
Auto merge of #131988 - matthiaskrgr:rollup-tx173wn, r=matthiaskrgr
bors Oct 21, 2024
8538562
Auto merge of #13567 - y21:span_debug_assertions, r=flip1995
bors Oct 21, 2024
5873cb9
Auto merge of #13570 - Kijewski:pr-stray-comma, r=xFrednet
bors Oct 21, 2024
3773534
Move COGNITIVE_COMPLEXITY to use macro again
blyxyas Oct 19, 2024
f03f7c6
Auto merge of #129935 - RalfJung:unsupported_calling_conventions, r=c…
bors Oct 22, 2024
2fd8222
terminology: #[feature] *enables* a feature (instead of "declaring" o…
RalfJung Oct 8, 2024
78fc7bb
Auto merge of #131321 - RalfJung:feature-activation, r=nnethercote
bors Oct 22, 2024
088f07a
Represent TraitBoundModifiers as distinct parts in HIR
compiler-errors Oct 20, 2024
0bcc6f8
docs: Fix too_long_first_doc_paragraph: line -> paragraph
evanj Oct 22, 2024
97d13a8
Fix not working lint anchor
GuillaumeGomez Oct 22, 2024
b33977b
Fix invalid lint ID filtering
GuillaumeGomez Oct 22, 2024
54f9bc4
nightly feature tracking: get rid of the per-feature bool fields
RalfJung Oct 9, 2024
7115404
Open lint when clicking on its anchor
GuillaumeGomez Oct 23, 2024
cefa31a
Auto merge of #13588 - GuillaumeGomez:fix-lint-anchor, r=flip1995
bors Oct 23, 2024
b0412d0
borrow_deref_ref: do not trigger on `&raw` references
samueltardieu Oct 20, 2024
c2534dc
Auto merge of #13460 - ROMemories:feat/freq-units-allowed-idents, r=C…
bors Oct 24, 2024
eb6026a
Remove associated type based effects logic
compiler-errors Oct 20, 2024
6bcd0b9
Auto merge of #13558 - alex-semenyuk:const_is_empty_fix, r=dswij
bors Oct 24, 2024
5d681cf
Pass Ident by reference in ast Visitor
maxcabrajac Oct 24, 2024
9cf416d
Auto merge of #13586 - evanj:evan.jones/long-paragraph-edit, r=xFrednet
bors Oct 24, 2024
3338611
Switch CI from bors to merge queue
Kobzol Oct 25, 2024
59ecf4d
Fix is_from_proc_macro attr
RuairidhWilliamson Oct 25, 2024
a1ff955
Rollup merge of #132106 - maxcabrajac:ident_ref, r=petrochenkov
matthiaskrgr Oct 25, 2024
cd21594
tcx.is_const_fn doesn't work the way it is described, remove it
RalfJung Oct 12, 2024
8b9376a
Auto merge of #131349 - RalfJung:const-stability-checks, r=compiler-e…
bors Oct 25, 2024
560353c
Stop linting unused_io_amount in io traits
GnomedDev Oct 25, 2024
350d1c4
Effects cleanup
fee1-dead Oct 26, 2024
b75d511
Rollup merge of #132168 - fee1-dead-contrib:fxclean, r=compiler-errors
matthiaskrgr Oct 26, 2024
9e36f89
Auto merge of #125116 - blyxyas:ignore-allowed-lints-final, r=cjgillot
bors Oct 26, 2024
c4815ae
[`infinite_loops`]: fix suggestion error on async functions/closures
J-ZhengLi Oct 26, 2024
3caff99
Auto merge of #13571 - Alexendoo:website-code-indent, r=Centri3
bors Oct 26, 2024
a0fab5c
Auto merge of #13605 - GnomedDev:read-exact-in-read-exact, r=llogiq
bors Oct 27, 2024
900db48
Add test case for missing_errors_doc at tests with option check-priva…
alex-semenyuk Oct 27, 2024
c02f3a2
Auto merge of #13600 - samueltardieu:push-tzuvnutssmrs, r=xFrednet
bors Oct 27, 2024
31f6679
Auto merge of #13610 - alex-semenyuk:add_test_case, r=xFrednet
bors Oct 27, 2024
d0b15f1
Swap Msrv from Vec to SmallVec
GnomedDev Oct 27, 2024
f562d47
Unvacation giraffate and remove gh-pages -> xFrednet assignment
xFrednet Oct 27, 2024
12ca363
Auto merge of #13611 - xFrednet:0-giraffate-alumni, r=xFrednet
bors Oct 27, 2024
73bad36
Auto merge of #13548 - wowinter13:unnecessary_filter_map_filter_map_s…
bors Oct 27, 2024
62c4daf
New lint `needless_as_bytes`
samueltardieu Sep 21, 2024
f152bcb
Update the number of lints (over 700 → over 750)
samueltardieu Oct 28, 2024
d30a026
check if we need a parenthesis
CoCo-Japan-pan Oct 24, 2024
303ab51
Rollup merge of #131391 - ChaiTRex:isqrt, r=scottmcm,tgross35
matthiaskrgr Oct 28, 2024
f286174
New lint: `dangling_pointers_from_temporaries`
GrigorenkoPV Oct 16, 2024
a529c44
Auto merge of #13472 - GnomedDev:smaller-msrv, r=Jarcho
bors Oct 28, 2024
2e4a11e
Auto merge of #13338 - CoCo-Japan-pan:nonminimal_bool_casted, r=Centri3
bors Oct 28, 2024
d63322f
fix: usage of `a deprecated Node.js version`
hamirmahal Oct 28, 2024
d09d85d
Auto merge of #13614 - hamirmahal:fix/usage-of-a-deprecated-nodejs-ve…
bors Oct 28, 2024
c5df79d
Fire large_const_arrays for computed array lengths
GnomedDev Oct 28, 2024
528dcc3
Auto merge of #13620 - GnomedDev:large-const-array-compute-const, r=M…
bors Oct 28, 2024
149665a
Auto merge of #128985 - GrigorenkoPV:instantly-dangling-pointer, r=Urgau
bors Oct 29, 2024
353868a
Remove region from adjustments
compiler-errors Oct 29, 2024
625d391
Auto merge of #13437 - samueltardieu:issue-13434, r=y21
bors Oct 29, 2024
f2f73f9
Replace `.map(…).any(identity)` by `.any(…)`
samueltardieu Oct 4, 2024
91a1d16
Add new lint: `map_all_any_identity`
samueltardieu Oct 4, 2024
35a7095
Auto merge of #13499 - samueltardieu:map-all-any-identity, r=xFrednet
bors Oct 29, 2024
8d190cc
update tools
lcnr Oct 24, 2024
acc3842
Add new `map_with_unused_argument_over_ranges` lint
rspencer01 Jul 3, 2024
15ad824
Auto merge of #13034 - rspencer01:trivial_map_over_range, r=y21
bors Oct 29, 2024
ae82c75
Remove `Analysis::into_engine`.
nnethercote Oct 29, 2024
297f28c
Rollup merge of #132338 - nnethercote:rm-Engine, r=nnethercote
matthiaskrgr Oct 30, 2024
a304709
Do not use `gen` as a variable name
samueltardieu Oct 29, 2024
f7ab2c9
new lint: `source_item_ordering`
decryphe Aug 29, 2024
0c1ef98
Use match ergonomics compatible with editions 2021 and 2024
samueltardieu Oct 29, 2024
540e116
Return iterator must not capture lifetimes in Rust 2024
samueltardieu Oct 29, 2024
8052451
no_mangle attribute requires unsafe in Rust 2024
samueltardieu Oct 30, 2024
bd4aa17
Add 'CoAP' to doc-valid-idents
chrysn Oct 30, 2024
1bdc08a
Auto merge of #13599 - RuairidhWilliamson:proc_macro_attr, r=blyxyas
bors Oct 30, 2024
d9a0fec
Remap impl-trait lifetimes on HIR instead of AST lowering.
cjgillot Aug 20, 2024
323f144
Cleanup code suggestion for `into_iter_without_iter`
nyurik Oct 30, 2024
a7aa8bf
Watch `tests/compile-test.rs` in `cargo dev serve`
Alexendoo Oct 30, 2024
0c29fcc
Extend `large_include_file` lint to also work on attributes
GuillaumeGomez Oct 30, 2024
1998abc
Auto merge of #13633 - chrysn-pull-requests:doc-valid-ident-coap, r=C…
bors Oct 30, 2024
e1fa1b2
Auto merge of #13636 - GuillaumeGomez:extend-large_include_file, r=dswij
bors Oct 31, 2024
9f89421
Auto merge of #132301 - compiler-errors:adjust, r=lcnr
bors Oct 31, 2024
d30a0b2
`ConstCx` stop using `ParamEnv::reveal`
lcnr Oct 31, 2024
bad3edd
clippy: we've got a `LateContext` use it for `TypingMode`
lcnr Oct 31, 2024
2298a67
Auto merge of #13628 - samueltardieu:push-puluprmsyuzq, r=xFrednet
bors Oct 31, 2024
d7850ec
stop using `ParamEnv::reveal` while handling MIR
lcnr Oct 31, 2024
8568ca8
Auto merge of #13634 - nyurik:fix-iter-without-into, r=xFrednet,samue…
bors Oct 31, 2024
c2db7fa
Rollup merge of #132403 - lcnr:typing-mode, r=compiler-errors
workingjubilee Nov 1, 2024
012e306
Explain why clippy's HIR const eval exists
GnomedDev Oct 27, 2024
c782988
Auto merge of #13615 - GnomedDev:document-constevalctx-point, r=Alexe…
bors Nov 1, 2024
c056928
Improve display of clippy lints page when JS is disabled
GuillaumeGomez Oct 22, 2024
ca5c6f6
Improve theme handling when JS is disabled
GuillaumeGomez Oct 22, 2024
ac764df
Handle noscript style with "js" class on `<html>`.
GuillaumeGomez Nov 1, 2024
e4dc892
Auto merge of #13608 - J-ZhengLi:issue12338-new, r=Alexendoo
bors Nov 1, 2024
9d03956
Auto merge of #13635 - Alexendoo:cargo-dev-serve-watch-test, r=blyxyas
bors Nov 1, 2024
e8b78e2
Auto merge of #13630 - samueltardieu:push-qrnxuykslnsl, r=y21
bors Nov 1, 2024
5c6fe68
Auto merge of #13376 - decryphe:source-ordering, r=llogiq
bors Nov 2, 2024
52b8324
Auto merge of #13585 - GuillaumeGomez:no-js, r=Alexendoo
bors Nov 2, 2024
ddd1a86
Auto merge of #13573 - y21:issue13427, r=Centri3
bors Nov 3, 2024
2f1b7b6
needless_continue: check labels consistency before warning
samueltardieu Nov 3, 2024
040129b
Auto merge of #13629 - samueltardieu:push-nwukowumrvsn, r=flip1995
bors Nov 3, 2024
f0cf996
Rename the FIXMEs, remove a few that dont matter anymore
compiler-errors Nov 1, 2024
a1a9aae
Auto merge of #13631 - samueltardieu:push-uoowutzkvsrk, r=Centri3
bors Nov 3, 2024
ccf7c88
Auto merge of #13648 - samueltardieu:push-rpxvoukpolvm, r=Centri3
bors Nov 3, 2024
b14362f
ty::KContainer -> ty::AssocItemContainer::K
compiler-errors Nov 3, 2024
efeed55
Remove BorrowKind glob, make names longer
compiler-errors Nov 3, 2024
63d0ba9
Move two attribute lints to be early pass (post expansion)
jdonszelmann Nov 4, 2024
44c2a82
Swap Visitors to early exit, instead of storing poison flag
GnomedDev Nov 4, 2024
d8a3fcc
Auto merge of #132580 - compiler-errors:globs, r=Noratrieb
bors Nov 5, 2024
626406f
Do not filter empty passes & Make CTFE Clippy into lintless pass
blyxyas Nov 5, 2024
6631a2c
Auto merge of #13654 - GnomedDev:early-exit-visitors, r=Alexendoo
bors Nov 5, 2024
4847c40
Rollup merge of #132637 - blyxyas:lint-less-passes, r=flip1995
matthiaskrgr Nov 5, 2024
c931096
collect attribute spans early for disallowed macros
jdonszelmann Nov 5, 2024
c1ab18d
no_mangle_with_rust_abi: properly position the suggested ABI
samueltardieu Nov 5, 2024
f02a020
Auto merge of #13659 - samueltardieu:push-twtxmtvopoxo, r=blyxyas
bors Nov 6, 2024
7bcd578
Link fix
alex-semenyuk Nov 6, 2024
ab560d8
Auto merge of #13661 - alex-semenyuk:doc_fix, r=Manishearth
bors Nov 6, 2024
b816d4e
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Nov 7, 2024
03daf7c
Fix author lint and move it back to tests/ui
flip1995 Nov 7, 2024
4f12b98
Clean up declare_clippy_lint
flip1995 Nov 3, 2024
c64f1e3
Fix lint_without_lint_pass internal lint
flip1995 Nov 3, 2024
b27570b
Fix cargo dev update_lints
flip1995 Nov 3, 2024
a5d6100
Bump nightly version -> 2024-11-07
flip1995 Nov 7, 2024
d583df0
Remove ui/no_lints.rs test
flip1995 Nov 7, 2024
9ebe68d
Add conclusion job to PR CI
Kobzol Nov 7, 2024
843ef1b
Remove path filter
Kobzol Nov 7, 2024
a28c44f
Merge pull request #13587 from Kobzol/ci-remove-bors
flip1995 Nov 7, 2024
b116696
Remove CI badge from README and book
flip1995 Nov 7, 2024
3518178
Merge pull request #13639 from flip1995/rustup
flip1995 Nov 7, 2024
f712eb5
Merge pull request #13657 from jdonszelmann/disallowed-macros-to-early
flip1995 Nov 7, 2024
40aec58
Merge commit 'f712eb5cdccd121d0569af12f20e6a0fabe4364d' into clippy-s…
flip1995 Nov 7, 2024
2ab848b
Update Cargo.lock
flip1995 Nov 7, 2024
0aafd65
Clippy: cfg out validate_diag on release builds
flip1995 Nov 8, 2024
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
1 change: 0 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2861,7 +2861,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "679341d22c78c6c649893cbd6c3278dcbe9fc4faa62fea3a9296ae2b50c14625"
dependencies = [
"bitflags 2.6.0",
"getopts",
"memchr",
"pulldown-cmark-escape 0.11.0",
"unicase",
Expand Down
50 changes: 17 additions & 33 deletions src/tools/clippy/.github/workflows/clippy_dev.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
name: Clippy Dev Test

on:
push:
branches:
- auto
- try
merge_group:
pull_request:
# Only run on paths, that get checked by the clippy_dev tool
paths:
- 'CHANGELOG.md'
- 'README.md'
- '**.stderr'
- '**.rs'

env:
RUST_BACKTRACE: 1
Expand Down Expand Up @@ -47,28 +38,21 @@ jobs:
cargo check
git reset --hard HEAD

# These jobs doesn't actually test anything, but they're only used to tell
# bors the build completed, as there is no practical way to detect when a
# workflow is successful listening to webhooks only.
#
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!

end-success:
name: bors dev test finished
if: github.event.pusher.name == 'bors' && success()
runs-on: ubuntu-latest
needs: [clippy_dev]

steps:
- name: Mark the job as successful
run: exit 0

end-failure:
name: bors dev test finished
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
conclusion_dev:
needs: [ clippy_dev ]
# We need to ensure this job does *not* get skipped if its dependencies fail,
# because a skipped job is considered a success by GitHub. So we have to
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
# when the workflow is canceled manually.
#
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs: [clippy_dev]

steps:
- name: Mark the job as a failure
run: exit 1
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: Conclusion
run: |
# Print the dependent jobs to see them in the CI log
jq -C <<< '${{ toJson(needs) }}'
# Check if all jobs that we depend on (in the needs array) were successful.
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Clippy Test (bors)
name: Clippy Test (merge queue)

on:
push:
branches:
- auto
- try
merge_group:

env:
RUST_BACKTRACE: 1
Expand All @@ -13,11 +10,6 @@ env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: -D warnings

concurrency:
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: true

defaults:
run:
shell: bash
Expand Down Expand Up @@ -218,28 +210,21 @@ jobs:
env:
INTEGRATION: ${{ matrix.integration }}

# These jobs doesn't actually test anything, but they're only used to tell
# bors the build completed, as there is no practical way to detect when a
# workflow is successful listening to webhooks only.
#
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!

end-success:
name: bors test finished
if: github.event.pusher.name == 'bors' && success()
conclusion:
needs: [ changelog, base, metadata_collection, integration_build, integration ]
# We need to ensure this job does *not* get skipped if its dependencies fail,
# because a skipped job is considered a success by GitHub. So we have to
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
# when the workflow is canceled manually.
#
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs: [changelog, base, metadata_collection, integration_build, integration]

steps:
- name: Mark the job as successful
run: exit 0

end-failure:
name: bors test finished
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
runs-on: ubuntu-latest
needs: [changelog, base, metadata_collection, integration_build, integration]

steps:
- name: Mark the job as a failure
run: exit 1
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: Conclusion
run: |
# Print the dependent jobs to see them in the CI log
jq -C <<< '${{ toJson(needs) }}'
# Check if all jobs that we depend on (in the needs array) were successful.
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
name: Clippy Test

on:
push:
# Ignore bors branches, since they are covered by `clippy_bors.yml`
branches-ignore:
- auto
- try
# Don't run Clippy tests, when only text files were modified
paths-ignore:
- 'COPYRIGHT'
- 'LICENSE-*'
- '**.md'
- '**.txt'
pull_request:
# Don't run Clippy tests, when only text files were modified
paths-ignore:
- 'COPYRIGHT'
- 'LICENSE-*'
- '**.md'
- '**.txt'

env:
RUST_BACKTRACE: 1
Expand All @@ -35,7 +18,7 @@ concurrency:

jobs:
base:
# NOTE: If you modify this job, make sure you copy the changes to clippy_bors.yml
# NOTE: If you modify this job, make sure you copy the changes to clippy_mq.yml
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -73,3 +56,24 @@ jobs:
run: .github/driver.sh
env:
OS: ${{ runner.os }}

# We need to have the "conclusion" job also on PR CI, to make it possible
# to add PRs to a merge queue.
conclusion:
needs: [ base ]
# We need to ensure this job does *not* get skipped if its dependencies fail,
# because a skipped job is considered a success by GitHub. So we have to
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
# when the workflow is canceled manually.
#
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: Conclusion
run: |
# Print the dependent jobs to see them in the CI log
jq -C <<< '${{ toJson(needs) }}'
# Check if all jobs that we depend on (in the needs array) were successful.
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: cargo generate-lockfile

- name: Cache
uses: Swatinem/rust-cache@v2.7.0
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/master' }}

Expand Down
46 changes: 17 additions & 29 deletions src/tools/clippy/.github/workflows/remark.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: Remark

on:
push:
branches:
- auto
- try
merge_group:
pull_request:
paths:
- '**.md'

jobs:
remark:
Expand Down Expand Up @@ -45,28 +40,21 @@ jobs:
- name: Build mdbook
run: mdbook build book

# These jobs doesn't actually test anything, but they're only used to tell
# bors the build completed, as there is no practical way to detect when a
# workflow is successful listening to webhooks only.
#
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!

end-success:
name: bors remark test finished
if: github.event.pusher.name == 'bors' && success()
runs-on: ubuntu-latest
needs: [remark]

steps:
- name: Mark the job as successful
run: exit 0

end-failure:
name: bors remark test finished
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
conclusion_remark:
needs: [ remark ]
# We need to ensure this job does *not* get skipped if its dependencies fail,
# because a skipped job is considered a success by GitHub. So we have to
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
# when the workflow is canceled manually.
#
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs: [remark]

steps:
- name: Mark the job as a failure
run: exit 1
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: Conclusion
run: |
# Print the dependent jobs to see them in the CI log
jq -C <<< '${{ toJson(needs) }}'
# Check if all jobs that we depend on (in the needs array) were successful.
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
7 changes: 7 additions & 0 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5331,6 +5331,7 @@ Released 2018-09-13
[`almost_complete_range`]: https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range
[`almost_swapped`]: https://rust-lang.github.io/rust-clippy/master/index.html#almost_swapped
[`approx_constant`]: https://rust-lang.github.io/rust-clippy/master/index.html#approx_constant
[`arbitrary_source_item_ordering`]: https://rust-lang.github.io/rust-clippy/master/index.html#arbitrary_source_item_ordering
[`arc_with_non_send_sync`]: https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
[`arithmetic_side_effects`]: https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects
[`as_conversions`]: https://rust-lang.github.io/rust-clippy/master/index.html#as_conversions
Expand Down Expand Up @@ -5689,13 +5690,15 @@ Released 2018-09-13
[`manual_unwrap_or_default`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
[`manual_while_let_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some
[`many_single_char_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names
[`map_all_any_identity`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity
[`map_clone`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
[`map_collect_result_unit`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_collect_result_unit
[`map_entry`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_entry
[`map_err_ignore`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_err_ignore
[`map_flatten`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
[`map_identity`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_identity
[`map_unwrap_or`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
[`map_with_unused_argument_over_ranges`]: https://rust-lang.github.io/rust-clippy/master/index.html#map_with_unused_argument_over_ranges
[`match_as_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_as_ref
[`match_bool`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_bool
[`match_like_matches_macro`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
Expand Down Expand Up @@ -5761,6 +5764,7 @@ Released 2018-09-13
[`mutex_integer`]: https://rust-lang.github.io/rust-clippy/master/index.html#mutex_integer
[`naive_bytecount`]: https://rust-lang.github.io/rust-clippy/master/index.html#naive_bytecount
[`needless_arbitrary_self_type`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[`needless_as_bytes`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes
[`needless_bitwise_bool`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_bitwise_bool
[`needless_bool`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool
[`needless_bool_assign`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign
Expand Down Expand Up @@ -6205,19 +6209,22 @@ Released 2018-09-13
[`max-trait-bounds`]: https://doc.rust-lang.org/clippy/lint_configuration.html#max-trait-bounds
[`min-ident-chars-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#min-ident-chars-threshold
[`missing-docs-in-crate-items`]: https://doc.rust-lang.org/clippy/lint_configuration.html#missing-docs-in-crate-items
[`module-item-order-groupings`]: https://doc.rust-lang.org/clippy/lint_configuration.html#module-item-order-groupings
[`msrv`]: https://doc.rust-lang.org/clippy/lint_configuration.html#msrv
[`pass-by-value-size-limit`]: https://doc.rust-lang.org/clippy/lint_configuration.html#pass-by-value-size-limit
[`pub-underscore-fields-behavior`]: https://doc.rust-lang.org/clippy/lint_configuration.html#pub-underscore-fields-behavior
[`semicolon-inside-block-ignore-singleline`]: https://doc.rust-lang.org/clippy/lint_configuration.html#semicolon-inside-block-ignore-singleline
[`semicolon-outside-block-ignore-multiline`]: https://doc.rust-lang.org/clippy/lint_configuration.html#semicolon-outside-block-ignore-multiline
[`single-char-binding-names-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#single-char-binding-names-threshold
[`source-item-ordering`]: https://doc.rust-lang.org/clippy/lint_configuration.html#source-item-ordering
[`stack-size-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#stack-size-threshold
[`standard-macro-braces`]: https://doc.rust-lang.org/clippy/lint_configuration.html#standard-macro-braces
[`struct-field-name-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#struct-field-name-threshold
[`suppress-restriction-lint-in-const`]: https://doc.rust-lang.org/clippy/lint_configuration.html#suppress-restriction-lint-in-const
[`too-large-for-stack`]: https://doc.rust-lang.org/clippy/lint_configuration.html#too-large-for-stack
[`too-many-arguments-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#too-many-arguments-threshold
[`too-many-lines-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#too-many-lines-threshold
[`trait-assoc-item-kinds-order`]: https://doc.rust-lang.org/clippy/lint_configuration.html#trait-assoc-item-kinds-order
[`trivial-copy-size-limit`]: https://doc.rust-lang.org/clippy/lint_configuration.html#trivial-copy-size-limit
[`type-complexity-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#type-complexity-threshold
[`unnecessary-box-size`]: https://doc.rust-lang.org/clippy/lint_configuration.html#unnecessary-box-size
Expand Down
16 changes: 1 addition & 15 deletions src/tools/clippy/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ All contributors are expected to follow the [Rust Code of Conduct].
- [Rust Analyzer](#rust-analyzer)
- [How Clippy works](#how-clippy-works)
- [Issue and PR triage](#issue-and-pr-triage)
- [Bors and Homu](#bors-and-homu)
- [Contributions](#contributions)
- [License](#license)

Expand Down Expand Up @@ -213,26 +212,13 @@ We have prioritization labels and a sync-blocker label, which are described belo
Or rather: before the sync this should be addressed,
e.g. by removing a lint again, so it doesn't hit beta/stable.

## Bors and Homu

We use a bot powered by [Homu][homu] to help automate testing and landing of pull
requests in Clippy. The bot's username is @bors.

You can find the Clippy bors queue [here][homu_queue].

If you have @bors permissions, you can find an overview of the available
commands [here][homu_instructions].

[triage]: https://forge.rust-lang.org/release/triage-procedure.html
[l-crash]: https://github.com/rust-lang/rust-clippy/labels/L-crash
[l-bug]: https://github.com/rust-lang/rust-clippy/labels/L-bug
[p-low]: https://github.com/rust-lang/rust-clippy/labels/P-low
[p-medium]: https://github.com/rust-lang/rust-clippy/labels/P-medium
[p-high]: https://github.com/rust-lang/rust-clippy/labels/P-high
[l-sync-blocker]: https://github.com/rust-lang/rust-clippy/labels/L-sync-blocker
[homu]: https://github.com/rust-lang/homu
[homu_instructions]: https://bors.rust-lang.org/
[homu_queue]: https://bors.rust-lang.org/queue/clippy

## Contributions

Expand All @@ -244,7 +230,7 @@ All PRs should include a `changelog` entry with a short comment explaining the c
"what do you believe is important from an outsider's perspective?" Often, PRs are only related to a single property of a
lint, and then it's good to mention that one. Otherwise, it's better to include too much detail than too little.

Clippy's [changelog] is created from these comments. Every release, someone gets all commits from bors with a
Clippy's [changelog] is created from these comments. Every release, someone gets all merge commits with a
`changelog: XYZ` entry and combines them into the changelog. This is a manual process.

Examples:
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ toml = "0.7.3"
walkdir = "2.3"
filetime = "0.2.9"
itertools = "0.12"
pulldown-cmark = "0.11"
pulldown-cmark = { version = "0.11", default-features = false, features = ["html"] }
rinja = { version = "0.3", default-features = false, features = ["config"] }

# UI test dependencies
Expand Down
3 changes: 1 addition & 2 deletions src/tools/clippy/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Clippy

[![Clippy Test](https://github.com/rust-lang/rust-clippy/workflows/Clippy%20Test%20(bors)/badge.svg?branch=auto&event=push)](https://github.com/rust-lang/rust-clippy/actions?query=workflow%3A%22Clippy+Test+(bors)%22+event%3Apush+branch%3Aauto)
[![License: MIT OR Apache-2.0](https://img.shields.io/crates/l/clippy.svg)](#license)

A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code.

[There are over 700 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
[There are over 750 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)

Lints are divided into categories, each with a default [lint level](https://doc.rust-lang.org/rustc/lints/levels.html).
You can choose how much Clippy is supposed to ~~annoy~~ help you by changing the lint level by category.
Expand Down
Loading
Loading