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

pub(crate) const RULE_DEFINITIONS: &[RuleDefinition] = &[
    RuleDefinition {
        id: "rust_unsafe_aliasing_assumption",
        language: RuleLanguage::Rust,
        family: "unsafe_soundness",
        default_severity: RuleDefaultSeverity::Warning,
        status: RuleStatus::Stable,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
        ],
        description: "Unsafe code mixes interior mutability and mutable references in ways that need careful aliasing review.",
        binding_location: bindings::RUST_UNSAFE_SOUNDNESS,
    },
    RuleDefinition {
        id: "rust_unsafe_assume_init",
        language: RuleLanguage::Rust,
        family: "unsafe_soundness",
        default_severity: RuleDefaultSeverity::Warning,
        status: RuleStatus::Stable,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
        ],
        description: "Unsafe MaybeUninit::assume_init use without proof of full initialization.",
        binding_location: bindings::RUST_UNSAFE_SOUNDNESS,
    },
    RuleDefinition {
        id: "rust_unsafe_from_raw_parts",
        language: RuleLanguage::Rust,
        family: "unsafe_soundness",
        default_severity: RuleDefaultSeverity::Warning,
        status: RuleStatus::Stable,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
        ],
        description: "Unsafe raw slice construction that depends on lifetime and length invariants.",
        binding_location: bindings::RUST_UNSAFE_SOUNDNESS,
    },
    RuleDefinition {
        id: "rust_unsafe_get_unchecked",
        language: RuleLanguage::Rust,
        family: "unsafe_soundness",
        default_severity: RuleDefaultSeverity::Warning,
        status: RuleStatus::Stable,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
        ],
        description: "Unsafe use of get_unchecked without proof of bounds invariants.",
        binding_location: bindings::RUST_UNSAFE_SOUNDNESS,
    },
    RuleDefinition {
        id: "rust_unsafe_raw_pointer_cast",
        language: RuleLanguage::Rust,
        family: "unsafe_soundness",
        default_severity: RuleDefaultSeverity::Warning,
        status: RuleStatus::Stable,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
        ],
        description: "Unsafe raw pointer cast that depends on aliasing and lifetime guarantees.",
        binding_location: bindings::RUST_UNSAFE_SOUNDNESS,
    },
    RuleDefinition {
        id: "rust_unsafe_set_len",
        language: RuleLanguage::Rust,
        family: "unsafe_soundness",
        default_severity: RuleDefaultSeverity::Warning,
        status: RuleStatus::Stable,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
        ],
        description: "Unsafe Vec::set_len use that requires initialized elements and correct capacity invariants.",
        binding_location: bindings::RUST_UNSAFE_SOUNDNESS,
    },
    RuleDefinition {
        id: "rust_unsafe_transmute",
        language: RuleLanguage::Rust,
        family: "unsafe_soundness",
        default_severity: RuleDefaultSeverity::Warning,
        status: RuleStatus::Stable,
        configurability: &[
            RuleConfigurability::Disable,
            RuleConfigurability::Ignore,
            RuleConfigurability::SeverityOverride,
        ],
        description: "Unsafe transmute use that requires layout and validity proof.",
        binding_location: bindings::RUST_UNSAFE_SOUNDNESS,
    },
];
