use super::{
    RuleConfigurability, RuleDefaultSeverity, RuleDefinition, RuleLanguage, RuleStatus, bindings,
};

pub(crate) const RULE_DEFINITIONS: &[RuleDefinition] = &[
    RuleDefinition {
        id: "rust_async_blocking_drop",
        language: RuleLanguage::Rust,
        family: "async_patterns",
        default_severity: RuleDefaultSeverity::Contextual,
        status: RuleStatus::Experimental,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
            RuleConfigurability::RustAsyncExperimental,
        ],
        description: "A Drop implementation does blocking work that can surface in async contexts.",
        binding_location: bindings::RUST_ASYNC_PATTERNS,
    },
    RuleDefinition {
        id: "rust_async_hold_permit_across_await",
        language: RuleLanguage::Rust,
        family: "async_patterns",
        default_severity: RuleDefaultSeverity::Contextual,
        status: RuleStatus::Experimental,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
            RuleConfigurability::RustAsyncExperimental,
        ],
        description: "A permit or pooled resource may be held across an .await.",
        binding_location: bindings::RUST_ASYNC_PATTERNS,
    },
    RuleDefinition {
        id: "rust_async_invariant_broken_at_await",
        language: RuleLanguage::Rust,
        family: "async_patterns",
        default_severity: RuleDefaultSeverity::Contextual,
        status: RuleStatus::Experimental,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
            RuleConfigurability::RustAsyncExperimental,
        ],
        description: "Related state mutations appear split around an await boundary.",
        binding_location: bindings::RUST_ASYNC_PATTERNS,
    },
    RuleDefinition {
        id: "rust_async_lock_order_cycle",
        language: RuleLanguage::Rust,
        family: "async_patterns",
        default_severity: RuleDefaultSeverity::Contextual,
        status: RuleStatus::Experimental,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
            RuleConfigurability::RustAsyncExperimental,
        ],
        description: "Conflicting lock acquisition order suggests a lock-order cycle.",
        binding_location: bindings::RUST_ASYNC_PATTERNS,
    },
    RuleDefinition {
        id: "rust_async_missing_fuse_pin",
        language: RuleLanguage::Rust,
        family: "async_patterns",
        default_severity: RuleDefaultSeverity::Contextual,
        status: RuleStatus::Experimental,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
            RuleConfigurability::RustAsyncExperimental,
        ],
        description: "select! reuse lacks pinning or fusing markers for repeated polling.",
        binding_location: bindings::RUST_ASYNC_PATTERNS,
    },
    RuleDefinition {
        id: "rust_async_monopolize_executor",
        language: RuleLanguage::Rust,
        family: "async_patterns",
        default_severity: RuleDefaultSeverity::Contextual,
        status: RuleStatus::Experimental,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
            RuleConfigurability::RustAsyncExperimental,
        ],
        description: "An async function may monopolize the executor with blocking work and no await.",
        binding_location: bindings::RUST_ASYNC_PATTERNS,
    },
    RuleDefinition {
        id: "rust_async_recreate_future_in_select",
        language: RuleLanguage::Rust,
        family: "async_patterns",
        default_severity: RuleDefaultSeverity::Contextual,
        status: RuleStatus::Experimental,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
            RuleConfigurability::RustAsyncExperimental,
        ],
        description: "A select! loop may recreate futures instead of reusing long-lived ones.",
        binding_location: bindings::RUST_ASYNC_PATTERNS,
    },
    RuleDefinition {
        id: "rust_async_spawn_cancel_at_await",
        language: RuleLanguage::Rust,
        family: "async_patterns",
        default_severity: RuleDefaultSeverity::Contextual,
        status: RuleStatus::Experimental,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
            RuleConfigurability::RustAsyncExperimental,
        ],
        description: "Async work is spawned without an obvious cancellation path.",
        binding_location: bindings::RUST_ASYNC_PATTERNS,
    },
    RuleDefinition {
        id: "rust_async_std_mutex_await",
        language: RuleLanguage::Rust,
        family: "async_patterns",
        default_severity: RuleDefaultSeverity::Contextual,
        status: RuleStatus::Experimental,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
            RuleConfigurability::RustAsyncExperimental,
        ],
        description: "std::sync::Mutex appears to be held across .await in async code.",
        binding_location: bindings::RUST_ASYNC_PATTERNS,
    },
];
