mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-09-20 06:31:54 +00:00
Auto merge of #13225 - Jarcho:warnings, r=flip1995
Use `-D warnings` instead of `deny-warnings` feature. r? `@flip1995` changelog: none
This commit is contained in:
commit
9d9a0dcb64
28 changed files with 23 additions and 52 deletions
13
.github/workflows/clippy.yml
vendored
13
.github/workflows/clippy.yml
vendored
|
@ -25,6 +25,7 @@ env:
|
||||||
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
|
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
|
||||||
NO_FMT_TEST: 1
|
NO_FMT_TEST: 1
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
|
RUSTFLAGS: -D warnings
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
# For a given workflow, if we push to the same PR, cancel all previous builds on that PR.
|
# For a given workflow, if we push to the same PR, cancel all previous builds on that PR.
|
||||||
|
@ -47,25 +48,25 @@ jobs:
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --tests --features deny-warnings,internal
|
run: cargo build --tests --features internal
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cargo test --features deny-warnings,internal
|
run: cargo test --features internal
|
||||||
|
|
||||||
- name: Test clippy_lints
|
- name: Test clippy_lints
|
||||||
run: cargo test --features deny-warnings,internal
|
run: cargo test --features internal
|
||||||
working-directory: clippy_lints
|
working-directory: clippy_lints
|
||||||
|
|
||||||
- name: Test clippy_utils
|
- name: Test clippy_utils
|
||||||
run: cargo test --features deny-warnings
|
run: cargo test
|
||||||
working-directory: clippy_utils
|
working-directory: clippy_utils
|
||||||
|
|
||||||
- name: Test rustc_tools_util
|
- name: Test rustc_tools_util
|
||||||
run: cargo test --features deny-warnings
|
run: cargo test
|
||||||
working-directory: rustc_tools_util
|
working-directory: rustc_tools_util
|
||||||
|
|
||||||
- name: Test clippy_dev
|
- name: Test clippy_dev
|
||||||
run: cargo test --features deny-warnings
|
run: cargo test
|
||||||
working-directory: clippy_dev
|
working-directory: clippy_dev
|
||||||
|
|
||||||
- name: Test clippy-driver
|
- name: Test clippy-driver
|
||||||
|
|
17
.github/workflows/clippy_bors.yml
vendored
17
.github/workflows/clippy_bors.yml
vendored
|
@ -11,6 +11,7 @@ env:
|
||||||
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
|
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
|
||||||
NO_FMT_TEST: 1
|
NO_FMT_TEST: 1
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
|
RUSTFLAGS: -D warnings
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
|
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
|
||||||
|
@ -85,34 +86,34 @@ jobs:
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --tests --features deny-warnings,internal
|
run: cargo build --tests --features internal
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
if: matrix.host == 'x86_64-unknown-linux-gnu'
|
if: matrix.host == 'x86_64-unknown-linux-gnu'
|
||||||
run: cargo test --features deny-warnings,internal
|
run: cargo test --features internal
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
if: matrix.host != 'x86_64-unknown-linux-gnu'
|
if: matrix.host != 'x86_64-unknown-linux-gnu'
|
||||||
run: cargo test --features deny-warnings,internal -- --skip dogfood
|
run: cargo test --features internal -- --skip dogfood
|
||||||
|
|
||||||
- name: Test clippy_lints
|
- name: Test clippy_lints
|
||||||
run: cargo test --features deny-warnings,internal
|
run: cargo test --features internal
|
||||||
working-directory: clippy_lints
|
working-directory: clippy_lints
|
||||||
|
|
||||||
- name: Test clippy_utils
|
- name: Test clippy_utils
|
||||||
run: cargo test --features deny-warnings
|
run: cargo test
|
||||||
working-directory: clippy_utils
|
working-directory: clippy_utils
|
||||||
|
|
||||||
- name: Test clippy_config
|
- name: Test clippy_config
|
||||||
run: cargo test --features deny-warnings
|
run: cargo test
|
||||||
working-directory: clippy_config
|
working-directory: clippy_config
|
||||||
|
|
||||||
- name: Test rustc_tools_util
|
- name: Test rustc_tools_util
|
||||||
run: cargo test --features deny-warnings
|
run: cargo test
|
||||||
working-directory: rustc_tools_util
|
working-directory: rustc_tools_util
|
||||||
|
|
||||||
- name: Test clippy_dev
|
- name: Test clippy_dev
|
||||||
run: cargo test --features deny-warnings
|
run: cargo test
|
||||||
working-directory: clippy_dev
|
working-directory: clippy_dev
|
||||||
|
|
||||||
- name: Test clippy-driver
|
- name: Test clippy-driver
|
||||||
|
|
5
.github/workflows/clippy_dev.yml
vendored
5
.github/workflows/clippy_dev.yml
vendored
|
@ -16,6 +16,7 @@ on:
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
|
RUSTFLAGS: -D warnings
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clippy_dev:
|
clippy_dev:
|
||||||
|
@ -28,7 +29,7 @@ jobs:
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --features deny-warnings
|
run: cargo build
|
||||||
working-directory: clippy_dev
|
working-directory: clippy_dev
|
||||||
|
|
||||||
- name: Test update_lints
|
- name: Test update_lints
|
||||||
|
@ -38,6 +39,8 @@ jobs:
|
||||||
run: cargo dev fmt --check
|
run: cargo dev fmt --check
|
||||||
|
|
||||||
- name: Test cargo dev new lint
|
- name: Test cargo dev new lint
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: -A unused-imports
|
||||||
run: |
|
run: |
|
||||||
cargo dev new_lint --name new_early_pass --pass early
|
cargo dev new_lint --name new_early_pass --pass early
|
||||||
cargo dev new_lint --name new_late_pass --pass late
|
cargo dev new_lint --name new_late_pass --pass late
|
||||||
|
|
|
@ -51,7 +51,6 @@ tokio = { version = "1", features = ["io-util"] }
|
||||||
rustc_tools_util = "0.3.0"
|
rustc_tools_util = "0.3.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
deny-warnings = ["clippy_lints/deny-warnings"]
|
|
||||||
integration = ["tempfile"]
|
integration = ["tempfile"]
|
||||||
internal = ["clippy_lints/internal", "tempfile"]
|
internal = ["clippy_lints/internal", "tempfile"]
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,6 @@ toml = "0.7.3"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
walkdir = "2.3"
|
walkdir = "2.3"
|
||||||
|
|
||||||
[features]
|
|
||||||
deny-warnings = []
|
|
||||||
|
|
||||||
[package.metadata.rust-analyzer]
|
[package.metadata.rust-analyzer]
|
||||||
# This crate uses #[feature(rustc_private)]
|
# This crate uses #[feature(rustc_private)]
|
||||||
rustc_private = true
|
rustc_private = true
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#![feature(rustc_private, array_windows, let_chains)]
|
#![feature(rustc_private, array_windows, let_chains)]
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
#![warn(
|
#![warn(
|
||||||
trivial_casts,
|
trivial_casts,
|
||||||
trivial_numeric_casts,
|
trivial_numeric_casts,
|
||||||
|
|
|
@ -13,9 +13,6 @@ opener = "0.6"
|
||||||
shell-escape = "0.1"
|
shell-escape = "0.1"
|
||||||
walkdir = "2.3"
|
walkdir = "2.3"
|
||||||
|
|
||||||
[features]
|
|
||||||
deny-warnings = []
|
|
||||||
|
|
||||||
[package.metadata.rust-analyzer]
|
[package.metadata.rust-analyzer]
|
||||||
# This package uses #[feature(rustc_private)]
|
# This package uses #[feature(rustc_private)]
|
||||||
rustc_private = true
|
rustc_private = true
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
#![warn(
|
#![warn(
|
||||||
trivial_casts,
|
trivial_casts,
|
||||||
trivial_numeric_casts,
|
trivial_numeric_casts,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ url = "2.2"
|
||||||
walkdir = "2.3"
|
walkdir = "2.3"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
deny-warnings = ["clippy_config/deny-warnings", "clippy_utils/deny-warnings"]
|
|
||||||
# build clippy with internal lints enabled, off by default
|
# build clippy with internal lints enabled, off by default
|
||||||
internal = ["serde_json", "tempfile", "regex"]
|
internal = ["serde_json", "tempfile", "regex"]
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#![feature(stmt_expr_attributes)]
|
#![feature(stmt_expr_attributes)]
|
||||||
#![feature(unwrap_infallible)]
|
#![feature(unwrap_infallible)]
|
||||||
#![recursion_limit = "512"]
|
#![recursion_limit = "512"]
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
#![allow(
|
#![allow(
|
||||||
clippy::missing_docs_in_private_items,
|
clippy::missing_docs_in_private_items,
|
||||||
clippy::must_use_candidate,
|
clippy::must_use_candidate,
|
||||||
|
|
|
@ -12,9 +12,6 @@ rustc-semver = "1.1"
|
||||||
# FIXME(f16_f128): remove when no longer needed for parsing
|
# FIXME(f16_f128): remove when no longer needed for parsing
|
||||||
rustc_apfloat = "0.2.0"
|
rustc_apfloat = "0.2.0"
|
||||||
|
|
||||||
[features]
|
|
||||||
deny-warnings = ["clippy_config/deny-warnings"]
|
|
||||||
|
|
||||||
[package.metadata.rust-analyzer]
|
[package.metadata.rust-analyzer]
|
||||||
# This crate uses #[feature(rustc_private)]
|
# This crate uses #[feature(rustc_private)]
|
||||||
rustc_private = true
|
rustc_private = true
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#![feature(assert_matches)]
|
#![feature(assert_matches)]
|
||||||
#![feature(unwrap_infallible)]
|
#![feature(unwrap_infallible)]
|
||||||
#![recursion_limit = "512"]
|
#![recursion_limit = "512"]
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
#![allow(
|
#![allow(
|
||||||
clippy::missing_errors_doc,
|
clippy::missing_errors_doc,
|
||||||
clippy::missing_panics_doc,
|
clippy::missing_panics_doc,
|
||||||
|
|
|
@ -11,6 +11,3 @@ proc-macro = true
|
||||||
itertools = "0.12"
|
itertools = "0.12"
|
||||||
quote = "1.0.21"
|
quote = "1.0.21"
|
||||||
syn = "2.0"
|
syn = "2.0"
|
||||||
|
|
||||||
[features]
|
|
||||||
deny-warnings = []
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,3 @@ tar = "0.4"
|
||||||
toml = "0.7.3"
|
toml = "0.7.3"
|
||||||
ureq = { version = "2.2", features = ["json"] }
|
ureq = { version = "2.2", features = ["json"] }
|
||||||
walkdir = "2.3"
|
walkdir = "2.3"
|
||||||
|
|
||||||
[features]
|
|
||||||
deny-warnings = []
|
|
||||||
|
|
|
@ -10,6 +10,3 @@ categories = ["development-tools"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
[features]
|
|
||||||
deny-warnings = []
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
|
|
||||||
use std::str;
|
use std::str;
|
||||||
|
|
||||||
/// This macro creates the version string during compilation from the
|
/// This macro creates the version string during compilation from the
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#![allow(rustc::untranslatable_diagnostic)]
|
#![allow(rustc::untranslatable_diagnostic)]
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
// warn on rustc internal lints
|
// warn on rustc internal lints
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#![feature(is_sorted)]
|
#![feature(is_sorted)]
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
#![allow(unused_extern_crates)]
|
#![allow(unused_extern_crates)]
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
//!
|
//!
|
||||||
//! See [Eating your own dog food](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) for context
|
//! See [Eating your own dog food](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) for context
|
||||||
|
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
//! Clippy doesn't produce an ICE. Lint warnings are ignored by this test.
|
//! Clippy doesn't produce an ICE. Lint warnings are ignored by this test.
|
||||||
|
|
||||||
#![cfg(feature = "integration")]
|
#![cfg(feature = "integration")]
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
|
|
||||||
use std::ffi::OsStr;
|
use std::ffi::OsStr;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
#![allow(clippy::assertions_on_constants)]
|
#![allow(clippy::assertions_on_constants)]
|
||||||
#![feature(path_file_prefix)]
|
#![feature(path_file_prefix)]
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
#![allow(clippy::single_match_else)]
|
#![allow(clippy::single_match_else)]
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "path_dep"
|
name = "path_dep"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
primary_package_test = []
|
||||||
|
|
Loading…
Reference in a new issue