Skip to content

Commit

Permalink
Retire stable-rust clippy for still buggy redundant_clone (#1661)
Browse files Browse the repository at this point in the history
* Retire stable-rust clippy for buggy redundant_clone

* Remove unused scripts/cargo-clippy-stable.sh

* Remove clippy-stable from .mergify.yml
  • Loading branch information
ryoqun authored Jun 10, 2024
1 parent 5263c9d commit cd6825f
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 68 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,6 @@ env:
RUSTC_WRAPPER: "sccache"

jobs:
clippy-stable:
strategy:
matrix:
os:
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- uses: mozilla-actions/[email protected]
with:
version: "v0.8.1"

- shell: bash
run: .github/scripts/cargo-clippy-before-script.sh ${{ runner.os }}

- shell: bash
run: |
source ci/rust-version.sh stable
rustup component add clippy --toolchain "$rust_stable"
scripts/cargo-clippy-stable.sh
clippy-nightly:
strategy:
matrix:
Expand Down
10 changes: 3 additions & 7 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,9 @@ pull_request_rules:
- status-success=build & deploy docs
- or:
- -files~=(\.rs|Cargo\.toml|Cargo\.lock|\.github/scripts/cargo-clippy-before-script\.sh|\.github/workflows/cargo\.yml)$
- and:
- or:
- check-success=clippy-stable (macos-latest)
- check-success=clippy-stable (macos-latest-large)
- or:
- check-success=clippy-nightly (macos-latest)
- check-success=clippy-nightly (macos-latest-large)
- or:
- check-success=clippy-nightly (macos-latest)
- check-success=clippy-nightly (macos-latest-large)
- or:
- -files~=(\.rs|Cargo\.toml|Cargo\.lock|cargo-build-bpf|cargo-test-bpf|cargo-build-sbf|cargo-test-sbf|ci/downstream-projects/run-spl\.sh|\.github/workflows/downstream-project-spl\.yml)$
- and:
Expand Down
1 change: 0 additions & 1 deletion programs/sbf/tests/programs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![cfg(any(feature = "sbf_c", feature = "sbf_rust"))]
#![allow(clippy::clone_on_copy)]
#![allow(clippy::needless_range_loop)]
#![allow(clippy::redundant_clone)]
#![allow(clippy::needless_borrow)]
#![allow(clippy::cmp_owned)]
#![allow(clippy::match_like_matches_macro)]
Expand Down
3 changes: 1 addition & 2 deletions scripts/cargo-clippy-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ source "$here/../ci/rust-version.sh" nightly
--deny=clippy::default_trait_access \
--deny=clippy::arithmetic_side_effects \
--deny=clippy::manual_let_else \
--deny=clippy::used_underscore_binding \
--allow=clippy::redundant_clone
--deny=clippy::used_underscore_binding
31 changes: 0 additions & 31 deletions scripts/cargo-clippy-stable.sh

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/cargo-clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@ set -o errexit

here="$(dirname "$0")"

# stable
"$here/cargo-clippy-stable.sh"

# nightly
"$here/cargo-clippy-nightly.sh"
1 change: 0 additions & 1 deletion sdk/src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,6 @@ pub mod tests {
}

#[test]
#[allow(clippy::redundant_clone)]
fn test_account_shared_data_all_fields() {
let key = Pubkey::new_unique();
let key2 = Pubkey::new_unique();
Expand Down

0 comments on commit cd6825f

Please sign in to comment.