bevy_input: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
(#17242)
# Objective - https://github.com/bevyengine/bevy/issues/17111 ## Solution Set the `clippy::allow_attributes` and `clippy::allow_attributes_without_reason` lints to `deny`, and bring `bevy_input` in line with the new restrictions. ## Testing `cargo clippy --tests --package bevy_input` was run, and no errors were encountered.
This commit is contained in:
parent
8b4c25ad5f
commit
789c5e31fa
@ -238,7 +238,10 @@ pub enum NativeKeyCode {
|
|||||||
all(feature = "serialize", feature = "bevy_reflect"),
|
all(feature = "serialize", feature = "bevy_reflect"),
|
||||||
reflect(Serialize, Deserialize)
|
reflect(Serialize, Deserialize)
|
||||||
)]
|
)]
|
||||||
#[allow(clippy::doc_markdown)] // Clippy doesn't like our use of <kbd>.
|
#[expect(
|
||||||
|
clippy::doc_markdown,
|
||||||
|
reason = "We use camel-case words inside `<kbd>` tags to represent keyboard keys, which are not identifiers that we should be putting inside backticks."
|
||||||
|
)]
|
||||||
#[repr(u32)]
|
#[repr(u32)]
|
||||||
pub enum KeyCode {
|
pub enum KeyCode {
|
||||||
/// This variant is used when the key cannot be translated to any other variant.
|
/// This variant is used when the key cannot be translated to any other variant.
|
||||||
@ -764,7 +767,10 @@ pub enum NativeKey {
|
|||||||
all(feature = "serialize", feature = "bevy_reflect"),
|
all(feature = "serialize", feature = "bevy_reflect"),
|
||||||
reflect(Serialize, Deserialize)
|
reflect(Serialize, Deserialize)
|
||||||
)]
|
)]
|
||||||
#[allow(clippy::doc_markdown)] // Clippy doesn't like our use of <kbd>.
|
#[expect(
|
||||||
|
clippy::doc_markdown,
|
||||||
|
reason = "We use camel-case words inside `<kbd>` tags to represent keyboard keys, which are not identifiers that we should be putting inside backticks."
|
||||||
|
)]
|
||||||
pub enum Key {
|
pub enum Key {
|
||||||
/// A key string that corresponds to the character typed by the user, taking into account the
|
/// A key string that corresponds to the character typed by the user, taking into account the
|
||||||
/// user’s current locale setting, and any system-level keyboard mapping overrides that are in
|
/// user’s current locale setting, and any system-level keyboard mapping overrides that are in
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
#![forbid(unsafe_code)]
|
#![forbid(unsafe_code)]
|
||||||
|
#![deny(
|
||||||
|
clippy::allow_attributes,
|
||||||
|
clippy::allow_attributes_without_reason,
|
||||||
|
reason = "See #17111; To be removed once all crates are in-line with these attributes"
|
||||||
|
)]
|
||||||
#![doc(
|
#![doc(
|
||||||
html_logo_url = "https://bevyengine.org/assets/icon.png",
|
html_logo_url = "https://bevyengine.org/assets/icon.png",
|
||||||
html_favicon_url = "https://bevyengine.org/assets/icon.png"
|
html_favicon_url = "https://bevyengine.org/assets/icon.png"
|
||||||
|
Loading…
Reference in New Issue
Block a user