3 Sometimes it is necessary to backport changes to the beta release of Clippy.
4 Backports in Clippy are rare and should be approved by the Clippy team. For
5 example, a backport is done, if a crucial ICE was fixed or a lint is broken to a
6 point, that it has to be disabled, before landing on stable.
8 Backports are done to the `beta` release of Clippy. Backports to stable Clippy
9 releases basically don't exist, since this would require a Rust point release,
10 which is almost never justifiable for a Clippy fix.
13 ## Backport the changes
15 Backports are done on the beta branch of the Clippy repository.
18 # Assuming the current directory corresponds to the Clippy repository
20 $ git checkout -b backport
21 $ git cherry-pick <SHA> # `<SHA>` is the commit hash of the commit, that should be backported
22 $ git push origin backport
25 After this, you can open a PR to the `beta` branch of the Clippy repository.
28 ## Update Clippy in the Rust Repository
30 This step must be done, **after** the PR of the previous step was merged.
32 After the backport landed in the Clippy repository, also the Clippy version on
33 the Rust `beta` branch has to be updated.
36 # Assuming the current directory corresponds to the Rust repository
38 $ git checkout -b clippy_backport
39 $ pushd src/tools/clippy
43 $ git add src/tools/clippy
44 ยง git commit -m "Update Clippy"
45 $ git push origin clippy_backport
48 After this you can open a PR to the `beta` branch of the Rust repository. In
49 this PR you should tag the Clippy team member, that agreed to the backport or
50 the `@rust-lang/clippy` team. Make sure to add `[beta]` to the title of the PR.