Skip to content

Clippy subtree update #143745

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

Draft
wants to merge 119 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
2dbaf1c
Create summary comment for lintcheck runs
Alexendoo May 15, 2025
8bb957e
triagebot: enable issue transfer
lolbinarycat May 23, 2025
709efc2
Correct the CC lint's documentation
felix91gr May 29, 2025
a2b2345
Fix coerce_container_to_any false positive on autoderef
Ralith Jun 14, 2025
8e285d6
Use precedence-aware formatting for coerce_container_to_any suggestions
Ralith Jun 14, 2025
dc1b9ce
Fix reference mutability in coerce_container_to_any diagnostics
Ralith Jun 14, 2025
f46cf87
fix: `op_ref` wrongly showed macro definition in suggestions
profetia Jun 17, 2025
f29aa69
fix: `needless_bool_assign` missing curlies when on else if
profetia Jun 17, 2025
dc3b8be
precommit test
klensy Jun 17, 2025
a82c142
or_fun_call: lint Option/Result::and(_then) too
klensy Jun 17, 2025
7a6f7bc
Update clippy source code to changes on `source_span_for_markdown_range`
GuillaumeGomez May 27, 2025
89f7a43
Properly check that an expression might be the one returned
samueltardieu Jun 23, 2025
cd68244
Handle potentially-shadowing bindings in manual_let_else
notriddle Jun 23, 2025
71ff9a0
fix mul_add uncertain sugg
odysa Jun 25, 2025
1eb2920
add more test cases and clauses
odysa Jun 25, 2025
ecb397a
Reduce page size and number of DOM elements on clippy lints page
GuillaumeGomez Jun 25, 2025
0c0a4d5
fix closure and refactor tooling code
odysa Jun 26, 2025
9b4231d
fix redudant closure broken fix
odysa Jun 26, 2025
bb59c39
Don't remove explicit cast to trait object pointer
samueltardieu Jun 26, 2025
4f3c174
Change const trait bound syntax from ~const to [const]
oli-obk Mar 11, 2025
55d4f76
Rollup merge of #141648 - GuillaumeGomez:redundant_explicit_links-exp…
matthiaskrgr Jun 26, 2025
664b143
doc_nested_refdefs: do not falsely report checkboxes as refdefs
notriddle Jun 26, 2025
9117cb0
`zero_ptr`: lint in `const` context as well
samueltardieu Jun 26, 2025
074ccaf
Merge commit 'c5dbd1de07e0407b9687619a868384d6de06253f' into clippy-s…
flip1995 Jun 27, 2025
4a8eec3
broken_links: Fix rustdoc API usage
flip1995 Jun 27, 2025
7e406e2
fix: `disallowed_script_idents` FP on identifiers with `_`
profetia Jun 24, 2025
a19d621
Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-dead
matthiaskrgr Jun 27, 2025
06a87e9
Auto merge of #143116 - matthiaskrgr:rollup-zy9ez06, r=matthiaskrgr
bors Jun 27, 2025
8633bcb
`zero_ptr`: lint in `const` context as well (#15152)
dswij Jun 28, 2025
428208e
Fix `disallowed_script_idents` FP on identifiers with `_` (#15123)
dswij Jun 28, 2025
ad7de94
Consider deref'ed argument as non-temporary
samueltardieu Jun 29, 2025
ff3c9c1
`missing_panics_doc`: Correctly distinguish maybe-const vs always-con…
itsjunetime Jun 29, 2025
1f76a23
`missing_panics_doc`: Allow `unwrap()` and `expect()` inside const-on…
samueltardieu Jun 29, 2025
9cba70b
fix: `cast_possible_truncation` should not suggest inside const context
profetia Jun 28, 2025
b57bf6b
Fix `cast_possible_truncation` should not suggest inside const contex…
samueltardieu Jun 29, 2025
6709720
Introduce `ByteSymbol`.
nnethercote Jun 1, 2025
f3b3c09
Polishing changelog update doc
alex-semenyuk Jun 28, 2025
a1e6ae9
FIX: NegMultiply should preserve parenthesis when method is called
Zarathustra2 Jun 30, 2025
c69905a
Do not remove method call if type is adjusted
samueltardieu Jun 30, 2025
936baca
Consider deref'ed argument as non-temporary (#15172)
y21 Jun 30, 2025
8ceb91e
Do not remove `as` if it changes the type
samueltardieu Jun 30, 2025
bca8931
Fix coerce_container_to_any false positive on autoderef (#15057)
llogiq Jun 30, 2025
1fcd632
bump ui_test to 0.30.1
RalfJung Jun 30, 2025
4c99809
bump ui_test to 0.30.1 (#15184)
samueltardieu Jul 1, 2025
e32c65d
Activate feature freeze automated notice
samueltardieu Jun 30, 2025
a53144e
Activate feature freeze automated notice (#15177)
flip1995 Jul 1, 2025
0732085
Polishing changelog update doc (#15167)
flip1995 Jul 1, 2025
708ea87
run cargo dev fmt
Zarathustra2 Jul 1, 2025
e7fa536
fix tests (run cargo uibless after fmt)
Zarathustra2 Jul 1, 2025
5ff1a41
use ui_test dependency builder for non-internal test dependencies
RalfJung Jul 1, 2025
9eb8512
fix: `std-instead-of-core` FP when not all items come from the new crate
profetia Jun 28, 2025
4793fd1
Update clippy source code to make use of `TyCtxt::def_descr` instead …
GuillaumeGomez Jul 1, 2025
eeaa63f
Remove support for dyn*
compiler-errors Jun 26, 2025
ad15b60
Fix `std-instead-of-core` FP when not all items come from the new cra…
samueltardieu Jul 1, 2025
a51c494
Auto merge of #143036 - compiler-errors:no-dyn-star, r=oli-obk
bors Jul 1, 2025
fc3d5e6
Remove unneeded `.as_bytes()`
samueltardieu May 21, 2025
ebdbd7c
doc_nested_refdefs: do not falsely report checkboxes as refdefs (#15146)
samueltardieu Jul 1, 2025
8bd580b
Add `track_caller` attributes to trace origin of Clippy lints
samueltardieu Jul 1, 2025
8e4b544
use ui_test dependency builder for test dependencies (#14883)
samueltardieu Jul 2, 2025
fc07631
Add Triagebot's `concern` capability to the Clippy repository
samueltardieu May 29, 2025
8b034bc
Add Triagebot's `concern` capability to the Clippy repository (#14916)
flip1995 Jul 2, 2025
45b32ef
Rollup merge of #143306 - samueltardieu:track-clippy-lints-emission, …
matthiaskrgr Jul 2, 2025
321542e
Correct the Cognitive Complexity lint's documentation (#14915)
flip1995 Jul 3, 2025
8bc4add
Do not lint intrinsics as empty loops
samueltardieu Jul 3, 2025
7060377
refactor: Make -Ztrack-diagnostics emit like a note
Muscraft Jun 3, 2025
a4f9d7a
Replace kw_span by full span.
cjgillot Jul 2, 2024
a7c1469
Do not lint intrinsics as empty loops (#15201)
dswij Jul 3, 2025
b631cef
Remove unneeded `.as_bytes()` (#15196)
dswij Jul 3, 2025
9d8e68d
bump termize
klensy Jul 4, 2025
876e05d
bump termize (#15207)
samueltardieu Jul 4, 2025
da2f0ad
Reduce page size and number of DOM elements on clippy lints page (#15…
samueltardieu Jul 4, 2025
dd1a52f
Simplify clippy lints page further
GuillaumeGomez Jul 4, 2025
60a978d
Simplify clippy lints page further (#15208)
samueltardieu Jul 4, 2025
b4a0cd9
Remove names_imported_by_glob_use query.
cjgillot Jul 3, 2025
2e9b294
Rollup merge of #143286 - Muscraft:track-diagnostics-note, r=WaffleLa…
matthiaskrgr Jul 4, 2025
9c9ee34
Port `#[non_exhaustive]` to the new attribute parsing infrastructure
JonathanBrouwer Jul 3, 2025
daf9adb
Rollup merge of #143372 - cjgillot:bare-glob-map, r=petrochenkov
matthiaskrgr Jul 4, 2025
e0e881f
Propagate accept-comment-above-attributes to statements
blyxyas Jul 6, 2025
b49064e
Not on vacation, again!
blyxyas Jul 6, 2025
b28049d
Not on vacation, again! (#15214)
blyxyas Jul 6, 2025
7c39d37
Propagate `accept-comment-above-attributes` to statements (#15213)
samueltardieu Jul 6, 2025
8aad0e6
Rewrite empty attribute lint
JonathanBrouwer Jul 4, 2025
8d688c6
Do not remove `as` if it changes the type (#15182)
dswij Jul 6, 2025
2713c50
fix: redundant_closure_call lint for closures with block (#15144)
llogiq Jul 6, 2025
cd679d6
FIX: NegMultiply should preserve parenthesis when method is called (#…
llogiq Jul 6, 2025
60d5785
Don't remove explicit cast to trait object pointer (#15145)
llogiq Jul 6, 2025
412def2
fix: Improve floating point lint to handle ambiguous type (#15133)
llogiq Jul 6, 2025
5c51a1d
Handle potentially-shadowing bindings in `manual_let_else` (#15118)
llogiq Jul 6, 2025
cc7b2f5
Properly check that an expression might be the one returned (#15115)
llogiq Jul 6, 2025
c943f4c
or_fun_call: also lint `and` method for Option/Result (#15073)
llogiq Jul 6, 2025
d8ba94b
Fix `manual_is_variant_and` condition generation
samueltardieu Jul 3, 2025
491c8fe
clippy: migrate BareFn -> FnPtr
workingjubilee Jul 6, 2025
c6be762
Rollup merge of #143544 - workingjubilee:rename-bare-fn, r=fmease
jhpratt Jul 7, 2025
f4e2b5c
compiler: Parse `p-` specs in datalayout string, allow definition of …
xdoardo Jun 29, 2025
2b93d2c
skip exit late lint pass on tests
Jared-Prime Jul 7, 2025
1f36d4d
run `cargo dev fmt` on changes
Jared-Prime Jul 7, 2025
9ac0901
Auto merge of #143182 - xdoardo:more-addrspace, r=workingjubilee
bors Jul 7, 2025
c000a01
fix: check against 'main' function name instead of entrypoint function
sesgoe Jul 7, 2025
5853e6f
chore: add tests to check against the --test compile flag
sesgoe Jul 7, 2025
52aa383
Merge pull request #1 from sesgoe/ses/update-clippy-fix-13518
Jared-Prime Jul 7, 2025
1c7fb0f
do not completely suppress warning with test code
Jared-Prime Jul 7, 2025
9580d61
remove no longer used import
Jared-Prime Jul 7, 2025
81dd4e6
use preinterned symbol
Jared-Prime Jul 7, 2025
d6f7aad
Make `Default` const and add some `const Default` impls
estebank Dec 21, 2024
5228e28
Account for const stability in clippy when checking constness
estebank Jul 7, 2025
d964e55
skip exit late lint pass on tests (#15222)
llogiq Jul 8, 2025
2ed97eb
Create summary comment for lintcheck runs (#14816)
flip1995 Jul 9, 2025
dcc7906
triagebot: enable issue transfer (#14874)
flip1995 Jul 9, 2025
a24fb38
Do not remove method call if type is adjusted (#15181)
Jarcho Jul 9, 2025
012e5f5
Fix `manual_is_variant_and` condition generation (#15206)
y21 Jul 9, 2025
49ca220
Fix multiple problems in #15063 (#15070)
llogiq Jul 9, 2025
0a64bfd
Remove uncessary parens in closure body with unused lint
chenyukang Jun 29, 2025
9e0f749
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Jul 10, 2025
b9af667
Bump nightly version -> 2025-07-10
flip1995 Jul 10, 2025
cdbbf3a
Rustup (#15243)
flip1995 Jul 10, 2025
ee400af
Merge commit 'cdbbf3afda0b1bf51568b368f629b1d828507f98' into clippy-s…
flip1995 Jul 10, 2025
69fca56
Update Cargo.lock
flip1995 Jul 10, 2025
c629a45
Add clippy_test_deps to workspace member of repo
flip1995 Jul 10, 2025
a0a8e80
fix clippy_test_deps workspace handling
RalfJung Jul 12, 2025
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
204 changes: 43 additions & 161 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,6 @@ version = "0.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e"

[[package]]
name = "bytes"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"

[[package]]
name = "camino"
version = "1.1.10"
Expand Down Expand Up @@ -569,22 +563,16 @@ dependencies = [
"color-print",
"declare_clippy_lint",
"filetime",
"futures",
"if_chain",
"itertools",
"parking_lot",
"pulldown-cmark",
"quote",
"regex",
"rustc_tools_util 0.4.2",
"serde",
"serde_json",
"syn 2.0.104",
"tempfile",
"termize 0.1.1",
"tokio",
"termize",
"toml 0.7.8",
"ui_test",
"ui_test 0.30.2",
"walkdir",
]

Expand Down Expand Up @@ -1322,95 +1310,6 @@ dependencies = [
"new_debug_unreachable",
]

[[package]]
name = "futures"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
dependencies = [
"futures-channel",
"futures-core",
"futures-executor",
"futures-io",
"futures-sink",
"futures-task",
"futures-util",
]

[[package]]
name = "futures-channel"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
dependencies = [
"futures-core",
"futures-sink",
]

[[package]]
name = "futures-core"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"

[[package]]
name = "futures-executor"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
dependencies = [
"futures-core",
"futures-task",
"futures-util",
]

[[package]]
name = "futures-io"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"

[[package]]
name = "futures-macro"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.104",
]

[[package]]
name = "futures-sink"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"

[[package]]
name = "futures-task"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"

[[package]]
name = "futures-util"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-macro",
"futures-sink",
"futures-task",
"memchr",
"pin-project-lite",
"pin-utils",
"slab",
]

[[package]]
name = "generate-copyright"
version = "0.1.0"
Expand Down Expand Up @@ -1848,12 +1747,6 @@ dependencies = [
"icu_properties",
]

[[package]]
name = "if_chain"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed"

[[package]]
name = "ignore"
version = "0.4.23"
Expand Down Expand Up @@ -1947,17 +1840,6 @@ dependencies = [
"unic-langid",
]

[[package]]
name = "io-uring"
version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013"
dependencies = [
"bitflags",
"cfg-if",
"libc",
]

[[package]]
name = "ipc-channel"
version = "0.19.0"
Expand Down Expand Up @@ -2409,7 +2291,7 @@ dependencies = [
"smallvec",
"tempfile",
"tikv-jemalloc-sys",
"ui_test",
"ui_test 0.29.2",
]

[[package]]
Expand Down Expand Up @@ -2868,12 +2750,6 @@ version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"

[[package]]
name = "pin-utils"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"

[[package]]
name = "pkg-config"
version = "0.3.32"
Expand Down Expand Up @@ -3773,7 +3649,7 @@ dependencies = [
"serde",
"serde_json",
"termcolor",
"termize 0.2.0",
"termize",
"tracing",
"windows 0.61.3",
]
Expand Down Expand Up @@ -4536,7 +4412,7 @@ dependencies = [
"rustc_serialize",
"rustc_span",
"rustc_target",
"termize 0.2.0",
"termize",
"tracing",
"windows 0.61.3",
]
Expand Down Expand Up @@ -5035,12 +4911,6 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"

[[package]]
name = "slab"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d"

[[package]]
name = "smallvec"
version = "1.15.1"
Expand All @@ -5067,6 +4937,17 @@ dependencies = [
"color-eyre",
]

[[package]]
name = "spanned"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c92d4b0c055fde758f086eb4a6e73410247df8a3837fd606d2caeeaf72aa566d"
dependencies = [
"anyhow",
"bstr",
"color-eyre",
]

[[package]]
name = "spdx-expression"
version = "0.5.2"
Expand Down Expand Up @@ -5305,16 +5186,6 @@ dependencies = [
"winapi-util",
]

[[package]]
name = "termize"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1706be6b564323ce7092f5f7e6b118a14c8ef7ed0e69c8c5329c914a9f101295"
dependencies = [
"libc",
"winapi",
]

[[package]]
name = "termize"
version = "0.2.0"
Expand Down Expand Up @@ -5480,21 +5351,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"

[[package]]
name = "tokio"
version = "1.46.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17"
dependencies = [
"backtrace",
"bytes",
"io-uring",
"libc",
"mio",
"pin-project-lite",
"slab",
]

[[package]]
name = "toml"
version = "0.5.11"
Expand Down Expand Up @@ -5726,7 +5582,33 @@ dependencies = [
"rustfix",
"serde",
"serde_json",
"spanned",
"spanned 0.3.0",
]

[[package]]
name = "ui_test"
version = "0.30.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b56a6897cc4bb6f8daf1939b0b39cd9645856997f46f4d0b3e3cb7122dfe9251"
dependencies = [
"annotate-snippets 0.11.5",
"anyhow",
"bstr",
"cargo-platform",
"cargo_metadata 0.18.1",
"color-eyre",
"colored",
"comma",
"crossbeam-channel",
"indicatif",
"levenshtein",
"prettydiff",
"regex",
"rustc_version",
"rustfix",
"serde",
"serde_json",
"spanned 0.4.1",
]

[[package]]
Expand Down
14 changes: 12 additions & 2 deletions src/tools/clippy/.github/workflows/feature_freeze.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
name: Feature freeze check

on:
pull_request:
pull_request_target:
types:
- opened
branches:
- master
paths:
- 'clippy_lints/src/declared_lints.rs'

jobs:
auto-comment:
runs-on: ubuntu-latest

permissions:
pull-requests: write

# Do not in any case add code that runs anything coming from the the content
# of the pull request, as malicious code would be able to access the private
# GitHub token.
steps:
- name: Check PR Changes
id: pr-changes
Expand All @@ -19,7 +29,7 @@ jobs:
run: |
# Use GitHub API to create a comment on the PR
PR_NUMBER=${{ github.event.pull_request.number }}
COMMENT="**Seems that you are trying to add a new lint!**\nWe are currently in a [feature freeze](https://doc.rust-lang.org/nightly/clippy/development/feature_freeze.html), so we are delaying all lint-adding PRs to August 1st and focusing on bugfixes.\nThanks a lot for your contribution, and sorry for the inconvenience.\nWith ❤ from the Clippy team"
COMMENT="**Seems that you are trying to add a new lint!**\nWe are currently in a [feature freeze](https://doc.rust-lang.org/nightly/clippy/development/feature_freeze.html), so we are delaying all lint-adding PRs to September 18 and focusing on bugfixes.\nThanks a lot for your contribution, and sorry for the inconvenience.\nWith ❤ from the Clippy team\n\n@rustbot note Feature-freeze\n@rustbot blocked\n@rustbot label +A-lint\n"
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
COMMENT_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments"
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL -d "{\"body\":\"$COMMENT\"}"
28 changes: 17 additions & 11 deletions src/tools/clippy/.github/workflows/lintcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,27 @@ jobs:
- name: Download JSON
uses: actions/download-artifact@v4

- name: Store PR number
run: echo ${{ github.event.pull_request.number }} > pr.txt

- name: Diff results
# GH's summery has a maximum size of 1024k:
# https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary
# That's why we first log to file and then to the summary and logs
# GH's summery has a maximum size of 1MiB:
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#step-isolation-and-limits
# We upload the full diff as an artifact in case it's truncated
run: |
./target/debug/lintcheck diff {base,head}/ci_crates_logs.json --truncate >> truncated_diff.md
head -c 1024000 truncated_diff.md >> $GITHUB_STEP_SUMMARY
cat truncated_diff.md
./target/debug/lintcheck diff {base,head}/ci_crates_logs.json >> full_diff.md
./target/debug/lintcheck diff {base,head}/ci_crates_logs.json --truncate | head -c 1M > $GITHUB_STEP_SUMMARY
./target/debug/lintcheck diff {base,head}/ci_crates_logs.json --write-summary summary.json > full_diff.md

- name: Upload full diff
uses: actions/upload-artifact@v4
with:
name: diff
if-no-files-found: ignore
name: full_diff
path: full_diff.md

- name: Upload summary
uses: actions/upload-artifact@v4
with:
name: summary
path: |
full_diff.md
truncated_diff.md
summary.json
pr.txt
Loading
Loading