Be more specific with clippy's exhaustive_enums lint exceptions

This commit is contained in:
Oliver Hamlet
2025-08-02 16:05:36 +01:00
parent b75eced9ea
commit c61fcd248d
5 changed files with 10 additions and 1 deletions
+1
View File
@@ -22,6 +22,7 @@ pub use error::{ConditionEvaluationError, MetadataRetrievalError};
/// Control behaviour when writing to files.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[non_exhaustive]
pub enum WriteMode {
/// Create the file if it does not exist, otherwise error.
Create,
-1
View File
@@ -1,7 +1,6 @@
// Allow some lints that are denied at the workspace level.
#![allow(
clippy::doc_markdown,
clippy::exhaustive_enums,
clippy::filetype_is_file,
clippy::must_use_candidate,
clippy::missing_errors_doc,
+4
View File
@@ -39,6 +39,10 @@ pub fn set_log_level(level: LogLevel) {
/// Codes used to specify different levels of API logging.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[expect(
clippy::exhaustive_enums,
reason = "Adding a new log level should be a breaking change."
)]
pub enum LogLevel {
Trace,
Debug,
+4
View File
@@ -15,6 +15,10 @@ use super::{
/// Codes used to indicate the type of a message.
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[expect(
clippy::exhaustive_enums,
reason = "Adding a new message is a breaking change."
)]
pub enum MessageType {
/// A notification message that is of no significant severity.
#[default]
+1
View File
@@ -10,6 +10,7 @@ use super::{
/// Represents whether a Bash Tag suggestion is for addition or removal.
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[expect(clippy::exhaustive_enums, reason = "It's effectively a boolean")]
pub enum TagSuggestion {
#[default]
Addition,