Address review feedback
This commit is contained in:
parent
d68408f4ad
commit
94bc0a1c78
@ -12,7 +12,7 @@ opener = "0.5"
|
||||
regex = "1.5"
|
||||
shell-escape = "0.1"
|
||||
walkdir = "2.3"
|
||||
cargo_metadata = "0.12"
|
||||
cargo_metadata = "0.14"
|
||||
|
||||
[features]
|
||||
deny-warnings = []
|
||||
|
@ -141,7 +141,7 @@ fn get_stabilisation_version() -> String {
|
||||
}
|
||||
}
|
||||
|
||||
String::from("<TODO set version(see doc/adding_lints.md)")
|
||||
String::from("<TODO set version(see doc/adding_lints.md)>")
|
||||
}
|
||||
|
||||
fn get_test_file_contents(lint_name: &str, header_commands: Option<&str>) -> String {
|
||||
|
@ -318,19 +318,11 @@ declare_clippy_lint! {
|
||||
|
||||
declare_clippy_lint! {
|
||||
/// ### What it does
|
||||
/// Checks for invalid `clippy::version` attributes
|
||||
/// Checks for invalid `clippy::version` attributes.
|
||||
///
|
||||
/// ```txt
|
||||
/// +-------------------------------+
|
||||
/// | Valid values are: |
|
||||
/// | * "pre 1.29.0" |
|
||||
/// | * any valid semantic version |
|
||||
/// +-------------------------------+
|
||||
/// \
|
||||
/// \ (^v^)
|
||||
/// <( )>
|
||||
/// w w
|
||||
/// ```
|
||||
/// Valid values are:
|
||||
/// * "pre 1.29.0"
|
||||
/// * any valid semantic version
|
||||
pub INVALID_CLIPPY_VERSION_ATTRIBUTE,
|
||||
internal,
|
||||
"found an invalid `clippy::version` attribute"
|
||||
@ -484,8 +476,8 @@ fn is_lint_ref_type<'tcx>(cx: &LateContext<'tcx>, ty: &Ty<'_>) -> bool {
|
||||
|
||||
fn check_invalid_clippy_version_attribute(cx: &LateContext<'_>, item: &'_ Item<'_>) {
|
||||
if let Some(value) = extract_clippy_version_value(cx, item) {
|
||||
// The `sym!` macro doesn't work as it only expects a single token. I think
|
||||
// It's better to keep it this way and have a direct `Symbol::intern` call here :)
|
||||
// The `sym!` macro doesn't work as it only expects a single token.
|
||||
// It's better to keep it this way and have a direct `Symbol::intern` call here.
|
||||
if value == Symbol::intern("pre 1.29.0") {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user