From e0c05a2bb3dfb54bca5d239658fd2a69c8443b1f Mon Sep 17 00:00:00 2001 From: blyxyas Date: Fri, 21 Mar 2025 15:41:23 +0100 Subject: [PATCH 1/8] Include temporary feature freeze in book --- book/src/README.md | 4 +++ book/src/SUMMARY.md | 1 + book/src/development/adding_lints.md | 3 ++ book/src/development/feature_freeze.md | 50 ++++++++++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 book/src/development/feature_freeze.md diff --git a/book/src/README.md b/book/src/README.md index 5d2c3972b060..db73b49ecc24 100644 --- a/book/src/README.md +++ b/book/src/README.md @@ -1,5 +1,9 @@ # Clippy +[### IMPORTANT NOTE FOR CONTRIBUTORS ================](development/feature_freeze.md) + +---- + [![License: MIT OR Apache-2.0](https://img.shields.io/crates/l/clippy.svg)](https://github.com/rust-lang/rust-clippy#license) A collection of lints to catch common mistakes and improve your diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 19328fdd3cd4..e36694fe646f 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -13,6 +13,7 @@ - [GitLab CI](continuous_integration/gitlab.md) - [Travis CI](continuous_integration/travis.md) - [Development](development/README.md) + - [IMPORTANT: FEATURE FREEZE](development/feature_freeze.md) - [Basics](development/basics.md) - [Adding Lints](development/adding_lints.md) - [Defining Lints](development/defining_lints.md) diff --git a/book/src/development/adding_lints.md b/book/src/development/adding_lints.md index 0b9010f01071..57911f655e7b 100644 --- a/book/src/development/adding_lints.md +++ b/book/src/development/adding_lints.md @@ -1,5 +1,8 @@ # Adding a new lint +[### IMPORTANT NOTE FOR CONTRIBUTORS ================](feature_freeze.md) + + You are probably here because you want to add a new lint to Clippy. If this is the first time you're contributing to Clippy, this document guides you through creating an example lint from scratch. diff --git a/book/src/development/feature_freeze.md b/book/src/development/feature_freeze.md new file mode 100644 index 000000000000..afe83c1bc6a8 --- /dev/null +++ b/book/src/development/feature_freeze.md @@ -0,0 +1,50 @@ +# IMPORTANT: FEATURE FREEZE + +This is a temporary notice. + +From March 28, 2025 to June 20, 2025 we will perform a feature freeze. Only bugfix PRs will be reviewed with the +exception of already open ones. Every feature-adding PR open in between those dates will be moved into a milestone +to be reviewed separately at another time. + +We do this because of the long backlog of bugs that need to be addressed +in order to contiue being the state of the art linter that Clippy has become known for being. + +## For contributors + +If you are a contributor or are planning to become one, **please do not open a lint-adding PR**, we have lots of open bugs +of all levels of difficulty that you can address instead! + +We currently have about 800 lints, each one posing a maintainability challenge that needs to account to every possible +usecase of the whole ecosystem. Bugs are natural in every software, but the Clippy team considers that Clippy needs a +refinement period. + +If you open a PR at this time, we will not review it but push it into a milestone until the refinement period ends, +adding additional load into our reviewing schedules. + +## I want to help, what can I do + +Thanks a lot to everyone who wants to help Clippy become better software in this feature freeze period! +If you'd like to help, making a bugfix, making sure that it works, and opening a PR is a great step! + +As a general metric and always taking into account your skill and knowledge level, you can use this guide: + +- 🟥 [ICEs][search_ice], these are compiler errors that causes Clippy to panic and crash. Usually involves high-level debugging, +sometimes interacting directly with the upstream compiler. Difficult to fix but a great challenge that improves +a lot developer workflows! + +- 🟧 [Suggestion causes bug][sugg_causes_bug], Clippy suggested code that changed logic in some silent way. Unacceptable, as this may have +disastreous consequences. Easier to fix than ICEs + +- 🟨 [Suggestion causes error][sugg_causes_error], Clippy suggested code snippet that caused a compiler error when applied. +We need to make sure that Clippy doesn't suggest using a variable twice at the same time or similar +easy-to-happen occurrences. + +- 🟩 [False positives][false_positive], a lint should not have fired, the easiest of them all, as this is "just" identifying the root of a +the false positive and making an exception for those cases. + +Note that false negatives do not have priority unless the case is very clear, as they are a feature-request in a trench coat. + +[search_ice]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc+state%3Aopen+label%3A%22I-ICE%22 +[sugg_causes_bug]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc%20state%3Aopen%20label%3AI-suggestion-causes-bug +[sugg_causes_error]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc%20state%3Aopen%20label%3AI-suggestion-causes-error%20 +[false_positive]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc%20state%3Aopen%20label%3AI-false-positive From f71d14e10ca9d87230c4a845e69976451ae0227f Mon Sep 17 00:00:00 2001 From: blyxyas Date: Fri, 21 Mar 2025 16:02:22 +0100 Subject: [PATCH 2/8] Include temporary feature freeze in templates --- .github/ISSUE_TEMPLATE/new_lint.yml | 4 +++- .github/PULL_REQUEST_TEMPLATE.md | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/new_lint.yml b/.github/ISSUE_TEMPLATE/new_lint.yml index b49493edce1b..464740640e0c 100644 --- a/.github/ISSUE_TEMPLATE/new_lint.yml +++ b/.github/ISSUE_TEMPLATE/new_lint.yml @@ -1,5 +1,7 @@ name: New lint suggestion -description: Suggest a new Clippy lint. +description: | + Suggest a new Clippy lint (currently not accepting new lints) + Check out the Clippy book for more information about the feature freeze. labels: ["A-lint"] body: - type: markdown diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9e49f60892d2..2d9babfa0de2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -32,6 +32,10 @@ order to get feedback. Delete this line and everything above before opening your PR. +Note taht we are currently not taking in new PRs that add new lints. We are in a +feature freeze. Check out the book for more information. If you open a +feature-adding pull request, its review will be delayed. + --- *Please write a short comment explaining your change (or "none" for internal only changes)* From ca3177c45884535618543c915247180c1c00b6ff Mon Sep 17 00:00:00 2001 From: blyxyas Date: Mon, 24 Mar 2025 00:51:56 +0100 Subject: [PATCH 3/8] Move back date 6 weeks --- book/src/development/feature_freeze.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/development/feature_freeze.md b/book/src/development/feature_freeze.md index afe83c1bc6a8..f173633f6c02 100644 --- a/book/src/development/feature_freeze.md +++ b/book/src/development/feature_freeze.md @@ -2,7 +2,7 @@ This is a temporary notice. -From March 28, 2025 to June 20, 2025 we will perform a feature freeze. Only bugfix PRs will be reviewed with the +From May 9th, 2025 until the 1st of August, 2025 we will perform a feature freeze. Only bugfix PRs will be reviewed with the exception of already open ones. Every feature-adding PR open in between those dates will be moved into a milestone to be reviewed separately at another time. From dd8d9232c206fc3d7d35c1cfb6df4d95b243dfec Mon Sep 17 00:00:00 2001 From: blyxyas Date: Mon, 7 Apr 2025 01:56:45 +0200 Subject: [PATCH 4/8] Fix remark CI issues --- book/src/development/feature_freeze.md | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/book/src/development/feature_freeze.md b/book/src/development/feature_freeze.md index f173633f6c02..d7e5a34301f2 100644 --- a/book/src/development/feature_freeze.md +++ b/book/src/development/feature_freeze.md @@ -2,17 +2,17 @@ This is a temporary notice. -From May 9th, 2025 until the 1st of August, 2025 we will perform a feature freeze. Only bugfix PRs will be reviewed with the -exception of already open ones. Every feature-adding PR open in between those dates will be moved into a milestone -to be reviewed separately at another time. +From May 9th, 2025 until the 1st of August, 2025 we will perform a feature freeze. Only bugfix PRs will be reviewed +with the exception of already open ones. Every feature-adding PR open in between those dates will be moved into a +milestone to be reviewed separately at another time. We do this because of the long backlog of bugs that need to be addressed in order to contiue being the state of the art linter that Clippy has become known for being. ## For contributors -If you are a contributor or are planning to become one, **please do not open a lint-adding PR**, we have lots of open bugs -of all levels of difficulty that you can address instead! +If you are a contributor or are planning to become one, **please do not open a lint-adding PR**, we have lots of open +bugs of all levels of difficulty that you can address instead! We currently have about 800 lints, each one posing a maintainability challenge that needs to account to every possible usecase of the whole ecosystem. Bugs are natural in every software, but the Clippy team considers that Clippy needs a @@ -28,19 +28,19 @@ If you'd like to help, making a bugfix, making sure that it works, and opening a As a general metric and always taking into account your skill and knowledge level, you can use this guide: -- 🟥 [ICEs][search_ice], these are compiler errors that causes Clippy to panic and crash. Usually involves high-level debugging, -sometimes interacting directly with the upstream compiler. Difficult to fix but a great challenge that improves -a lot developer workflows! +- 🟥 [ICEs][search_ice], these are compiler errors that causes Clippy to panic and crash. Usually involves high-level +debugging, sometimes interacting directly with the upstream compiler. Difficult to fix but a great challenge that +improves a lot developer workflows! -- 🟧 [Suggestion causes bug][sugg_causes_bug], Clippy suggested code that changed logic in some silent way. Unacceptable, as this may have -disastreous consequences. Easier to fix than ICEs +- 🟧 [Suggestion causes bug][sugg_causes_bug], Clippy suggested code that changed logic in some silent way. +Unacceptable, as this may have disastreous consequences. Easier to fix than ICEs -- 🟨 [Suggestion causes error][sugg_causes_error], Clippy suggested code snippet that caused a compiler error when applied. -We need to make sure that Clippy doesn't suggest using a variable twice at the same time or similar +- 🟨 [Suggestion causes error][sugg_causes_error], Clippy suggested code snippet that caused a compiler error +when applied. We need to make sure that Clippy doesn't suggest using a variable twice at the same time or similar easy-to-happen occurrences. -- 🟩 [False positives][false_positive], a lint should not have fired, the easiest of them all, as this is "just" identifying the root of a -the false positive and making an exception for those cases. +- 🟩 [False positives][false_positive], a lint should not have fired, the easiest of them all, as this is "just" +identifying the root of a the false positive and making an exception for those cases. Note that false negatives do not have priority unless the case is very clear, as they are a feature-request in a trench coat. From 27d00a53fc17de29511e501f07d5e491417fce05 Mon Sep 17 00:00:00 2001 From: blyxyas Date: Mon, 7 Apr 2025 01:58:56 +0200 Subject: [PATCH 5/8] Fix typos in review --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- book/src/development/feature_freeze.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2d9babfa0de2..83bfd8e9c686 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -32,7 +32,7 @@ order to get feedback. Delete this line and everything above before opening your PR. -Note taht we are currently not taking in new PRs that add new lints. We are in a +Note that we are currently not taking in new PRs that add new lints. We are in a feature freeze. Check out the book for more information. If you open a feature-adding pull request, its review will be delayed. diff --git a/book/src/development/feature_freeze.md b/book/src/development/feature_freeze.md index d7e5a34301f2..ccdef8860d78 100644 --- a/book/src/development/feature_freeze.md +++ b/book/src/development/feature_freeze.md @@ -3,7 +3,7 @@ This is a temporary notice. From May 9th, 2025 until the 1st of August, 2025 we will perform a feature freeze. Only bugfix PRs will be reviewed -with the exception of already open ones. Every feature-adding PR open in between those dates will be moved into a +with the exception of already open ones. Every feature-adding PR opened in between those dates will be moved into a milestone to be reviewed separately at another time. We do this because of the long backlog of bugs that need to be addressed @@ -42,7 +42,8 @@ easy-to-happen occurrences. - 🟩 [False positives][false_positive], a lint should not have fired, the easiest of them all, as this is "just" identifying the root of a the false positive and making an exception for those cases. -Note that false negatives do not have priority unless the case is very clear, as they are a feature-request in a trench coat. +Note that false negatives do not have priority unless the case is very clear, as they are a feature-request in a +trench coat. [search_ice]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc+state%3Aopen+label%3A%22I-ICE%22 [sugg_causes_bug]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc%20state%3Aopen%20label%3AI-suggestion-causes-bug From d369dc2998e3f6b92dce967838905c7d0e34c865 Mon Sep 17 00:00:00 2001 From: blyxyas Date: Wed, 28 May 2025 14:03:11 +0200 Subject: [PATCH 6/8] Add GHA script for feature freeze --- .github/workflows/feature-freeze.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/feature-freeze.yml diff --git a/.github/workflows/feature-freeze.yml b/.github/workflows/feature-freeze.yml new file mode 100644 index 000000000000..1b3a2f4ca281 --- /dev/null +++ b/.github/workflows/feature-freeze.yml @@ -0,0 +1,25 @@ +name: Feature freeze check + +on: + pull_request: + paths: + - 'clippy_lints/src/declared_lints.rs' + +jobs: + auto-comment: + runs-on: ubuntu-latest + + steps: + - name: Check PR Changes + id: pr-changes + run: echo "::set-output name=changes::${{ toJson(github.event.pull_request.changed_files) }}" + + - name: Create Comment + if: steps.pr-changes.outputs.changes != '[]' + 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" + 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\"}" \ No newline at end of file From 6f0fae374806b49749263a3102c7ff5ec35d2008 Mon Sep 17 00:00:00 2001 From: blyxyas Date: Wed, 28 May 2025 14:05:19 +0200 Subject: [PATCH 7/8] Minor fixes and date correction to book page --- book/src/development/feature_freeze.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/book/src/development/feature_freeze.md b/book/src/development/feature_freeze.md index ccdef8860d78..f522be2fbd1b 100644 --- a/book/src/development/feature_freeze.md +++ b/book/src/development/feature_freeze.md @@ -2,12 +2,12 @@ This is a temporary notice. -From May 9th, 2025 until the 1st of August, 2025 we will perform a feature freeze. Only bugfix PRs will be reviewed -with the exception of already open ones. Every feature-adding PR opened in between those dates will be moved into a +From the 26th of June until the 18th of September we will perform a feature freeze. Only bugfix PRs will be reviewed +except already open ones. Every feature-adding PR opened in between those dates will be moved into a milestone to be reviewed separately at another time. We do this because of the long backlog of bugs that need to be addressed -in order to contiue being the state of the art linter that Clippy has become known for being. +in order to continue being the state-of-the-art linter that Clippy has become known for being. ## For contributors @@ -15,7 +15,7 @@ If you are a contributor or are planning to become one, **please do not open a l bugs of all levels of difficulty that you can address instead! We currently have about 800 lints, each one posing a maintainability challenge that needs to account to every possible -usecase of the whole ecosystem. Bugs are natural in every software, but the Clippy team considers that Clippy needs a +use case of the whole ecosystem. Bugs are natural in every software, but the Clippy team considers that Clippy needs a refinement period. If you open a PR at this time, we will not review it but push it into a milestone until the refinement period ends, @@ -33,14 +33,14 @@ debugging, sometimes interacting directly with the upstream compiler. Difficult improves a lot developer workflows! - 🟧 [Suggestion causes bug][sugg_causes_bug], Clippy suggested code that changed logic in some silent way. -Unacceptable, as this may have disastreous consequences. Easier to fix than ICEs +Unacceptable, as this may have disastrous consequences. Easier to fix than ICEs - 🟨 [Suggestion causes error][sugg_causes_error], Clippy suggested code snippet that caused a compiler error when applied. We need to make sure that Clippy doesn't suggest using a variable twice at the same time or similar easy-to-happen occurrences. - 🟩 [False positives][false_positive], a lint should not have fired, the easiest of them all, as this is "just" -identifying the root of a the false positive and making an exception for those cases. +identifying the root of a false positive and making an exception for those cases. Note that false negatives do not have priority unless the case is very clear, as they are a feature-request in a trench coat. From b88d162d2afd3f65d90b84f8bad1793858ecfe8c Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Thu, 26 Jun 2025 18:40:51 +0200 Subject: [PATCH 8/8] Add link to the feature freeze tracking issue to the book --- .github/workflows/{feature-freeze.yml => feature_freeze.yml} | 2 +- book/src/development/feature_freeze.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) rename .github/workflows/{feature-freeze.yml => feature_freeze.yml} (96%) diff --git a/.github/workflows/feature-freeze.yml b/.github/workflows/feature_freeze.yml similarity index 96% rename from .github/workflows/feature-freeze.yml rename to .github/workflows/feature_freeze.yml index 1b3a2f4ca281..a5f8d4bc145c 100644 --- a/.github/workflows/feature-freeze.yml +++ b/.github/workflows/feature_freeze.yml @@ -22,4 +22,4 @@ jobs: 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" 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\"}" \ No newline at end of file + curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL -d "{\"body\":\"$COMMENT\"}" diff --git a/book/src/development/feature_freeze.md b/book/src/development/feature_freeze.md index f522be2fbd1b..260cb136cc07 100644 --- a/book/src/development/feature_freeze.md +++ b/book/src/development/feature_freeze.md @@ -26,6 +26,9 @@ adding additional load into our reviewing schedules. Thanks a lot to everyone who wants to help Clippy become better software in this feature freeze period! If you'd like to help, making a bugfix, making sure that it works, and opening a PR is a great step! +To find things to fix, go to the [tracking issue][tracking_issue], find an issue that you like, go there and claim that +issue with `@rustbot claim`. + As a general metric and always taking into account your skill and knowledge level, you can use this guide: - 🟥 [ICEs][search_ice], these are compiler errors that causes Clippy to panic and crash. Usually involves high-level @@ -49,3 +52,4 @@ trench coat. [sugg_causes_bug]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc%20state%3Aopen%20label%3AI-suggestion-causes-bug [sugg_causes_error]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc%20state%3Aopen%20label%3AI-suggestion-causes-error%20 [false_positive]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc%20state%3Aopen%20label%3AI-false-positive +[tracking_issue]: https://github.com/rust-lang/rust-clippy/issues/15086