mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Auto merge of #12178 - weihanglo:dogfood-lints-table, r=epage
chore: dogfood Cargo `-Zlints` table feature
This commit is contained in:
commit
9f3b4883e8
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@ -66,9 +66,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: rustup update stable && rustup default stable
|
- run: rustup update stable && rustup default stable
|
||||||
- run: rustup component add clippy
|
- run: rustup component add clippy
|
||||||
# Only check cargo lib for now
|
- run: cargo clippy --workspace --all-targets --no-deps -- -D warnings
|
||||||
# TODO: check every members
|
|
||||||
- run: cargo clippy -p cargo --lib --no-deps -- -D warnings
|
|
||||||
|
|
||||||
stale-label:
|
stale-label:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -110,8 +108,6 @@ jobs:
|
|||||||
CARGO_PROFILE_TEST_DEBUG: 1
|
CARGO_PROFILE_TEST_DEBUG: 1
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
CARGO_PUBLIC_NETWORK_TESTS: 1
|
CARGO_PUBLIC_NETWORK_TESTS: 1
|
||||||
# Deny warnings on CI to avoid warnings getting into the codebase.
|
|
||||||
RUSTFLAGS: -D warnings
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
16
Cargo.lock
generated
16
Cargo.lock
generated
@ -252,7 +252,7 @@ dependencies = [
|
|||||||
"cargo-credential-libsecret",
|
"cargo-credential-libsecret",
|
||||||
"cargo-credential-macos-keychain",
|
"cargo-credential-macos-keychain",
|
||||||
"cargo-credential-wincred",
|
"cargo-credential-wincred",
|
||||||
"cargo-platform 0.1.6",
|
"cargo-platform 0.1.7",
|
||||||
"cargo-test-macro",
|
"cargo-test-macro",
|
||||||
"cargo-test-support",
|
"cargo-test-support",
|
||||||
"cargo-util",
|
"cargo-util",
|
||||||
@ -321,7 +321,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cargo-credential"
|
name = "cargo-credential"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"libc",
|
"libc",
|
||||||
@ -344,7 +344,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cargo-credential-libsecret"
|
name = "cargo-credential-libsecret"
|
||||||
version = "0.3.3"
|
version = "0.3.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"cargo-credential",
|
"cargo-credential",
|
||||||
@ -353,7 +353,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cargo-credential-macos-keychain"
|
name = "cargo-credential-macos-keychain"
|
||||||
version = "0.3.2"
|
version = "0.3.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo-credential",
|
"cargo-credential",
|
||||||
"security-framework",
|
"security-framework",
|
||||||
@ -361,7 +361,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cargo-credential-wincred"
|
name = "cargo-credential-wincred"
|
||||||
version = "0.3.2"
|
version = "0.3.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo-credential",
|
"cargo-credential",
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
@ -378,7 +378,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cargo-platform"
|
name = "cargo-platform"
|
||||||
version = "0.1.6"
|
version = "0.1.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
@ -600,7 +600,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crates-io"
|
name = "crates-io"
|
||||||
version = "0.39.1"
|
version = "0.39.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curl",
|
"curl",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
@ -1904,7 +1904,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "home"
|
name = "home"
|
||||||
version = "0.5.8"
|
version = "0.5.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
17
Cargo.toml
17
Cargo.toml
@ -106,6 +106,20 @@ varisat = "0.2.2"
|
|||||||
walkdir = "2.4.0"
|
walkdir = "2.4.0"
|
||||||
windows-sys = "0.48"
|
windows-sys = "0.48"
|
||||||
|
|
||||||
|
[workspace.lints.rust]
|
||||||
|
rust_2018_idioms = "warn" # TODO: could this be removed?
|
||||||
|
|
||||||
|
[workspace.lints.rustdoc]
|
||||||
|
private_intra_doc_links = "allow"
|
||||||
|
|
||||||
|
[workspace.lints.clippy]
|
||||||
|
all = { level = "allow", priority = -1 }
|
||||||
|
dbg_macro = "warn"
|
||||||
|
disallowed_methods = "warn"
|
||||||
|
print_stderr = "warn"
|
||||||
|
print_stdout = "warn"
|
||||||
|
self_named_module_files = "warn"
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "cargo"
|
name = "cargo"
|
||||||
version = "0.77.0"
|
version = "0.77.0"
|
||||||
@ -234,3 +248,6 @@ vendored-openssl = ["openssl/vendored"]
|
|||||||
vendored-libgit2 = ["libgit2-sys/vendored"]
|
vendored-libgit2 = ["libgit2-sys/vendored"]
|
||||||
# This is primarily used by rust-lang/rust distributing cargo the executable.
|
# This is primarily used by rust-lang/rust distributing cargo the executable.
|
||||||
all-static = ['vendored-openssl', 'curl/static-curl', 'curl/force-system-lib-on-osx']
|
all-static = ['vendored-openssl', 'curl/static-curl', 'curl/force-system-lib-on-osx']
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -32,3 +32,6 @@ harness = false
|
|||||||
[[bench]]
|
[[bench]]
|
||||||
name = "global_cache_tracker"
|
name = "global_cache_tracker"
|
||||||
harness = false
|
harness = false
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![allow(clippy::disallowed_methods)]
|
||||||
|
|
||||||
use cargo::Config;
|
use cargo::Config;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
@ -12,3 +12,6 @@ cargo_metadata.workspace = true
|
|||||||
flate2.workspace = true
|
flate2.workspace = true
|
||||||
tar.workspace = true
|
tar.workspace = true
|
||||||
toml.workspace = true
|
toml.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
//! Use the `-f` flag to allow it to overwrite existing captures.
|
//! Use the `-f` flag to allow it to overwrite existing captures.
|
||||||
//! The workspace will be saved in a `.tgz` file in the `../workspaces` directory.
|
//! The workspace will be saved in a `.tgz` file in the `../workspaces` directory.
|
||||||
|
|
||||||
|
#![allow(clippy::disallowed_methods)]
|
||||||
|
#![allow(clippy::print_stderr)]
|
||||||
|
|
||||||
use flate2::{Compression, GzBuilder};
|
use flate2::{Compression, GzBuilder};
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cargo-platform"
|
name = "cargo-platform"
|
||||||
version = "0.1.6"
|
version = "0.1.7"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
rust-version = "1.70.0" # MSRV:3
|
rust-version = "1.70.0" # MSRV:3
|
||||||
@ -11,3 +11,6 @@ description = "Cargo's representation of a target platform."
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
//! This example demonstrates how to filter a Platform based on the current
|
//! This example demonstrates how to filter a Platform based on the current
|
||||||
//! host target.
|
//! host target.
|
||||||
|
|
||||||
|
#![allow(clippy::print_stdout)]
|
||||||
|
|
||||||
use cargo_platform::{Cfg, Platform};
|
use cargo_platform::{Cfg, Platform};
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
@ -12,3 +12,6 @@ publish = false
|
|||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -33,3 +33,6 @@ walkdir.workspace = true
|
|||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem"] }
|
windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem"] }
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![allow(clippy::disallowed_methods)]
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!(
|
println!(
|
||||||
"cargo:rustc-env=NATIVE_ARCH={}",
|
"cargo:rustc-env=NATIVE_ARCH={}",
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
//!
|
//!
|
||||||
//! See <https://rust-lang.github.io/cargo/contrib/> for a guide on writing tests.
|
//! See <https://rust-lang.github.io/cargo/contrib/> for a guide on writing tests.
|
||||||
|
|
||||||
#![allow(clippy::all)]
|
#![allow(clippy::disallowed_methods)]
|
||||||
|
#![allow(clippy::print_stderr)]
|
||||||
|
#![allow(clippy::print_stdout)]
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::ffi::OsStr;
|
use std::ffi::OsStr;
|
||||||
|
@ -28,3 +28,6 @@ core-foundation.workspace = true
|
|||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
miow.workspace = true
|
miow.workspace = true
|
||||||
windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_Console"] }
|
windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_Console"] }
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
//! Miscellaneous support code used by Cargo.
|
//! Miscellaneous support code used by Cargo.
|
||||||
|
|
||||||
|
#![allow(clippy::disallowed_methods)]
|
||||||
|
|
||||||
pub use self::read2::read2;
|
pub use self::read2::read2;
|
||||||
pub use du::du;
|
pub use du::du;
|
||||||
pub use process_builder::ProcessBuilder;
|
pub use process_builder::ProcessBuilder;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "crates-io"
|
name = "crates-io"
|
||||||
version = "0.39.1"
|
version = "0.39.2"
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
@ -20,3 +20,6 @@ serde = { workspace = true, features = ["derive"] }
|
|||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
thiserror.workspace = true
|
thiserror.workspace = true
|
||||||
url.workspace = true
|
url.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#![allow(clippy::all)]
|
|
||||||
|
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "home"
|
name = "home"
|
||||||
version = "0.5.8"
|
version = "0.5.9"
|
||||||
authors = ["Brian Anderson <andersrb@gmail.com>"]
|
authors = ["Brian Anderson <andersrb@gmail.com>"]
|
||||||
rust-version = "1.70.0" # MSRV:3
|
rust-version = "1.70.0" # MSRV:3
|
||||||
documentation = "https://docs.rs/home"
|
documentation = "https://docs.rs/home"
|
||||||
@ -18,3 +18,6 @@ description = "Shared definitions of home directories."
|
|||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_UI_Shell"] }
|
windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_UI_Shell"] }
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
//!
|
//!
|
||||||
//! [discussion]: https://github.com/rust-lang/rust/pull/46799#issuecomment-361156935
|
//! [discussion]: https://github.com/rust-lang/rust/pull/46799#issuecomment-361156935
|
||||||
|
|
||||||
#![deny(rust_2018_idioms)]
|
#![allow(clippy::disallowed_methods)]
|
||||||
|
|
||||||
pub mod env;
|
pub mod env;
|
||||||
|
|
||||||
|
@ -17,3 +17,6 @@ url.workspace = true
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
pretty_assertions.workspace = true
|
pretty_assertions.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![allow(clippy::print_stderr)]
|
||||||
|
|
||||||
use anyhow::{bail, format_err, Context, Error};
|
use anyhow::{bail, format_err, Context, Error};
|
||||||
use mdman::{Format, ManMap};
|
use mdman::{Format, ManMap};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
//! Use the MDMAN_BLESS environment variable to automatically update the
|
//! Use the MDMAN_BLESS environment variable to automatically update the
|
||||||
//! expected output.
|
//! expected output.
|
||||||
|
|
||||||
|
#![allow(clippy::disallowed_methods)]
|
||||||
|
|
||||||
use mdman::{Format, ManMap};
|
use mdman::{Format, ManMap};
|
||||||
use pretty_assertions::assert_eq;
|
use pretty_assertions::assert_eq;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
@ -10,3 +10,6 @@ cargo.workspace = true
|
|||||||
cargo-util.workspace = true
|
cargo-util.workspace = true
|
||||||
proptest.workspace = true
|
proptest.workspace = true
|
||||||
varisat.workspace = true
|
varisat.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#![allow(clippy::all)]
|
#![allow(clippy::print_stderr)]
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::cmp::PartialEq;
|
use std::cmp::PartialEq;
|
||||||
|
@ -10,3 +10,6 @@ publish = false
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tempfile.workspace = true
|
tempfile.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
//! - `dont-deny`: By default tests have a `#![deny(warnings)]`. This option
|
//! - `dont-deny`: By default tests have a `#![deny(warnings)]`. This option
|
||||||
//! avoids this attribute. Note that `#![allow(unused)]` is always added.
|
//! avoids this attribute. Note that `#![allow(unused)]` is always added.
|
||||||
|
|
||||||
|
#![allow(clippy::print_stderr)]
|
||||||
|
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
@ -6,3 +6,6 @@ edition.workspace = true
|
|||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
//! For more, read their doc comments.
|
//! For more, read their doc comments.
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
|
#![allow(clippy::print_stderr)]
|
||||||
|
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
@ -14,3 +14,6 @@ git2.workspace = true
|
|||||||
semver.workspace = true
|
semver.workspace = true
|
||||||
tracing-subscriber.workspace = true
|
tracing-subscriber.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -7,3 +7,6 @@ publish = false
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
toml_edit.workspace = true
|
toml_edit.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
//! Probably autofix them in the future.
|
//! Probably autofix them in the future.
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
|
#![allow(clippy::print_stderr)]
|
||||||
|
|
||||||
use std::fmt::Write as _;
|
use std::fmt::Write as _;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::process;
|
use std::process;
|
||||||
|
@ -11,3 +11,6 @@ description = "A Cargo credential process that stores tokens in a 1password vaul
|
|||||||
cargo-credential.workspace = true
|
cargo-credential.workspace = true
|
||||||
serde = { workspace = true, features = ["derive"] }
|
serde = { workspace = true, features = ["derive"] }
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
//! Cargo registry 1password credential process.
|
//! Cargo registry 1password credential process.
|
||||||
|
|
||||||
|
#![allow(clippy::disallowed_methods)]
|
||||||
|
#![allow(clippy::print_stderr)]
|
||||||
|
|
||||||
use cargo_credential::{
|
use cargo_credential::{
|
||||||
Action, CacheControl, Credential, CredentialResponse, Error, RegistryInfo, Secret,
|
Action, CacheControl, Credential, CredentialResponse, Error, RegistryInfo, Secret,
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cargo-credential-libsecret"
|
name = "cargo-credential-libsecret"
|
||||||
version = "0.3.3"
|
version = "0.3.4"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
@ -11,3 +11,6 @@ description = "A Cargo credential process that stores tokens with GNOME libsecre
|
|||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
cargo-credential.workspace = true
|
cargo-credential.workspace = true
|
||||||
libloading.workspace = true
|
libloading.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cargo-credential-macos-keychain"
|
name = "cargo-credential-macos-keychain"
|
||||||
version = "0.3.2"
|
version = "0.3.3"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
@ -12,3 +12,6 @@ cargo-credential.workspace = true
|
|||||||
|
|
||||||
[target.'cfg(target_os = "macos")'.dependencies]
|
[target.'cfg(target_os = "macos")'.dependencies]
|
||||||
security-framework.workspace = true
|
security-framework.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
//! Cargo registry macos keychain credential process.
|
//! Cargo registry macos keychain credential process.
|
||||||
|
|
||||||
|
#![allow(clippy::print_stderr)]
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
mod macos {
|
mod macos {
|
||||||
use cargo_credential::{
|
use cargo_credential::{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cargo-credential-wincred"
|
name = "cargo-credential-wincred"
|
||||||
version = "0.3.2"
|
version = "0.3.3"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
@ -13,3 +13,6 @@ cargo-credential.workspace = true
|
|||||||
[target.'cfg(windows)'.dependencies.windows-sys]
|
[target.'cfg(windows)'.dependencies.windows-sys]
|
||||||
features = ["Win32_Foundation", "Win32_Security_Credentials"]
|
features = ["Win32_Foundation", "Win32_Security_Credentials"]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cargo-credential"
|
name = "cargo-credential"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
rust-version = "1.70.0" # MSRV:3
|
rust-version = "1.70.0" # MSRV:3
|
||||||
@ -20,3 +20,6 @@ windows-sys = { workspace = true, features = ["Win32_System_Console", "Win32_Fou
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
snapbox = { workspace = true, features = ["examples"] }
|
snapbox = { workspace = true, features = ["examples"] }
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
//! Provider used for testing redirection of stdout.
|
//! Provider used for testing redirection of stdout.
|
||||||
|
|
||||||
|
#![allow(clippy::print_stderr)]
|
||||||
|
#![allow(clippy::print_stdout)]
|
||||||
|
|
||||||
use cargo_credential::{Action, Credential, CredentialResponse, Error, RegistryInfo};
|
use cargo_credential::{Action, Credential, CredentialResponse, Error, RegistryInfo};
|
||||||
|
|
||||||
struct MyCredential;
|
struct MyCredential;
|
||||||
|
@ -37,6 +37,9 @@
|
|||||||
#![doc = include_str!("../examples/file-provider.rs")]
|
#![doc = include_str!("../examples/file-provider.rs")]
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
|
#![allow(clippy::print_stderr)]
|
||||||
|
#![allow(clippy::print_stdout)]
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::{fmt::Display, io};
|
use std::{fmt::Display, io};
|
||||||
use time::OffsetDateTime;
|
use time::OffsetDateTime;
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#![warn(rust_2018_idioms)] // while we're getting used to 2018
|
#![allow(clippy::self_named_module_files)] // false positive in `commands/build.rs`
|
||||||
#![allow(clippy::all)]
|
|
||||||
#![warn(clippy::disallowed_methods)]
|
|
||||||
|
|
||||||
use cargo::util::network::http::http_handle;
|
use cargo::util::network::http::http_handle;
|
||||||
use cargo::util::network::http::needs_custom_http_transport;
|
use cargo::util::network::http::needs_custom_http_transport;
|
||||||
|
@ -129,20 +129,6 @@
|
|||||||
//! [The Cargo Book]: https://doc.rust-lang.org/cargo/
|
//! [The Cargo Book]: https://doc.rust-lang.org/cargo/
|
||||||
//! [Cargo Contributor Guide]: https://doc.crates.io/contrib/
|
//! [Cargo Contributor Guide]: https://doc.crates.io/contrib/
|
||||||
|
|
||||||
// TODO: consider removing these lint attributes when `-Zlints` hits stable.
|
|
||||||
// For various reasons, some idioms are still allow'ed, but we would like to
|
|
||||||
// test and enforce them.
|
|
||||||
#![warn(rust_2018_idioms)]
|
|
||||||
// Due to some of the default clippy lints being somewhat subjective and not
|
|
||||||
// necessarily an improvement, we prefer to not use them at this time.
|
|
||||||
#![allow(clippy::all)]
|
|
||||||
#![warn(clippy::disallowed_methods)]
|
|
||||||
#![warn(clippy::self_named_module_files)]
|
|
||||||
#![warn(clippy::print_stdout)]
|
|
||||||
#![warn(clippy::print_stderr)]
|
|
||||||
#![warn(clippy::dbg_macro)]
|
|
||||||
#![allow(rustdoc::private_intra_doc_links)]
|
|
||||||
|
|
||||||
use crate::core::shell::Verbosity::Verbose;
|
use crate::core::shell::Verbosity::Verbose;
|
||||||
use crate::core::Shell;
|
use crate::core::Shell;
|
||||||
use anyhow::Error;
|
use anyhow::Error;
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#![allow(unknown_lints)]
|
|
||||||
|
|
||||||
use anyhow::Error;
|
use anyhow::Error;
|
||||||
use curl::easy::Easy;
|
use curl::easy::Easy;
|
||||||
use std::fmt::{self, Write};
|
use std::fmt::{self, Write};
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
//! `CARGO_RUN_BUILD_STD_TESTS` env var to be set to actually run these tests.
|
//! `CARGO_RUN_BUILD_STD_TESTS` env var to be set to actually run these tests.
|
||||||
//! Otherwise the tests are skipped.
|
//! Otherwise the tests are skipped.
|
||||||
|
|
||||||
|
#![allow(clippy::disallowed_methods)]
|
||||||
|
|
||||||
use cargo_test_support::*;
|
use cargo_test_support::*;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// See src/cargo/lib.rs for notes on these lint settings.
|
#![allow(clippy::disallowed_methods)]
|
||||||
#![warn(rust_2018_idioms)]
|
#![allow(clippy::print_stderr)]
|
||||||
#![allow(clippy::all)]
|
#![allow(clippy::print_stdout)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate cargo_test_macro;
|
extern crate cargo_test_macro;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user