Commit Graph

204 Commits

Author SHA1 Message Date
Timo e8185ec091 Extend implicit_clone to handle to_string calls (#14177)
Put another way, merge `string_to_string` into `implicit_clone`, as
suggested here:
https://github.com/rust-lang/rust-clippy/issues/14173#issuecomment-2645846915

Note: [I
wrote](https://github.com/rust-lang/rust-clippy/commit/b8913894a13431bea99400dc9f53a1fd9f41a6c6)
this comment:
https://github.com/rust-lang/rust-clippy/blob/6cdb7f68c39a2458c6b8f6dc63da4123a6a5af89/clippy_lints/src/methods/implicit_clone.rs#L43-L45

Here is the context for why I wrote it:
https://github.com/rust-lang/rust-clippy/pull/7978#discussion_r769128853

Regardless, it's probably time for the comment to go away. Extending
`implicit_clone` to handle `to_string` calls yields many hits within
Clippy's codebase.

changelog: extend `implicit_clone` to handle `to_string` calls
2025-08-02 11:41:00 +00:00
Alejandra González e29e3539f0 Cleanup feature_freeze workflow (#15231)
Delete the step and the conditional that checks `changes != '[]'`
(`github.event.pull_request.changed_file`s returns the number of files
changed in the pull request - not the list of changed files)
Escape newlines in the comment body safely
Use Bearer instead of deprecated token

changelog: none
2025-07-10 19:41:23 +00:00
alexey semenyuk 823ee8af4e Cleanup feature_freeze 2025-07-10 23:12:02 +05:00
Philipp Krones 2ed97eb466 Create summary comment for lintcheck runs (#14816)
Previously https://github.com/rust-lang/triagebot/pull/1985

After a lintcheck run a comment will be created in the PR thread with an
overview of the changes, example here
https://github.com/Alexendoo/rust-clippy/pull/18#issuecomment-2880441316
(plus the normal GHA debugging experience)

It will only comment if there are some changes, if there's already an
existing comment it will be updated for each run

Similar to
https://github.com/rust-lang/team/blob/master/.github/workflows/dry-run.yml

The PR number is supplied by the lintcheck run, so technically someone
could forge it to be annoying and edit the summaries in other threads,
but that is pretty low impact and easy to deal with. There is a
`pull_requests` field on the event but as @Kobzol [pointed out to
me](https://github.com/rust-lang/triagebot/pull/1985#issuecomment-2869157116)
it's not populated for PRs from forks

r? @flip1995

changelog: none
2025-07-09 08:29:50 +00:00
Samuel Tardieu e32c65d714 Activate feature freeze automated notice 2025-07-01 09:08:46 +02:00
Philipp Krones 8050e591b6 Update book and templates with feature freeze (#14456)
This PR announces the feature freeze period talked about in
https://github.com/rust-lang/rust-clippy/issues/14364

1. Add the page to the book
2. Modify the in-Github templates.
3. The third commit (to be squashed into the first) rolls the date
mentioned 6 weeks (so, starting on May 9th and ending on August 20th).
This gives us a comfortable buffer to make choices for this period.

We have a pending discussion on the #14364. So having some more time to
make choices is very nice. I'm also preparing a Github action for
detecting new lints and posting a comment about the feature freeze
(being worked on in another branch)

Something I'd like comment on is the date formatting. I'm not sure if
"May 9th to the first of August" is the correct way of writing this
information in a book 😅.

changelog: Announce the feature freeze from May 9th to the first of
August
2025-06-26 16:45:13 +00:00
Philipp Krones b88d162d2a Add link to the feature freeze tracking issue to the book 2025-06-26 18:40:51 +02:00
blyxyas d369dc2998 Add GHA script for feature freeze 2025-05-28 14:03:11 +02:00
Samuel Moelius 6cea9ccf0f Replace string_to_string with char_lit_as_u8 in driver.sh 2025-05-19 19:29:06 -04:00
Alex Macleod 2dbaf1c7be Create summary comment for lintcheck runs 2025-05-16 01:07:56 +00:00
Alex Macleod e21b936770 Read PR body from event in clippy_changelog action 2025-05-05 15:30:56 +00:00
Jason Newcomb 5b4b463d49 Move internal lints to their own crate 2025-04-12 17:53:36 -04:00
blyxyas 27d00a53fc Fix typos in review 2025-04-07 02:03:03 +02:00
Samuel Tardieu d81396b7d0 Do not build tokio-rustls in the CI for the time being
A discrepancy between the `cmake` version available on the runners and
the one required by the `aws-lc-sys` dependency prevents the crate from
buiding.
2025-04-01 19:34:15 +02:00
Samuel Tardieu 88c46eaf04 Install cmake to restore lintcheck run 2025-04-01 16:11:54 +02:00
y21 8f3a0db64f don't hardcode repository owner in changelog CI 2025-03-30 00:51:13 +01:00
Philipp Krones e9aed8764e set concurrency for the deploy job (#14448)
In the current GitHub Actions CI/CD setup, the `deploy` job is not
triggered when a PR is enqueued in the merge queue but only when it is
merged. Since concurrency is not configured for this job, deployments
may fail for later PRs if multiple PRs are merged in quick succession.
(e.g. the deployment for [this
commit](https://github.com/rust-lang/rust-clippy/commit/c4187145180effa06c87295e44bdf135128866fe)
was successful, but the deployment for [this
commit](https://github.com/rust-lang/rust-clippy/commit/0a141ab7b882387528eac4140df67e9938e5d257)
that was pushed to `main` immediately afterward failed. (edit: the
latter deployment seems to be rerun))

changelog: none

r? flip1995
2025-03-23 12:15:07 +00:00
lapla-cogito d8dff61275 set concurrency for the deploy job 2025-03-23 21:08:41 +09:00
Philipp Krones d5a6688092 Use a lintcheck specific Clippy configuration file in the CI (#14233)
By default, lintcheck will use the `clippy.toml` file found at the
toplevel of the repository (`CARGO_MANIFEST_DIR`). This file is meant
for configuration of Clippy applied to Clippy sources.

This creates a new `lintcheck/ci-config/clippy.toml` file which is used
by the CI when running lintcheck. By default this uses the default
Clippy configuration.

changelog: none
2025-03-22 12:23:32 +00:00
blyxyas f71d14e10c Include temporary feature freeze in templates 2025-03-21 16:02:22 +01:00
Philipp Krones a5bc316445 add macos-latest as a CI target (#14342)
r? flip1995

changelog: none
2025-03-11 13:35:56 +00:00
Samuel Tardieu 414136239b Use the latest nightly rust to run linkcheck 2025-03-04 08:50:26 +01:00
lapla-cogito d63d56aeb0 add macos-latest as a CI target 2025-03-03 22:31:36 +09:00
Samuel Tardieu e1d6f1fc5c Use a lintcheck specific Clippy configuration file in the CI
By default, lintcheck will use the `clippy.toml` file found at the
toplevel of the repository (`CARGO_MANIFEST_DIR`). This file is meant
for configuration of Clippy applied to Clippy sources.

This creates a new `lintcheck/ci-config/clippy.toml` file which is used
by the CI when running lintcheck. By default this uses the default
Clippy configuration.
2025-02-27 22:27:00 +01:00
Philipp Krones 145d5adf04 Merge remote-tracking branch 'upstream/master' into rustup 2025-01-28 19:14:45 +01:00
Philipp Krones 25509e7135 exclude some directories from Lintcheck CI (#14084)
Currently, the CI pipeline triggers `Lintcheck` for all PRs. However,
this check takes significant amount of time and seems unnecessary for
some certain directories that are frequently updated.

r? flip1995

changelog: none
2025-01-28 10:29:58 +00:00
lapla-cogito 75b39d00ab exclude specific directories from Lintcheck 2025-01-28 19:13:25 +09:00
Kalle Wachsmuth 25a77cf4f4 remove clippy::double_neg 2025-01-26 12:15:12 +01:00
lapla-cogito a8551362f2 set default changelog messages to fail the changelog CI 2025-01-24 11:47:21 +09:00
Samuel Tardieu 6c367cb83f Update mdbook to 0.4.43 2025-01-13 16:55:42 +01:00
Catherine Flores 64250a3360 Also deploy index.html file on release (#13971)
I noticed that this was missing bf482928 while doing the release. No
harm done, as it was updated on the next push to master.

changelog: none
2025-01-10 21:10:08 +00:00
Samuel Tardieu 1bdee5b6b3 CI: rerun the changelog check on PR synchronization
Rerunning the PR checks when a PR is synchronized (new commits added, or
force-pushed) seems to remove the changelog checks from the UI while
keeping the PR mergeable from the maintainer's interface.

This PR reruns the cheap changelog check when a PR is synchronized.
2025-01-10 18:17:55 +01:00
Samuel Tardieu 7639e82939 CI: check the presence of the changelog line in every pull request
Checking it only in the merge queue leads to deferred failures once the
decision to merge has been taken already.
2025-01-10 17:23:10 +01:00
Philipp Krones d0a74af979 Merge commit '19e305bb57a7595f2a8d81f521c0dd8bf854e739' into clippy-subtree-update 2025-01-09 18:57:00 +01:00
Philipp Krones 55c8550221 Also deploy index.html file on release 2025-01-09 18:24:02 +01:00
Samuel Tardieu 12d3137560 CI: be compatible with both Rustup pre-1.28.0 and 1.28.0
`rustup show active-toolchain` will no longer install the default
toolchain starting from Rustup 1.28.0, and `rustup toolchain install`
without extra arguments is not supported in Rustup pre-1.28.0.
2025-01-04 23:12:32 +01:00
blyxyas 7ac151508e Make CI a little bit safer 2025-01-03 00:44:35 +01:00
Philipp Krones 6ced8c33c0 Merge commit 'f712eb5cdccd121d0569af12f20e6a0fabe4364d' into clippy-subtree-update 2024-11-07 22:37:01 +01:00
Philipp Krones a28c44fc96 Merge pull request #13587 from Kobzol/ci-remove-bors
Switch CI from bors to merge queue
2024-11-07 17:42:31 +00:00
Jakub Beránek 843ef1b1f0 Remove path filter
It would cause issues with the required jobs, and it is probably useless anyway, the vast majority of PRs seem to change Rust source files.
2024-11-07 18:32:06 +01:00
Jakub Beránek 9ebe68d8c3 Add conclusion job to PR CI 2024-11-07 18:30:28 +01:00
Hamir Mahal d63322f0f4 fix: usage of a deprecated Node.js version 2024-10-28 09:04:16 -07:00
Jakub Beránek 3338611c1b Switch CI from bors to merge queue 2024-10-25 10:28:45 +02:00
Philipp Krones fea5e77da1 Merge commit 'a109190d7060236e655fc75533373fa274ec5343' into clippy-subtree-update 2024-10-18 13:44:06 +02:00
bors 6f1def79dd Auto merge of #13269 - GuillaumeGomez:rewrite-lints-page, r=Alexendoo
Rewrite lints page

This PR has multiple goals:

* Make lints page to work without needing a web server by removing the json file.
* Prepare the field to also make the page work with JS (not done in this PR but should be straightforward).
* Remove angular dependency.

r? `@Alexendoo`

changelog: make lint page work without web server
2024-10-11 14:18:54 +00:00
Philipp Krones 277c4e4baf Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into clippy-subtree-update 2024-10-03 16:32:51 +02:00
Guillaume Gomez d52b9aa564 Move theme handling JS into its own file to make theme being applied before first rendering 2024-10-03 11:12:19 +02:00
Philipp Krones b61fcbee76 Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into clippy-subtree-update 2024-09-24 11:58:04 +02:00
Trivikram Kamat f7b940ae7c Update actions/setup-node to v4 2024-09-23 22:08:54 -07:00
Guillaume Gomez b522e7a944 Generate lint list in HTML directly instead of JS 2024-09-22 22:30:44 +02:00