Skip to content

Commit 8050e59

Browse files
authored
Update book and templates with feature freeze (#14456)
This PR announces the feature freeze period talked about in #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
2 parents 40554ef + b88d162 commit 8050e59

File tree

7 files changed

+95
-1
lines changed

7 files changed

+95
-1
lines changed

.github/ISSUE_TEMPLATE/new_lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: New lint suggestion
2-
description: Suggest a new Clippy lint.
2+
description: |
3+
Suggest a new Clippy lint (currently not accepting new lints)
4+
Check out the Clippy book for more information about the feature freeze.
35
labels: ["A-lint"]
46
body:
57
- type: markdown

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ order to get feedback.
3232

3333
Delete this line and everything above before opening your PR.
3434

35+
Note that we are currently not taking in new PRs that add new lints. We are in a
36+
feature freeze. Check out the book for more information. If you open a
37+
feature-adding pull request, its review will be delayed.
38+
3539
---
3640

3741
*Please write a short comment explaining your change (or "none" for internal only changes)*

.github/workflows/feature_freeze.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Feature freeze check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'clippy_lints/src/declared_lints.rs'
7+
8+
jobs:
9+
auto-comment:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check PR Changes
14+
id: pr-changes
15+
run: echo "::set-output name=changes::${{ toJson(github.event.pull_request.changed_files) }}"
16+
17+
- name: Create Comment
18+
if: steps.pr-changes.outputs.changes != '[]'
19+
run: |
20+
# Use GitHub API to create a comment on the PR
21+
PR_NUMBER=${{ github.event.pull_request.number }}
22+
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"
23+
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
24+
COMMENT_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments"
25+
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL -d "{\"body\":\"$COMMENT\"}"

book/src/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Clippy
22

3+
[### IMPORTANT NOTE FOR CONTRIBUTORS ================](development/feature_freeze.md)
4+
5+
----
6+
37
[![License: MIT OR Apache-2.0](https://img.shields.io/crates/l/clippy.svg)](https://github.com/rust-lang/rust-clippy#license)
48

59
A collection of lints to catch common mistakes and improve your

book/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- [GitLab CI](continuous_integration/gitlab.md)
1414
- [Travis CI](continuous_integration/travis.md)
1515
- [Development](development/README.md)
16+
- [IMPORTANT: FEATURE FREEZE](development/feature_freeze.md)
1617
- [Basics](development/basics.md)
1718
- [Adding Lints](development/adding_lints.md)
1819
- [Defining Lints](development/defining_lints.md)

book/src/development/adding_lints.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Adding a new lint
22

3+
[### IMPORTANT NOTE FOR CONTRIBUTORS ================](feature_freeze.md)
4+
5+
36
You are probably here because you want to add a new lint to Clippy. If this is
47
the first time you're contributing to Clippy, this document guides you through
58
creating an example lint from scratch.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# IMPORTANT: FEATURE FREEZE
2+
3+
This is a temporary notice.
4+
5+
From the 26th of June until the 18th of September we will perform a feature freeze. Only bugfix PRs will be reviewed
6+
except already open ones. Every feature-adding PR opened in between those dates will be moved into a
7+
milestone to be reviewed separately at another time.
8+
9+
We do this because of the long backlog of bugs that need to be addressed
10+
in order to continue being the state-of-the-art linter that Clippy has become known for being.
11+
12+
## For contributors
13+
14+
If you are a contributor or are planning to become one, **please do not open a lint-adding PR**, we have lots of open
15+
bugs of all levels of difficulty that you can address instead!
16+
17+
We currently have about 800 lints, each one posing a maintainability challenge that needs to account to every possible
18+
use case of the whole ecosystem. Bugs are natural in every software, but the Clippy team considers that Clippy needs a
19+
refinement period.
20+
21+
If you open a PR at this time, we will not review it but push it into a milestone until the refinement period ends,
22+
adding additional load into our reviewing schedules.
23+
24+
## I want to help, what can I do
25+
26+
Thanks a lot to everyone who wants to help Clippy become better software in this feature freeze period!
27+
If you'd like to help, making a bugfix, making sure that it works, and opening a PR is a great step!
28+
29+
To find things to fix, go to the [tracking issue][tracking_issue], find an issue that you like, go there and claim that
30+
issue with `@rustbot claim`.
31+
32+
As a general metric and always taking into account your skill and knowledge level, you can use this guide:
33+
34+
- 🟥 [ICEs][search_ice], these are compiler errors that causes Clippy to panic and crash. Usually involves high-level
35+
debugging, sometimes interacting directly with the upstream compiler. Difficult to fix but a great challenge that
36+
improves a lot developer workflows!
37+
38+
- 🟧 [Suggestion causes bug][sugg_causes_bug], Clippy suggested code that changed logic in some silent way.
39+
Unacceptable, as this may have disastrous consequences. Easier to fix than ICEs
40+
41+
- 🟨 [Suggestion causes error][sugg_causes_error], Clippy suggested code snippet that caused a compiler error
42+
when applied. We need to make sure that Clippy doesn't suggest using a variable twice at the same time or similar
43+
easy-to-happen occurrences.
44+
45+
- 🟩 [False positives][false_positive], a lint should not have fired, the easiest of them all, as this is "just"
46+
identifying the root of a false positive and making an exception for those cases.
47+
48+
Note that false negatives do not have priority unless the case is very clear, as they are a feature-request in a
49+
trench coat.
50+
51+
[search_ice]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc+state%3Aopen+label%3A%22I-ICE%22
52+
[sugg_causes_bug]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc%20state%3Aopen%20label%3AI-suggestion-causes-bug
53+
[sugg_causes_error]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc%20state%3Aopen%20label%3AI-suggestion-causes-error%20
54+
[false_positive]: https://github.com/rust-lang/rust-clippy/issues?q=sort%3Aupdated-desc%20state%3Aopen%20label%3AI-false-positive
55+
[tracking_issue]: https://github.com/rust-lang/rust-clippy/issues/15086

0 commit comments

Comments
 (0)