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:
MichiRecRoom 2025-01-08 15:42:50 -05:00 committed by GitHub
parent 8b4c25ad5f
commit 789c5e31fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

View File

@ -238,7 +238,10 @@ pub enum NativeKeyCode {
all(feature = "serialize", feature = "bevy_reflect"),
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)]
pub enum KeyCode {
/// 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"),
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 {
/// A key string that corresponds to the character typed by the user, taking into account the
/// users current locale setting, and any system-level keyboard mapping overrides that are in

View File

@ -1,5 +1,10 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![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(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"