version = "2"

[scanner]
gitignore = true
exclude = ["target/**", ".git/**", ".tmp/**"]

[content]
extensions = ["rs"]
max_lines = 600
warn_threshold = 0.9
skip_comments = true
skip_blank = false

[[content.rules]]
pattern = "**/*tests.rs"
max_lines = 1100
skip_comments = true
skip_blank = false
# warn_threshold = 0.8
warn_at = 900

[structure]
max_files = 20
max_dirs = 20
warn_threshold = 0.8
count_exclude = ["*_tests.rs"]


# 在 src 目录下禁止特定文件名
[[structure.rules]]
scope = "{src,src/**}"
deny_dirs = ["tests"]
deny_files = [
    # 按类型组织 (反模式)
    "types.rs",
    "enums.rs",
    "structs.rs",
    "traits.rs",
    "impls.rs",
    "constants.rs",
    "consts.rs",
    "errors.rs",
    "models.rs",
    "entities.rs",
    "dtos.rs",
    "definitions.rs",
    "functions.rs",
    "methods.rs",
    "macros.rs",

    # 通用/杂项 (无明确职责)
    "common.rs",
    "commons.rs",
    "helper.rs",
    "helpers.rs",
    "utils.rs",
    "util.rs",
    "utilities.rs",
    "*_utils.rs",
    "misc.rs",
    "shared.rs",
    "general.rs",
    "global.rs",
    "globals.rs",
    "support.rs",
    "extras.rs",

    # 测试辅助
    "tests.rs",
    "tests_helper.rs",
    "tests_utils.rs",
    "tests_macros.rs",
    "test_utils.rs",
    "test_helper.rs",
    "test_helpers.rs",
    "test_common.rs",
    "mocks.rs",
    "fixtures.rs",
]
