slopguard-rules 0.1.4

Builtin rule definitions for slopguard
Documentation
id: no-allow-dead-code
language: rust
severity: error
category: security
message: "#[allow(dead_code)] in src/. Remove dead code instead of suppressing the warning."
note: "AI adds unused code then hides the warning with allow(dead_code) instead of deleting it."
rule:
  kind: attribute_item
  regex: 'allow\(\s*dead_code\s*\)'
files:
  - "**/src/**/*.rs"
ignores:
  - "**/tests/**"
  - "**/fixtures/**"
skip_test_code: true
tests:
  should_match:
    - "#[allow(dead_code)]"
    - "#[allow( dead_code )]"
  should_not_match:
    - "#[allow(unused_imports)]"
    - "#[deny(dead_code)]"