Remove author requirement for cargo_common_metadata
This commit is contained in:
parent
86fb0e8266
commit
5102c9cc69
@ -20,11 +20,10 @@
|
||||
///
|
||||
/// **Example:**
|
||||
/// ```toml
|
||||
/// # This `Cargo.toml` is missing an authors field:
|
||||
/// # This `Cargo.toml` is missing a description field:
|
||||
/// [package]
|
||||
/// name = "clippy"
|
||||
/// version = "0.0.212"
|
||||
/// description = "A bunch of helpful lints to avoid common pitfalls in Rust"
|
||||
/// repository = "https://github.com/rust-lang/rust-clippy"
|
||||
/// readme = "README.md"
|
||||
/// license = "MIT OR Apache-2.0"
|
||||
@ -32,14 +31,13 @@
|
||||
/// categories = ["development-tools", "development-tools::cargo-plugins"]
|
||||
/// ```
|
||||
///
|
||||
/// Should include an authors field like:
|
||||
/// Should include a description field like:
|
||||
///
|
||||
/// ```toml
|
||||
/// # This `Cargo.toml` includes all common metadata
|
||||
/// [package]
|
||||
/// name = "clippy"
|
||||
/// version = "0.0.212"
|
||||
/// authors = ["Someone <someone@rust-lang.org>"]
|
||||
/// description = "A bunch of helpful lints to avoid common pitfalls in Rust"
|
||||
/// repository = "https://github.com/rust-lang/rust-clippy"
|
||||
/// readme = "README.md"
|
||||
@ -97,10 +95,6 @@ fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
|
||||
// only run the lint if publish is `None` (`publish = true` or skipped entirely)
|
||||
// or if the vector isn't empty (`publish = ["something"]`)
|
||||
if package.publish.as_ref().filter(|publish| publish.is_empty()).is_none() || self.ignore_publish {
|
||||
if is_empty_vec(&package.authors) {
|
||||
missing_warning(cx, &package, "package.authors");
|
||||
}
|
||||
|
||||
if is_empty_str(&package.description) {
|
||||
missing_warning(cx, &package, "package.description");
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
error: package `cargo_common_metadata` is missing `package.authors` metadata
|
||||
error: package `cargo_common_metadata` is missing `package.description` metadata
|
||||
|
|
||||
= note: `-D clippy::cargo-common-metadata` implied by `-D warnings`
|
||||
|
||||
error: package `cargo_common_metadata` is missing `package.description` metadata
|
||||
|
||||
error: package `cargo_common_metadata` is missing `either package.license or package.license_file` metadata
|
||||
|
||||
error: package `cargo_common_metadata` is missing `package.repository` metadata
|
||||
@ -14,5 +12,5 @@ error: package `cargo_common_metadata` is missing `package.keywords` metadata
|
||||
|
||||
error: package `cargo_common_metadata` is missing `package.categories` metadata
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
error: package `cargo_common_metadata` is missing `package.authors` metadata
|
||||
error: package `cargo_common_metadata` is missing `package.description` metadata
|
||||
|
|
||||
= note: `-D clippy::cargo-common-metadata` implied by `-D warnings`
|
||||
|
||||
error: package `cargo_common_metadata` is missing `package.description` metadata
|
||||
|
||||
error: package `cargo_common_metadata` is missing `either package.license or package.license_file` metadata
|
||||
|
||||
error: package `cargo_common_metadata` is missing `package.repository` metadata
|
||||
@ -14,5 +12,5 @@ error: package `cargo_common_metadata` is missing `package.keywords` metadata
|
||||
|
||||
error: package `cargo_common_metadata` is missing `package.categories` metadata
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
error: package `cargo_common_metadata` is missing `package.authors` metadata
|
||||
error: package `cargo_common_metadata` is missing `package.description` metadata
|
||||
|
|
||||
= note: `-D clippy::cargo-common-metadata` implied by `-D warnings`
|
||||
|
||||
error: package `cargo_common_metadata` is missing `package.description` metadata
|
||||
|
||||
error: package `cargo_common_metadata` is missing `either package.license or package.license_file` metadata
|
||||
|
||||
error: package `cargo_common_metadata` is missing `package.repository` metadata
|
||||
@ -14,5 +12,5 @@ error: package `cargo_common_metadata` is missing `package.keywords` metadata
|
||||
|
||||
error: package `cargo_common_metadata` is missing `package.categories` metadata
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
name = "cargo_common_metadata"
|
||||
version = "0.1.0"
|
||||
publish = false
|
||||
authors = ["Random person from the Internet <someone@someplace.org>"]
|
||||
description = "A test package for the cargo_common_metadata lint"
|
||||
repository = "https://github.com/someone/cargo_common_metadata"
|
||||
readme = "README.md"
|
||||
|
Loading…
Reference in New Issue
Block a user