Skip to content

Commit

Permalink
Rollup merge of #80239 - flip1995:clippyup, r=Manishearth
Browse files Browse the repository at this point in the history
Update Clippy

Biweekly Clippy update.

r? ``@Manishearth``
  • Loading branch information
Dylan-DPC authored Dec 21, 2020
2 parents 328e89c + 520761a commit ce93f5a
Show file tree
Hide file tree
Showing 116 changed files with 3,201 additions and 1,049 deletions.
34 changes: 5 additions & 29 deletions src/tools/clippy/.github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,11 @@ jobs:
with:
github_token: "${{ secrets.github_token }}"

- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal

- name: Checkout
uses: actions/checkout@v2.3.3

- name: Run cargo update
run: cargo update

- name: Cache cargo dir
uses: actions/cache@v2
with:
path: ~/.cargo
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu
- name: Master Toolchain Setup
run: bash setup-toolchain.sh
- name: Install toolchain
run: rustup show active-toolchain

# Run
- name: Set LD_LIBRARY_PATH (Linux)
Expand All @@ -66,13 +48,13 @@ jobs:
echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV
- name: Build
run: cargo build --features deny-warnings
run: cargo build --features deny-warnings,internal-lints

- name: Test
run: cargo test --features deny-warnings
run: cargo test --features deny-warnings,internal-lints

- name: Test clippy_lints
run: cargo test --features deny-warnings
run: cargo test --features deny-warnings,internal-lints
working-directory: clippy_lints

- name: Test rustc_tools_util
Expand All @@ -98,9 +80,3 @@ jobs:
cargo dev new_lint --name new_late_pass --pass late
cargo check
git reset --hard HEAD
# Cleanup
- name: Run cargo-cache --autoclean
run: |
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo cache
97 changes: 13 additions & 84 deletions src/tools/clippy/.github/workflows/clippy_bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.github_token }}"

- name: Checkout
uses: actions/checkout@v2.3.3
with:
Expand Down Expand Up @@ -84,31 +85,11 @@ jobs:
sudo apt-get install gcc-multilib libssl-dev:i386 libgit2-dev:i386
if: matrix.host == 'i686-unknown-linux-gnu'

- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: nightly
target: ${{ matrix.host }}
profile: minimal

- name: Checkout
uses: actions/checkout@v2.3.3

- name: Run cargo update
run: cargo update

- name: Cache cargo dir
uses: actions/cache@v2
with:
path: ~/.cargo
key: ${{ runner.os }}-${{ matrix.host }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.host }}
- name: Master Toolchain Setup
run: bash setup-toolchain.sh
env:
HOST_TOOLCHAIN: ${{ matrix.host }}
- name: Install toolchain
run: rustup show active-toolchain

# Run
- name: Set LD_LIBRARY_PATH (Linux)
Expand All @@ -128,13 +109,13 @@ jobs:
SYSROOT=$(rustc --print sysroot)
echo "$SYSROOT/bin" >> $GITHUB_PATH
- name: Build with internal lints
- name: Build
run: cargo build --features deny-warnings,internal-lints

- name: Test with internal lints
- name: Test
run: cargo test --features deny-warnings,internal-lints

- name: Test clippy_lints with internal lints
- name: Test clippy_lints
run: cargo test --features deny-warnings,internal-lints
working-directory: clippy_lints

Expand All @@ -155,12 +136,6 @@ jobs:
env:
OS: ${{ runner.os }}

# Cleanup
- name: Run cargo-cache --autoclean
run: |
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo cache
integration_build:
needs: changelog
runs-on: ubuntu-latest
Expand All @@ -171,29 +146,11 @@ jobs:
with:
github_token: "${{ secrets.github_token }}"

- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal

- name: Checkout
uses: actions/checkout@v2.3.3

- name: Run cargo update
run: cargo update

- name: Cache cargo dir
uses: actions/cache@v2
with:
path: ~/.cargo
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu
- name: Master Toolchain Setup
run: bash setup-toolchain.sh
- name: Install toolchain
run: rustup show active-toolchain

# Run
- name: Build Integration Test
Expand All @@ -214,11 +171,6 @@ jobs:
name: target
path: target

# Cleanup
- name: Run cargo-cache --autoclean
run: |
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo cache
integration:
needs: integration_build
strategy:
Expand Down Expand Up @@ -252,29 +204,11 @@ jobs:
with:
github_token: "${{ secrets.github_token }}"

- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal

- name: Checkout
uses: actions/checkout@v2.3.3

- name: Run cargo update
run: cargo update

- name: Cache cargo dir
uses: actions/cache@v2
with:
path: ~/.cargo
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu
- name: Master Toolchain Setup
run: bash setup-toolchain.sh
- name: Install toolchain
run: rustup show active-toolchain

# Download
- name: Download target dir
Expand All @@ -288,16 +222,11 @@ jobs:

# Run
- name: Test ${{ matrix.integration }}
run: $CARGO_TARGET_DIR/debug/integration
run: |
RUSTUP_TOOLCHAIN="$(rustup show active-toolchain | grep -o -E "nightly-[0-9]{4}-[0-9]{2}-[0-9]{2}")" \
$CARGO_TARGET_DIR/debug/integration
env:
INTEGRATION: ${{ matrix.integration }}
RUSTUP_TOOLCHAIN: master

# Cleanup
- name: Run cargo-cache --autoclean
run: |
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo cache

# These jobs doesn't actually test anything, but they're only used to tell
# bors the build completed, as there is no practical way to detect when a
Expand Down
10 changes: 7 additions & 3 deletions src/tools/clippy/.github/workflows/clippy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,20 @@ jobs:

steps:
# Setup
- name: Checkout
uses: actions/checkout@v2.3.3

- name: remove toolchain file
run: rm rust-toolchain

- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
components: rustfmt

- name: Checkout
uses: actions/checkout@v2.3.3
default: true

# Run
- name: Build
Expand Down
3 changes: 3 additions & 0 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2006,6 +2006,7 @@ Released 2018-09-13
[`possible_missing_comma`]: https://rust-lang.github.io/rust-clippy/master/index.html#possible_missing_comma
[`precedence`]: https://rust-lang.github.io/rust-clippy/master/index.html#precedence
[`print_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#print_literal
[`print_stderr`]: https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
[`print_stdout`]: https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
[`print_with_newline`]: https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline
[`println_empty_string`]: https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string
Expand All @@ -2024,6 +2025,7 @@ Released 2018-09-13
[`redundant_closure`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
[`redundant_closure_call`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
[`redundant_closure_for_method_calls`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
[`redundant_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else
[`redundant_field_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
[`redundant_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern
[`redundant_pattern_matching`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
Expand Down Expand Up @@ -2169,5 +2171,6 @@ Released 2018-09-13
[`zero_divided_by_zero`]: https://rust-lang.github.io/rust-clippy/master/index.html#zero_divided_by_zero
[`zero_prefixed_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal
[`zero_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr
[`zero_sized_map_values`]: https://rust-lang.github.io/rust-clippy/master/index.html#zero_sized_map_values
[`zst_offset`]: https://rust-lang.github.io/rust-clippy/master/index.html#zst_offset
<!-- end autogenerated links to lint list -->
Loading

0 comments on commit ce93f5a

Please sign in to comment.