Skip to content

Config

mcp_zen_of_languages.config

Configuration discovery, YAML loading, and pipeline override merging.

Every zen analysis session begins here. This module owns the lifecycle of zen-config.yaml—from locating the file on disk, through YAML parsing, to Pydantic-validated ConfigModel construction with fully resolved detector pipelines.

Discovery algorithm When no explicit path is supplied, the loader walks the filesystem upward from the current working directory, inspecting each directory for zen-config.yaml. The walk stops at the first directory that contains a pyproject.toml (the project-root marker), even when no config file has been found yet. This prevents accidental reads from unrelated parent projects.

Merge semantics User-supplied YAML keys are shallow-merged over built-in defaults so that a minimal config (e.g. just severity_threshold: 3) inherits every other default without the author having to repeat them.

Pipeline generation If the resolved config contains no pipelines section, the loader auto-generates one pipeline per declared language by projecting zen-principle rules through PipelineConfig.from_rules.

See Also

PipelineConfig: Per-language detector pipeline model. merge_pipeline_overrides: Merges user overrides into rule-derived base pipelines by detector type.

Classes

ConfigModel

Bases: BaseModel

Root Pydantic model that holds every tunable knob for zen analysis.

ConfigModel is the single source of truth produced by load_config. Analyzers, the MCP server, and the CLI all receive a validated instance of this model—never a raw dictionary—so typos in YAML keys surface as ValidationError rather than silent mis-configuration.

ATTRIBUTE DESCRIPTION
languages

Ordered list of language identifiers that the analysis session will support. Defaults to ten built-in languages (python, ruby, typescript, javascript, go, rust, bash, powershell, cpp, csharp). Adding an entry here causes load_config to auto-generate a pipeline for the language when the pipelines section is absent.

TYPE: list[str]

severity_threshold

Minimum severity score (1-10) a violation must reach to be included in analysis results. Violations below this threshold are silently dropped. Default is 5.

TYPE: int

pipelines

Per-language detector pipeline configurations. Each entry pairs a language identifier with a list of DetectorConfig objects that control individual detectors. When the YAML file omits this key the loader auto-generates pipelines from zen-principle rules.

TYPE: list[PipelineConfig]

Example YAML mapping::

languages:
  - python
  - typescript
severity_threshold: 3
pipelines:
  - language: python
    detectors:
      - type: cyclomatic_complexity
        max_cyclomatic_complexity: 8
Note

model_config = ConfigDict(extra="forbid") rejects unknown keys, turning YAML typos like severitythreshold into immediate validation errors instead of silently ignored fields.

See Also

PipelineConfig: Schema for individual pipeline entries. load_config: Factory that discovers, parses, merges, and validates YAML into a ConfigModel instance.

Functions
pipeline_for
pipeline_for(language)

Resolve the effective detector pipeline for a single language.

Resolution follows a two-layer strategy:

  1. Base layerPipelineConfig.from_rules(language) projects the language's zen principles into detector configs, producing a pipeline whose thresholds mirror the canonical rules.
  2. Override layer — if the user's pipelines list contains an entry whose language field matches, its detectors are merged on top of the base layer by detector type via merge_pipeline_overrides. Detectors present only in the base are kept unchanged; detectors present only in the override are appended.

When no matching override exists the base pipeline is returned unmodified, ensuring every supported language always gets a complete detector configuration even with a minimal YAML file.

PARAMETER DESCRIPTION
language

Case-sensitive language identifier (e.g. "python", "typescript").

TYPE: str

RETURNS DESCRIPTION
PipelineConfig

Fully resolved PipelineConfig with base

TYPE: PipelineConfig

PipelineConfig

detectors and any user overrides merged in.

See Also

PipelineConfig.from_rules: Builds the base pipeline from zen principles. merge_pipeline_overrides: Performs the per-detector-type merge of base and override configs.

Source code in src/mcp_zen_of_languages/config.py
def pipeline_for(self, language: str) -> PipelineConfig:
    """Resolve the effective detector pipeline for a single language.

    Resolution follows a two-layer strategy:

    1. **Base layer** — ``PipelineConfig.from_rules(language)`` projects
       the language's zen principles into detector configs, producing a
       pipeline whose thresholds mirror the canonical rules.
    2. **Override layer** — if the user's ``pipelines`` list contains an
       entry whose ``language`` field matches, its detectors are merged
       on top of the base layer by detector ``type`` via
       ``merge_pipeline_overrides``.  Detectors present only in the
       base are kept unchanged; detectors present only in the override
       are appended.

    When no matching override exists the base pipeline is returned
    unmodified, ensuring every supported language always gets a
    complete detector configuration even with a minimal YAML file.

    Args:
        language (str): Case-sensitive language identifier (e.g.
            ``"python"``, ``"typescript"``).

    Returns:
        PipelineConfig: Fully resolved ``PipelineConfig`` with base
        detectors and any user overrides merged in.

    See Also:
        ``PipelineConfig.from_rules``: Builds the base pipeline from
            zen principles.
        ``merge_pipeline_overrides``: Performs the per-detector-type
            merge of base and override configs.
    """
    from mcp_zen_of_languages.analyzers.pipeline import merge_pipeline_overrides

    base = PipelineConfig.from_rules(language)
    for pipeline in self.pipelines:
        if pipeline.language == language:
            return merge_pipeline_overrides(base, pipeline)
    return base

Functions

load_config

load_config(path=None)

Discover, load, and validate zen-config.yaml into a ConfigModel.

The discovery algorithm searches for zen-config.yaml using a deterministic walk that balances convenience with safety:

  1. Explicit path — when path is supplied the file is read directly; no filesystem walk occurs.
  2. CWD checkPath.cwd() / "zen-config.yaml" is tried first.
  3. Upward walk — each parent directory is inspected in order. The walk halts as soon as a directory containing pyproject.toml is reached (the project-root marker), even if no config was found, preventing accidental reads from unrelated ancestor projects.

Once a file is located the raw YAML is shallow-merged over the built-in defaults (ConfigModel()), so a minimal file that sets only severity_threshold: 3 inherits every other default without repetition.

If the merged config has an empty pipelines list, a pipeline is auto-generated for each language in languages by calling PipelineConfig.from_rules, guaranteeing that every declared language ships with a complete detector configuration.

PARAMETER DESCRIPTION
path

Filesystem path to zen-config.yaml. Pass None (the default) to activate auto-discovery. Default to None.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
ConfigModel

Validated ConfigModel reflecting the merged

TYPE: ConfigModel

ConfigModel

configuration. Returns a default ConfigModel when no config

ConfigModel

file is found anywhere on the search path.

RAISES DESCRIPTION
yaml.YAMLError

If the file contains invalid YAML syntax.

ValidationError

If merged values violate ConfigModel constraints (e.g. unknown keys due to extra="forbid").

Examples:

Explicit path::

cfg = load_config("/repo/zen-config.yaml")

Auto-discovery from CWD::

cfg = load_config()  # walks CWD → parents → pyproject.toml
See Also

ConfigModel: The Pydantic model returned by this function. PipelineConfig.from_rules: Generates pipelines when pipelines is empty.

Source code in src/mcp_zen_of_languages/config.py
def load_config(path: str | None = None) -> ConfigModel:  # noqa: C901, PLR0912
    """Discover, load, and validate ``zen-config.yaml`` into a ``ConfigModel``.

    The discovery algorithm searches for ``zen-config.yaml`` using a
    deterministic walk that balances convenience with safety:

    1. **Explicit path** — when *path* is supplied the file is read
       directly; no filesystem walk occurs.
    2. **CWD check** — ``Path.cwd() / "zen-config.yaml"`` is tried first.
    3. **Upward walk** — each parent directory is inspected in order.
       The walk halts as soon as a directory containing
       ``pyproject.toml`` is reached (the project-root marker), even if
       no config was found, preventing accidental reads from unrelated
       ancestor projects.

    Once a file is located the raw YAML is shallow-merged over the
    built-in defaults (``ConfigModel()``), so a minimal file that sets
    only ``severity_threshold: 3`` inherits every other default without
    repetition.

    If the merged config has an empty ``pipelines`` list, a pipeline is
    auto-generated for each language in ``languages`` by calling
    ``PipelineConfig.from_rules``, guaranteeing that every declared
    language ships with a complete detector configuration.

    Args:
        path (str | None, optional): Filesystem path to ``zen-config.yaml``.  Pass
            ``None`` (the default) to activate auto-discovery. Default to None.

    Returns:
        ConfigModel: Validated ``ConfigModel`` reflecting the merged
        configuration.  Returns a default ``ConfigModel`` when no config
        file is found anywhere on the search path.

    Raises:
        yaml.YAMLError: If the file contains invalid YAML syntax.
        ValidationError: If merged values violate ``ConfigModel``
            constraints (e.g. unknown keys due to ``extra="forbid"``).

    Examples:
        Explicit path::

            cfg = load_config("/repo/zen-config.yaml")

        Auto-discovery from CWD::

            cfg = load_config()  # walks CWD → parents → pyproject.toml

    See Also:
        ``ConfigModel``: The Pydantic model returned by this function.
        ``PipelineConfig.from_rules``: Generates pipelines when
            ``pipelines`` is empty.
    """
    from pathlib import Path

    default = ConfigModel()

    if not path:
        cwd_config = Path.cwd() / "zen-config.yaml"
        if cwd_config.exists():
            path = str(cwd_config)
        else:
            current = Path.cwd()
            for parent in [current, *current.parents]:
                candidate = parent / "zen-config.yaml"
                if candidate.exists():
                    path = str(candidate)
                    break
                if (parent / "pyproject.toml").exists():
                    break

    if not path:
        return default
    try:
        with Path(path).open() as f:
            data = yaml.safe_load(f) or {}
        merged = {**default.model_dump(), **data}
        env_severity_threshold = os.environ.get("ZEN_SEVERITY_THRESHOLD")
        if env_severity_threshold is not None:
            try:
                merged["severity_threshold"] = int(env_severity_threshold)
            except ValueError as exc:
                msg = (
                    "Environment variable ZEN_SEVERITY_THRESHOLD must be an integer "
                    f"between 1 and 10; got {env_severity_threshold!r}"
                )
                raise ValueError(msg) from exc
        cfg = ConfigModel.model_validate(merged)
        if not cfg.pipelines:
            cfg = cfg.model_copy(
                update={
                    "pipelines": [
                        PipelineConfig.from_rules(lang) for lang in cfg.languages
                    ],
                },
            )
    except FileNotFoundError:
        return default
    except Exception:
        raise
    else:
        return cfg

mcp_zen_of_languages.languages.configs

Pydantic configuration models for violation detectors across all supported languages.

Each model inherits from DetectorConfig and adds fields specific to a single detector type. The type literal acts as a discriminator so the pipeline can deserialize heterogeneous detector configurations from zen-config.yaml into the correct Pydantic class.

See Also

mcp_zen_of_languages.analyzers.pipeline: Merges these configs with rule-derived defaults at analysis time.

Classes

RuleContext

Bases: BaseModel

Rule-scoped metadata preserved for composite detectors.

Composite detectors may cover several rule ids while sharing one detector implementation and one config type. This model keeps the original principle-specific metadata so detectors can render the correct rule label, severity, and default violation messages at emission time.

DetectorConfig

Bases: BaseModel

Base configuration shared by every violation detector.

Subclasses add detector-specific fields while inheriting common metadata like principle_id, severity, and violation_messages.

ATTRIBUTE DESCRIPTION
type

Discriminator string that uniquely identifies the detector kind.

TYPE: str

principle_id

Optional zen principle identifier this detector enforces.

TYPE: str | None

principle

Human-readable name of the zen principle, used as a fallback violation message when no specific messages are configured.

TYPE: str | None

severity

Violation severity on a 1-10 scale (1 = informational, 10 = critical).

TYPE: int | None

violation_messages

Ordered list of message templates; the first matching template is selected at report time.

TYPE: list[str] | None

detectable_patterns

Literal strings or !-prefixed required-absence patterns that the rule-pattern detector scans for.

TYPE: list[str] | None

recommended_alternative

Suggestion text appended to violation reports when a better practice exists.

TYPE: str | None

rule_contexts

Rule-specific metadata map used by composite detectors to emit precise principle labels and severities.

TYPE: dict[str, RuleContext]

Functions
select_violation_message
select_violation_message(
    *, contains=None, index=0, rule_id=None
)

Choose a violation message by substring match or positional index.

When contains is given, the first message whose text includes that substring is returned. Otherwise the message at index is used, falling back to the first message, the principle name, or the type discriminator if no messages are configured.

PARAMETER DESCRIPTION
contains

Optional substring to match against available messages. Default to None.

TYPE: str | None DEFAULT: None

index

Zero-based position selecting a message when no substring match is requested. Default to 0.

TYPE: int DEFAULT: 0

rule_id

Optional rule identifier for composite detectors. When provided and available, message selection uses that rule's preserved context. Default to None.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
str

The selected violation message text.

TYPE: str

Source code in src/mcp_zen_of_languages/languages/configs.py
def select_violation_message(
    self,
    *,
    contains: str | None = None,
    index: int = 0,
    rule_id: str | None = None,
) -> str:
    """Choose a violation message by substring match or positional index.

    When *contains* is given, the first message whose text includes that
    substring is returned.  Otherwise the message at *index* is used,
    falling back to the first message, the principle name, or the type
    discriminator if no messages are configured.

    Args:
        contains (str | None, optional): Optional substring to match against available messages. Default to None.
        index (int, optional): Zero-based position selecting a message when no substring
            match is requested. Default to 0.
        rule_id (str | None, optional): Optional rule identifier for
            composite detectors. When provided and available, message
            selection uses that rule's preserved context. Default to None.

    Returns:
        str: The selected violation message text.
    """
    rule_context = self.rule_context(rule_id)
    messages = (
        rule_context.violation_messages
        if rule_context and rule_context.violation_messages
        else self.violation_messages or []
    )
    if contains:
        for message in messages:
            if contains in message:
                return message
    if messages:
        return messages[index] if 0 <= index < len(messages) else messages[0]
    return self.principle_for_rule(rule_id)
rule_context
rule_context(rule_id=None)

Return preserved metadata for one rule when available.

Source code in src/mcp_zen_of_languages/languages/configs.py
def rule_context(self, rule_id: str | None = None) -> RuleContext | None:
    """Return preserved metadata for one rule when available."""
    if rule_id and rule_id in self.rule_contexts:
        return self.rule_contexts[rule_id]
    if self.principle_id and self.principle_id in self.rule_contexts:
        return self.rule_contexts[self.principle_id]
    if len(self.rule_contexts) == 1:
        return next(iter(self.rule_contexts.values()))
    return None
principle_for_rule
principle_for_rule(rule_id=None)

Resolve the human-readable principle name for one rule.

Source code in src/mcp_zen_of_languages/languages/configs.py
def principle_for_rule(self, rule_id: str | None = None) -> str:
    """Resolve the human-readable principle name for one rule."""
    rule_context = self.rule_context(rule_id)
    if rule_context is not None:
        return rule_context.principle
    return self.principle or self.principle_id or self.type
severity_for_rule
severity_for_rule(rule_id=None, fallback=5)

Resolve the severity for one rule with sensible fallback behavior.

Source code in src/mcp_zen_of_languages/languages/configs.py
def severity_for_rule(self, rule_id: str | None = None, fallback: int = 5) -> int:
    """Resolve the severity for one rule with sensible fallback behavior."""
    rule_context = self.rule_context(rule_id)
    if rule_context is not None:
        return rule_context.severity
    return self.severity if self.severity is not None else fallback
linked_dogma_ids_for_rule
linked_dogma_ids_for_rule(rule_id=None)

Resolve authored linked dogma ids for one rule.

Source code in src/mcp_zen_of_languages/languages/configs.py
def linked_dogma_ids_for_rule(self, rule_id: str | None = None) -> list[str]:
    """Resolve authored linked dogma ids for one rule."""
    rule_context = self.rule_context(rule_id)
    return list(rule_context.linked_dogma_ids) if rule_context else []
verified_dogma_ids_for_rule
verified_dogma_ids_for_rule(rule_id=None)

Resolve authored verified dogma ids for one rule.

Source code in src/mcp_zen_of_languages/languages/configs.py
def verified_dogma_ids_for_rule(self, rule_id: str | None = None) -> list[str]:
    """Resolve authored verified dogma ids for one rule."""
    rule_context = self.rule_context(rule_id)
    return list(rule_context.verified_dogma_ids) if rule_context else []
linked_testing_ids_for_rule
linked_testing_ids_for_rule(rule_id=None)

Resolve authored linked testing-family ids for one rule.

Source code in src/mcp_zen_of_languages/languages/configs.py
def linked_testing_ids_for_rule(self, rule_id: str | None = None) -> list[str]:
    """Resolve authored linked testing-family ids for one rule."""
    rule_context = self.rule_context(rule_id)
    return list(rule_context.linked_testing_ids) if rule_context else []
verified_testing_ids_for_rule
verified_testing_ids_for_rule(rule_id=None)

Resolve authored verified testing-family ids for one rule.

Source code in src/mcp_zen_of_languages/languages/configs.py
def verified_testing_ids_for_rule(self, rule_id: str | None = None) -> list[str]:
    """Resolve authored verified testing-family ids for one rule."""
    rule_context = self.rule_context(rule_id)
    return list(rule_context.verified_testing_ids) if rule_context else []

NameStyleConfig

Bases: DetectorConfig

Naming convention enforcement settings.

ATTRIBUTE DESCRIPTION
naming_convention

Expected convention pattern (e.g. snake_case).

TYPE: str | None

min_identifier_length

Shortest acceptable identifier length.

TYPE: int | None

SparseCodeConfig

Bases: DetectorConfig

Code density and whitespace separation settings.

ATTRIBUTE DESCRIPTION
max_statements_per_line

Maximum statements allowed on a single line.

TYPE: int

min_blank_lines_between_defs

Minimum blank lines required between top-level definitions.

TYPE: int

ConsistencyConfig

Bases: DetectorConfig

Naming-style consistency settings across a codebase.

ATTRIBUTE DESCRIPTION
max_naming_styles

Maximum distinct naming conventions allowed.

TYPE: int

ExplicitnessConfig

Bases: DetectorConfig

Explicit type annotation enforcement settings.

ATTRIBUTE DESCRIPTION
require_type_hints

When True, functions without type hints are flagged.

TYPE: bool

NamespaceConfig

Bases: DetectorConfig

Namespace and top-level symbol density settings.

ATTRIBUTE DESCRIPTION
max_top_level_symbols

Maximum top-level names before flagging pollution.

TYPE: int

max_exports

Maximum public exports allowed from a module.

TYPE: int

CyclomaticComplexityConfig

Bases: DetectorConfig

Cyclomatic complexity threshold settings.

ATTRIBUTE DESCRIPTION
max_cyclomatic_complexity

Upper bound on per-function cyclomatic complexity.

TYPE: int

NestingDepthConfig

Bases: DetectorConfig

Control-flow nesting depth threshold settings.

ATTRIBUTE DESCRIPTION
max_nesting_depth

Maximum allowed indentation levels within a function.

TYPE: int

LongFunctionConfig

Bases: DetectorConfig

Function length threshold settings.

ATTRIBUTE DESCRIPTION
max_function_length

Maximum lines allowed in a single function body.

TYPE: int

GodClassConfig

Bases: DetectorConfig

God-class detection threshold settings.

ATTRIBUTE DESCRIPTION
max_methods

Maximum methods per class before flagging.

TYPE: int

max_class_length

Maximum total lines in a class definition.

TYPE: int

MagicMethodConfig

Bases: DetectorConfig

Magic/dunder method count threshold settings.

ATTRIBUTE DESCRIPTION
max_magic_methods

Maximum dunder methods per class.

TYPE: int

CircularDependencyConfig

Bases: DetectorConfig

Circular import/dependency detection settings.

DeepInheritanceConfig

Bases: DetectorConfig

Inheritance chain depth threshold settings.

ATTRIBUTE DESCRIPTION
max_depth

Maximum allowed inheritance levels.

TYPE: int

FeatureEnvyConfig

Bases: DetectorConfig

Feature envy detection settings.

ATTRIBUTE DESCRIPTION
min_occurrences

Minimum external attribute accesses to trigger a violation.

TYPE: int

DuplicateImplementationConfig

Bases: DetectorConfig

Duplicate code block detection settings.

ClassSizeConfig

Bases: DetectorConfig

Class size threshold settings.

ATTRIBUTE DESCRIPTION
max_class_length

Maximum total lines in a class definition.

TYPE: int

LineLengthConfig

Bases: DetectorConfig

Line length threshold settings.

ATTRIBUTE DESCRIPTION
max_line_length

Maximum characters per source line.

TYPE: int

DocstringConfig

Bases: DetectorConfig

Missing docstring detection settings.

ContextManagerConfig

Bases: DetectorConfig

Context manager (with statement) usage detection settings.

StarImportConfig

Bases: DetectorConfig

Wildcard (from x import *) import detection settings.

BareExceptConfig

Bases: DetectorConfig

Bare except: clause detection settings.

MagicNumberConfig

Bases: DetectorConfig

Magic number literal detection settings.

ATTRIBUTE DESCRIPTION
max_magic_numbers

Maximum unnamed numeric literals allowed.

TYPE: int

ComplexOneLinersConfig

Bases: DetectorConfig

Complex one-liner comprehension detection settings.

ATTRIBUTE DESCRIPTION
max_for_clauses

Maximum for clauses in a single comprehension.

TYPE: int

max_line_length

Maximum line length for a comprehension expression.

TYPE: int

ShortVariableNamesConfig

Bases: DetectorConfig

Short variable name detection settings.

ATTRIBUTE DESCRIPTION
min_identifier_length

Minimum characters for a variable name.

TYPE: int

allowed_loop_names

Names exempted from the length check (e.g., loop counters).

TYPE: list[str]

TsAnyUsageConfig

Bases: DetectorConfig

TypeScript any usage detection settings.

ATTRIBUTE DESCRIPTION
max_any_usages

Maximum permitted any annotations (default 0).

TYPE: int

detect_explicit_any

Flag explicit any type annotations.

TYPE: bool

detect_assertions_any

Flag as any type assertions.

TYPE: bool

detect_any_arrays

Flag any[] array types.

TYPE: bool

TsStrictModeConfig

Bases: DetectorConfig

TypeScript strict-mode compiler flag enforcement settings.

ATTRIBUTE DESCRIPTION
require_strict

Require the strict flag.

TYPE: bool

require_no_implicit_any

Require noImplicitAny.

TYPE: bool

require_strict_null_checks

Require strictNullChecks.

TYPE: bool

TsInterfacePreferenceConfig

Bases: DetectorConfig

TypeScript interface-over-type-alias preference settings.

ATTRIBUTE DESCRIPTION
max_object_type_aliases

Maximum object-shape type aliases before a violation.

TYPE: int

TsReturnTypeConfig

Bases: DetectorConfig

TypeScript explicit return-type annotation enforcement settings.

ATTRIBUTE DESCRIPTION
require_return_types

When True, flag functions without return-type annotations.

TYPE: bool

TsReadonlyConfig

Bases: DetectorConfig

TypeScript readonly modifier enforcement settings.

ATTRIBUTE DESCRIPTION
require_readonly_properties

Require readonly on applicable properties.

TYPE: bool

min_readonly_occurrences

Minimum expected readonly annotations.

TYPE: int

TsTypeGuardConfig

Bases: DetectorConfig

TypeScript type-guard preference over type-assertion settings.

ATTRIBUTE DESCRIPTION
max_type_assertions

Maximum as type assertions allowed.

TYPE: int

TsUtilityTypesConfig

Bases: DetectorConfig

TypeScript built-in utility-type usage enforcement settings.

ATTRIBUTE DESCRIPTION
min_utility_type_usage

Minimum expected utility-type references.

TYPE: int

min_object_type_aliases

Minimum object-type aliases before the rule activates.

TYPE: int

TsNonNullAssertionConfig

Bases: DetectorConfig

TypeScript non-null assertion (!) detection settings.

ATTRIBUTE DESCRIPTION
max_non_null_assertions

Maximum allowed ! postfix operators.

TYPE: int

TsEnumConstConfig

Bases: DetectorConfig

TypeScript const-enum preference settings.

ATTRIBUTE DESCRIPTION
max_plain_enum_objects

Maximum non-const enums before a violation.

TYPE: int

TsUnknownOverAnyConfig

Bases: DetectorConfig

TypeScript unknown-over-any preference settings.

ATTRIBUTE DESCRIPTION
max_any_for_unknown

Maximum any usages where unknown is preferred.

TYPE: int

TsOptionalChainingConfig

Bases: DetectorConfig

TypeScript optional-chaining enforcement settings.

ATTRIBUTE DESCRIPTION
max_manual_null_checks

Maximum manual null-check chains allowed.

TYPE: int

TsIndexLoopConfig

Bases: DetectorConfig

TypeScript index-loop enforcement settings.

ATTRIBUTE DESCRIPTION
max_index_loops

Maximum C-style index loops allowed.

TYPE: int

TsPromiseChainConfig

Bases: DetectorConfig

TypeScript promise-chain enforcement settings.

ATTRIBUTE DESCRIPTION
max_promise_chains

Maximum raw promise chains allowed.

TYPE: int

TsDefaultExportConfig

Bases: DetectorConfig

TypeScript default-export enforcement settings.

ATTRIBUTE DESCRIPTION
max_default_exports

Maximum default exports allowed.

TYPE: int

TsCatchAllTypeConfig

Bases: DetectorConfig

TypeScript catch-all type enforcement settings.

ATTRIBUTE DESCRIPTION
max_catch_all_types

Maximum catch-all type annotations allowed.

TYPE: int

TsConsoleUsageConfig

Bases: DetectorConfig

TypeScript console-usage enforcement settings.

ATTRIBUTE DESCRIPTION
max_console_usages

Maximum console.* calls allowed.

TYPE: int

TsRequireImportConfig

Bases: DetectorConfig

TypeScript require-import enforcement settings.

ATTRIBUTE DESCRIPTION
max_require_calls

Maximum require() calls allowed.

TYPE: int

TsStringConcatConfig

Bases: DetectorConfig

TypeScript string-concatenation enforcement settings.

ATTRIBUTE DESCRIPTION
max_string_concats

Maximum string concatenation patterns allowed.

TYPE: int

TsAsyncAwaitConfig

Bases: DetectorConfig

TypeScript async/await preference settings.

ATTRIBUTE DESCRIPTION
max_then_chains

Maximum raw .then() chains allowed.

TYPE: int

TsForOfConfig

Bases: DetectorConfig

TypeScript for-of loop preference settings.

ATTRIBUTE DESCRIPTION
max_index_based_loops

Maximum C-style index loops allowed.

TYPE: int

TsImportOrderConfig

Bases: DetectorConfig

TypeScript import-order enforcement settings.

ATTRIBUTE DESCRIPTION
max_require_usages

Maximum require() calls allowed.

TYPE: int

TsNamedExportConfig

Bases: DetectorConfig

TypeScript named-export preference settings.

ATTRIBUTE DESCRIPTION
max_default_export_usages

Maximum export default usages allowed.

TYPE: int

TsNoConsoleConfig

Bases: DetectorConfig

TypeScript no-console enforcement settings.

ATTRIBUTE DESCRIPTION
max_console_statements

Maximum console.* calls allowed.

TYPE: int

TsObjectTypeConfig

Bases: DetectorConfig

TypeScript object-type enforcement settings.

ATTRIBUTE DESCRIPTION
max_object_types

Maximum generic Object/object/{} annotations allowed.

TYPE: int

TsTemplateLiteralConfig

Bases: DetectorConfig

TypeScript template-literal preference settings.

ATTRIBUTE DESCRIPTION
max_string_concatenations

Maximum string concatenation patterns allowed.

TYPE: int

JsCallbackNestingConfig

Bases: DetectorConfig

JavaScript callback-nesting depth enforcement settings.

ATTRIBUTE DESCRIPTION
max_callback_nesting

Maximum permitted callback nesting levels.

TYPE: int

JsNoVarConfig

Bases: DetectorConfig

JavaScript var keyword prohibition settings.

ATTRIBUTE DESCRIPTION
detect_var_usage

When True, flag var declarations.

TYPE: bool

JsStrictEqualityConfig

Bases: DetectorConfig

JavaScript strict-equality operator (===) enforcement settings.

JsAsyncErrorHandlingConfig

Bases: DetectorConfig

JavaScript async/await error-handling detection settings.

JsFunctionLengthConfig

Bases: DetectorConfig

JavaScript function-length and parameter-count enforcement settings.

ATTRIBUTE DESCRIPTION
max_function_length

Maximum lines per function body.

TYPE: int

max_parameters

Maximum formal parameters per function (None disables).

TYPE: int | None

JsGlobalStateConfig

Bases: DetectorConfig

JavaScript global-state usage detection settings.

JsModernFeaturesConfig

Bases: DetectorConfig

JavaScript modern-feature adoption detection settings.

JsMagicNumbersConfig

Bases: DetectorConfig

JavaScript magic-number detection settings.

JsPureFunctionConfig

Bases: DetectorConfig

JavaScript pure-function preference enforcement settings.

BashStrictModeConfig

Bases: DetectorConfig

Bash strict-mode (set -euo pipefail) enforcement settings.

BashQuoteVariablesConfig

Bases: DetectorConfig

Bash variable-quoting enforcement settings.

BashEvalUsageConfig

Bases: DetectorConfig

Bash eval usage detection settings.

BashDoubleBracketsConfig

Bases: DetectorConfig

Bash [[ ]] double-bracket preference settings.

BashCommandSubstitutionConfig

Bases: DetectorConfig

Bash $() command-substitution preference settings.

BashReadonlyConstantsConfig

Bases: DetectorConfig

Bash readonly constant enforcement settings.

BashExitCodeConfig

Bases: DetectorConfig

Bash meaningful exit-code enforcement settings.

BashLocalVariablesConfig

Bases: DetectorConfig

Bash local variable-scoping enforcement settings.

BashArgumentValidationConfig

Bases: DetectorConfig

Bash argument-validation enforcement settings.

BashSignalHandlingConfig

Bases: DetectorConfig

Bash signal-handler (trap) enforcement settings.

BashArrayUsageConfig

Bases: DetectorConfig

Bash proper array-usage enforcement settings.

BashUsageInfoConfig

Bases: DetectorConfig

Bash usage/help-message enforcement settings.

PowerShellApprovedVerbConfig

Bases: DetectorConfig

PowerShell approved-verb enforcement settings.

ATTRIBUTE DESCRIPTION
approved_verbs

Accepted verb prefixes for cmdlet names.

TYPE: list[str]

PowerShellErrorHandlingConfig

Bases: DetectorConfig

PowerShell error-handling enforcement settings.

PowerShellPascalCaseConfig

Bases: DetectorConfig

PowerShell PascalCase naming-convention enforcement settings.

ATTRIBUTE DESCRIPTION
naming_convention

Expected casing pattern (None uses PascalCase default).

TYPE: str | None

PowerShellCmdletBindingConfig

Bases: DetectorConfig

PowerShell [CmdletBinding()] attribute enforcement settings.

PowerShellVerboseDebugConfig

Bases: DetectorConfig

PowerShell Write-Verbose/Write-Debug usage detection settings.

PowerShellPositionalParamsConfig

Bases: DetectorConfig

PowerShell positional-parameter prohibition settings.

PowerShellPipelineUsageConfig

Bases: DetectorConfig

PowerShell pipeline-usage preference settings.

PowerShellShouldProcessConfig

Bases: DetectorConfig

PowerShell ShouldProcess support enforcement settings.

PowerShellSplattingConfig

Bases: DetectorConfig

PowerShell parameter-splatting preference settings.

PowerShellParameterValidationConfig

Bases: DetectorConfig

PowerShell parameter-validation attribute enforcement settings.

PowerShellCommentHelpConfig

Bases: DetectorConfig

PowerShell comment-based help block enforcement settings.

PowerShellAliasUsageConfig

Bases: DetectorConfig

PowerShell alias-avoidance enforcement settings.

PowerShellReturnObjectsConfig

Bases: DetectorConfig

PowerShell structured-object return enforcement settings.

PowerShellScopeUsageConfig

Bases: DetectorConfig

PowerShell scope-modifier usage detection settings.

PowerShellNullHandlingConfig

Bases: DetectorConfig

PowerShell null-handling pattern enforcement settings.

RubyNamingConventionConfig

Bases: DetectorConfig

Ruby naming-convention enforcement settings.

ATTRIBUTE DESCRIPTION
naming_convention

Expected casing style (None defaults to snake_case).

TYPE: str | None

RubyMethodChainConfig

Bases: DetectorConfig

Ruby method-chain length enforcement settings.

ATTRIBUTE DESCRIPTION
max_method_chain_length

Maximum chained method calls per expression.

TYPE: int

RubyDryConfig

Bases: DetectorConfig

Ruby DRY (Don't Repeat Yourself) enforcement settings.

RubyBlockPreferenceConfig

Bases: DetectorConfig

Ruby block-syntax preference (do..end vs braces) settings.

RubyMonkeyPatchConfig

Bases: DetectorConfig

Ruby monkey-patching detection settings.

RubyMethodNamingConfig

Bases: DetectorConfig

Ruby method-naming convention detection settings.

RubySymbolKeysConfig

Bases: DetectorConfig

Ruby symbol-key preference over string-key settings.

RubyGuardClauseConfig

Bases: DetectorConfig

Ruby guard-clause preference over nested conditionals settings.

RubyMetaprogrammingConfig

Bases: DetectorConfig

Ruby excessive metaprogramming detection settings.

RubyExpressiveSyntaxConfig

Bases: DetectorConfig

Ruby expressive-syntax usage enforcement settings.

RubyPreferFailConfig

Bases: DetectorConfig

Ruby fail-over-raise preference settings.

CppSmartPointerConfig

Bases: DetectorConfig

C++ smart-pointer preference over raw-pointer settings.

CppNullptrConfig

Bases: DetectorConfig

C++ nullptr over NULL/0 preference settings.

CppRaiiConfig

Bases: DetectorConfig

C++ RAII resource-management enforcement settings.

CppAutoConfig

Bases: DetectorConfig

C++ auto type-deduction preference settings.

CppRangeForConfig

Bases: DetectorConfig

C++ range-based for loop preference settings.

CppManualAllocationConfig

Bases: DetectorConfig

C++ manual new/delete avoidance settings.

CppConstCorrectnessConfig

Bases: DetectorConfig

C++ const-correctness enforcement settings.

CppCStyleCastConfig

Bases: DetectorConfig

C++ C-style cast avoidance settings.

CppRuleOfFiveConfig

Bases: DetectorConfig

C++ Rule of Five special-member enforcement settings.

CppMoveConfig

Bases: DetectorConfig

C++ move-semantics usage enforcement settings.

CppAvoidGlobalsConfig

Bases: DetectorConfig

C++ global-variable avoidance settings.

CppOverrideFinalConfig

Bases: DetectorConfig

C++ override/final keyword enforcement settings.

CppOptionalConfig

Bases: DetectorConfig

C++ std::optional usage enforcement settings.

CSharpAsyncAwaitConfig

Bases: DetectorConfig

C# async/await usage enforcement settings.

CSharpStringInterpolationConfig

Bases: DetectorConfig

C# string-interpolation preference settings.

CSharpNullableConfig

Bases: DetectorConfig

C# nullable reference-type enforcement settings.

CSharpExpressionBodiedConfig

Bases: DetectorConfig

C# expression-bodied member preference settings.

CSharpVarConfig

Bases: DetectorConfig

C# var implicit-typing preference settings.

CSharpPatternMatchingConfig

Bases: DetectorConfig

C# pattern-matching preference settings.

CSharpCollectionExpressionConfig

Bases: DetectorConfig

C# collection-expression syntax preference settings.

CSharpDisposableConfig

Bases: DetectorConfig

C# IDisposable usage enforcement settings.

CSharpMagicNumberConfig

Bases: DetectorConfig

C# magic-number detection settings.

CSharpLinqConfig

Bases: DetectorConfig

C# LINQ query preference settings.

CSharpExceptionHandlingConfig

Bases: DetectorConfig

C# exception-handling best-practice enforcement settings.

CSharpRecordConfig

Bases: DetectorConfig

C# record-type preference settings.

CssSpecificityConfig

Bases: DetectorConfig

CSS selector nesting and !important overuse settings.

CssMagicPixelsConfig

Bases: DetectorConfig

CSS raw pixel-literal usage settings.

CssColorLiteralConfig

Bases: DetectorConfig

CSS inline color-literal usage settings.

CssGodStylesheetConfig

Bases: DetectorConfig

Maximum stylesheet line-count settings.

CssImportChainConfig

Bases: DetectorConfig

CSS @import usage settings.

CssZIndexScaleConfig

Bases: DetectorConfig

CSS z-index scale consistency settings.

CssVendorPrefixConfig

Bases: DetectorConfig

Manual vendor-prefix usage settings.

CssMediaQueryScaleConfig

Bases: DetectorConfig

Media-query breakpoint scale settings.

YamlIndentationConfig

Bases: DetectorConfig

YAML indentation width enforcement settings.

ATTRIBUTE DESCRIPTION
indent_size

Expected number of spaces per indentation level (default 2).

TYPE: int

YamlNoTabsConfig

Bases: DetectorConfig

YAML tab-character prohibition settings.

YamlDuplicateKeysConfig

Bases: DetectorConfig

YAML duplicate mapping-key detection settings.

YamlLowercaseKeysConfig

Bases: DetectorConfig

YAML lowercase-key enforcement settings.

YamlKeyClarityConfig

Bases: DetectorConfig

YAML minimum key-length enforcement settings.

ATTRIBUTE DESCRIPTION
min_key_length

Shortest acceptable mapping-key length (default 3).

TYPE: int

YamlConsistencyConfig

Bases: DetectorConfig

YAML list-marker consistency enforcement settings.

ATTRIBUTE DESCRIPTION
allowed_list_markers

Permitted sequence indicators (default ["-"]).

TYPE: list[str]

YamlCommentIntentConfig

Bases: DetectorConfig

YAML comment-coverage enforcement settings.

ATTRIBUTE DESCRIPTION
min_comment_lines

Minimum number of comment lines required.

TYPE: int

min_nonempty_lines

File must exceed this line count before the rule applies.

TYPE: int

YamlStringStyleConfig

Bases: DetectorConfig

YAML string quoting enforcement settings.

ATTRIBUTE DESCRIPTION
require_quotes_for_specials

When True, strings with spaces or special characters must be quoted.

TYPE: bool

AnsibleNamingConfig

Bases: DetectorConfig

Ansible play and task naming enforcement settings.

AnsibleFqcnConfig

Bases: DetectorConfig

Ansible fully qualified collection name enforcement settings.

AnsibleIdempotencyConfig

Bases: DetectorConfig

Ansible idempotency-over-shell enforcement settings.

AnsibleBecomeConfig

Bases: DetectorConfig

Ansible become-vs-sudo enforcement settings.

AnsibleStateExplicitConfig

Bases: DetectorConfig

Ansible explicit-state enforcement settings.

AnsibleNoCleartextPasswordConfig

Bases: DetectorConfig

Ansible cleartext secret detection settings.

AnsibleJinjaSpacingConfig

Bases: DetectorConfig

Ansible Jinja spacing enforcement settings.

AnsibleReadabilityCountsConfig

Bases: DetectorConfig

Ansible readability-counts enforcement settings.

AnsibleUserOutcomeConfig

Bases: DetectorConfig

Ansible user-outcome-first enforcement settings.

AnsibleUserExperienceConfig

Bases: DetectorConfig

Ansible UX-over-ideology enforcement settings.

AnsibleMagicAutomationConfig

Bases: DetectorConfig

Ansible magic-over-manual automation settings.

AnsibleConventionOverConfigConfig

Bases: DetectorConfig

Ansible convention-over-configuration settings.

AnsibleDeclarativeBiasConfig

Bases: DetectorConfig

Ansible declarative-over-imperative preference settings.

AnsibleFocusConfig

Bases: DetectorConfig

Ansible focus/size threshold settings.

AnsibleComplexityKillsProductivityConfig

Bases: DetectorConfig

Ansible complexity/productivity threshold settings.

AnsibleExplainabilityConfig

Bases: DetectorConfig

Ansible explainability enforcement settings.

AnsibleAutomationOpportunityConfig

Bases: DetectorConfig

Ansible shell-to-automation opportunity detection settings.

AnsibleContinuousImprovementConfig

Bases: DetectorConfig

Ansible continuous-improvement marker settings.

AnsibleFrictionConfig

Bases: DetectorConfig

Ansible friction-elimination settings.

AnsibleAutomationJourneyConfig

Bases: DetectorConfig

Ansible automation-journey hygiene settings.

TerraformProviderVersionPinningConfig

Bases: DetectorConfig

Terraform provider version-pinning settings.

TerraformModuleVersionPinningConfig

Bases: DetectorConfig

Terraform module version-pinning settings.

TerraformVariableOutputDescriptionConfig

Bases: DetectorConfig

Terraform variable/output description coverage settings.

TerraformHardcodedIdConfig

Bases: DetectorConfig

Terraform hardcoded ARN/ID detection settings.

TerraformNoHardcodedSecretsConfig

Bases: DetectorConfig

Terraform hardcoded-secret detection settings.

TerraformBackendConfig

Bases: DetectorConfig

Terraform backend-configuration presence settings.

TerraformNamingConventionConfig

Bases: DetectorConfig

Terraform snake_case naming convention settings.

DockerfileLatestTagConfig

Bases: DetectorConfig

Dockerfile latest-tag usage detection settings.

DockerfileNonRootUserConfig

Bases: DetectorConfig

Dockerfile non-root runtime user enforcement settings.

DockerfileAddInstructionConfig

Bases: DetectorConfig

Dockerfile ADD instruction preference settings.

DockerfileHealthcheckConfig

Bases: DetectorConfig

Dockerfile healthcheck presence enforcement settings.

DockerfileMultiStageConfig

Bases: DetectorConfig

Dockerfile multi-stage build preference settings.

DockerfileSecretHygieneConfig

Bases: DetectorConfig

Dockerfile secret-exposure detection settings.

DockerfileLayerDisciplineConfig

Bases: DetectorConfig

Dockerfile RUN-layer threshold settings.

DockerfileDockerignoreConfig

Bases: DetectorConfig

Dockerfile and .dockerignore coherence advisory settings.

DockerComposeLatestTagConfig

Bases: DetectorConfig

Docker Compose latest-tag usage detection settings.

DockerComposeNonRootUserConfig

Bases: DetectorConfig

Docker Compose non-root service user enforcement settings.

DockerComposeHealthcheckConfig

Bases: DetectorConfig

Docker Compose healthcheck presence enforcement settings.

DockerComposeSecretHygieneConfig

Bases: DetectorConfig

Docker Compose secret-exposure detection settings.

GitLabCIUnpinnedImageConfig

Bases: DetectorConfig

GitLab CI unpinned image tag detection settings.

GitLabCIExposedVariablesConfig

Bases: DetectorConfig

GitLab CI exposed variables detection settings.

GitLabCIAllowFailureConfig

Bases: DetectorConfig

GitLab CI allow_failure-without-rules detection settings.

GitLabCIGodPipelineConfig

Bases: DetectorConfig

GitLab CI god pipeline detection settings.

GitLabCIDuplicatedBeforeScriptConfig

Bases: DetectorConfig

GitLab CI duplicated before_script detection settings.

GitLabCIMissingInterruptibleConfig

Bases: DetectorConfig

GitLab CI interruptible detection settings.

GitLabCIMissingNeedsConfig

Bases: DetectorConfig

GitLab CI missing needs detection settings.

GitLabCIOnlyExceptConfig

Bases: DetectorConfig

GitLab CI only/except usage detection settings.

GitLabCIMissingCacheConfig

Bases: DetectorConfig

GitLab CI missing cache-key detection settings.

GitLabCIArtifactExpiryConfig

Bases: DetectorConfig

GitLab CI artifacts expire_in detection settings.

TomlNoInlineTablesConfig

Bases: DetectorConfig

TOML inline-table prohibition settings.

TomlDuplicateKeysConfig

Bases: DetectorConfig

TOML duplicate-key detection settings.

TomlLowercaseKeysConfig

Bases: DetectorConfig

TOML lowercase-key enforcement settings.

TomlTrailingCommasConfig

Bases: DetectorConfig

TOML trailing-comma detection settings.

TomlCommentClarityConfig

Bases: DetectorConfig

TOML comment-coverage enforcement settings.

ATTRIBUTE DESCRIPTION
min_comment_lines

Minimum number of comment lines before the rule passes.

TYPE: int

TomlOrderConfig

Bases: DetectorConfig

TOML table-section ordering settings.

TomlIsoDatetimeConfig

Bases: DetectorConfig

TOML ISO 8601 datetime enforcement settings.

TomlFloatIntegerConfig

Bases: DetectorConfig

TOML float-vs-integer precision detection settings.

JsonStrictnessConfig

Bases: DetectorConfig

JSON/JSON5 strictness settings (trailing comma policy).

JsonSchemaConsistencyConfig

Bases: DetectorConfig

JSON deep-nesting detection settings.

JsonDuplicateKeyConfig

Bases: DetectorConfig

JSON duplicate-key detection settings.

JsonMagicStringConfig

Bases: DetectorConfig

JSON magic-string repetition detection settings.

ATTRIBUTE DESCRIPTION
min_repetition

Minimum occurrences of a string value to flag it.

TYPE: int

min_length

Minimum string length to consider as a magic-string candidate.

TYPE: int

JsonKeyCasingConfig

Bases: DetectorConfig

JSON key-casing consistency enforcement settings.

JsonArrayOrderConfig

Bases: DetectorConfig

JSON oversized-inline-array detection settings.

JsonNullSprawlConfig

Bases: DetectorConfig

JSON null-sprawl detection settings.

ATTRIBUTE DESCRIPTION
max_null_values

Maximum total null values permitted across the document.

TYPE: int

JsonDateFormatConfig

Bases: DetectorConfig

JSON ISO 8601 date-format enforcement settings.

ATTRIBUTE DESCRIPTION
common_date_keys

Key name fragments used to identify probable date fields.

TYPE: list[str]

JsonNullHandlingConfig

Bases: DetectorConfig

JSON top-level explicit-null detection settings.

ATTRIBUTE DESCRIPTION
max_top_level_nulls

Maximum number of top-level object keys allowed to be set explicitly to null before a violation is raised.

TYPE: int

MarkdownHeadingHierarchyConfig

Bases: DetectorConfig

Markdown heading hierarchy detector settings.

MarkdownAltTextConfig

Bases: DetectorConfig

Markdown image alt-text detector settings.

MarkdownBareUrlConfig

Bases: DetectorConfig

Markdown bare-URL detector settings.

MarkdownCodeFenceLanguageConfig

Bases: DetectorConfig

Markdown fenced-code language-tag detector settings.

MarkdownFrontMatterConfig

Bases: DetectorConfig

Markdown front-matter completeness detector settings.

MarkdownMdxNamedDefaultExportConfig

Bases: DetectorConfig

MDX anonymous default-export detector settings.

MarkdownMdxImportHygieneConfig

Bases: DetectorConfig

MDX import-hygiene detector settings.

MarkdownDocumentConfig

Bases: DetectorConfig

Composite Markdown document-quality detector settings.

MarkdownMdxConfig

Bases: DetectorConfig

Composite MDX hygiene detector settings.

XmlSemanticMarkupConfig

Bases: DetectorConfig

XML semantic-vs-presentational markup detection settings.

XmlAttributeUsageConfig

Bases: DetectorConfig

XML oversized-attribute detection settings.

XmlNamespaceConfig

Bases: DetectorConfig

XML namespace declaration enforcement settings.

XmlValidityConfig

Bases: DetectorConfig

XML schema/DTD reference requirement settings.

XmlHierarchyConfig

Bases: DetectorConfig

XML element hierarchy and grouping detection settings.

XmlClosingTagsConfig

Bases: DetectorConfig

XML self-closing tag detection settings.

SvgNodeCountConfig

Bases: DetectorConfig

SVG node-count detector settings.

SvgMissingTitleConfig

Bases: DetectorConfig

SVG title-presence detector settings.

SvgAriaRoleConfig

Bases: DetectorConfig

SVG ARIA role/label detector settings.

SvgImageAltConfig

Bases: DetectorConfig

SVG image alternate-text detector settings.

SvgDescForComplexGraphicsConfig

Bases: DetectorConfig

SVG complex-graphic description detector settings.

SvgInlineStyleConfig

Bases: DetectorConfig

SVG inline style detector settings.

SvgViewBoxConfig

Bases: DetectorConfig

SVG viewBox detector settings.

SvgUnusedDefsConfig

Bases: DetectorConfig

SVG unused defs detector settings.

SvgNestedGroupsConfig

Bases: DetectorConfig

SVG nested groups detector settings.

SvgDuplicateIdConfig

Bases: DetectorConfig

SVG duplicate id detector settings.

SvgAbsolutePathOnlyConfig

Bases: DetectorConfig

SVG absolute-path detector settings.

SvgBase64ImageConfig

Bases: DetectorConfig

SVG base64 image detector settings.

SvgXmlnsConfig

Bases: DetectorConfig

SVG namespace detector settings.

SvgDeprecatedXlinkHrefConfig

Bases: DetectorConfig

SVG deprecated xlink detector settings.

SvgProductionBloatConfig

Bases: DetectorConfig

SVG metadata/comments bloat detector settings.

LatexMacroDefinitionConfig

Bases: DetectorConfig

LaTeX raw \def usage detection settings.

LatexLabelRefDisciplineConfig

Bases: DetectorConfig

LaTeX label/reference consistency detection settings.

LatexCaptionCompletenessConfig

Bases: DetectorConfig

LaTeX figure/table caption completeness settings.

LatexBibliographyHygieneConfig

Bases: DetectorConfig

LaTeX bibliography hygiene detection settings.

LatexWidthAbstractionConfig

Bases: DetectorConfig

LaTeX hardcoded absolute length detection settings.

LatexSemanticMarkupConfig

Bases: DetectorConfig

LaTeX semantic markup preference detection settings.

LatexIncludeLoopConfig

Bases: DetectorConfig

LaTeX include loop detection settings.

LatexEncodingDeclarationConfig

Bases: DetectorConfig

LaTeX encoding declaration detection settings.

LatexUnusedPackagesConfig

Bases: DetectorConfig

LaTeX unused package detection settings.

GoErrorHandlingConfig

Bases: DetectorConfig

Go error-handling enforcement settings.

ATTRIBUTE DESCRIPTION
max_ignored_errors

Maximum _-discarded error returns.

TYPE: int

GoInterfaceSizeConfig

Bases: DetectorConfig

Go interface-size enforcement settings.

ATTRIBUTE DESCRIPTION
max_interface_methods

Maximum methods per interface.

TYPE: int

GoContextUsageConfig

Bases: DetectorConfig

Go context.Context propagation enforcement settings.

ATTRIBUTE DESCRIPTION
require_context

Require context.Context as first parameter.

TYPE: bool

GoDeferUsageConfig

Bases: DetectorConfig

Go defer usage enforcement settings.

ATTRIBUTE DESCRIPTION
detect_defer_in_loop

Flag defer inside loops.

TYPE: bool

detect_missing_defer

Flag resource opens without matching defer.

TYPE: bool

GoNamingConventionConfig

Bases: DetectorConfig

Go naming-convention enforcement settings.

ATTRIBUTE DESCRIPTION
detect_long_names

Flag overly long identifier names.

TYPE: bool

GoInterfaceReturnConfig

Bases: DetectorConfig

Go accept-interfaces-return-structs enforcement settings.

GoZeroValueConfig

Bases: DetectorConfig

Go zero-value initialization enforcement settings.

GoInterfacePointerConfig

Bases: DetectorConfig

Go interface-pointer avoidance settings.

GoGoroutineLeakConfig

Bases: DetectorConfig

Go goroutine-leak detection settings.

GoPackageNamingConfig

Bases: DetectorConfig

Go package-naming convention enforcement settings.

GoPackageStateConfig

Bases: DetectorConfig

Go package-level state avoidance settings.

GoInitUsageConfig

Bases: DetectorConfig

Go init() function usage detection settings.

GoSinglePurposePackageConfig

Bases: DetectorConfig

Go single-purpose package naming enforcement settings.

GoEarlyReturnConfig

Bases: DetectorConfig

Go early-return style enforcement settings.

GoEmbeddingDepthConfig

Bases: DetectorConfig

Go struct embedding depth enforcement settings.

ATTRIBUTE DESCRIPTION
max_embedding_depth

Maximum number of anonymously embedded types per struct.

TYPE: int

GoConcurrencyCallerConfig

Bases: DetectorConfig

Go concurrency-caller delegation enforcement settings.

GoSimplicityConfig

Bases: DetectorConfig

Go empty-interface avoidance settings.

GoTestPresenceConfig

Bases: DetectorConfig

Go test-presence enforcement settings.

GoBenchmarkConfig

Bases: DetectorConfig

Go benchmark-before-optimizing enforcement settings.

GoModerationConfig

Bases: DetectorConfig

Go goroutine moderation enforcement settings.

ATTRIBUTE DESCRIPTION
max_goroutine_spawns

Maximum go statements per file.

TYPE: int

GoMaintainabilityConfig

Bases: DetectorConfig

Go exported-function godoc enforcement settings.

RustUnwrapUsageConfig

Bases: DetectorConfig

Rust unwrap() avoidance settings.

ATTRIBUTE DESCRIPTION
max_unwraps

Maximum permitted unwrap() calls.

TYPE: int

RustUnsafeBlocksConfig

Bases: DetectorConfig

Rust unsafe block detection settings.

ATTRIBUTE DESCRIPTION
detect_unsafe_blocks

When True, flag unsafe blocks.

TYPE: bool

RustCloneOverheadConfig

Bases: DetectorConfig

Rust excessive .clone() detection settings.

ATTRIBUTE DESCRIPTION
max_clone_calls

Maximum permitted .clone() calls.

TYPE: int

RustErrorHandlingConfig

Bases: DetectorConfig

Rust error-handling enforcement settings.

ATTRIBUTE DESCRIPTION
detect_unhandled_results

Flag unhandled Result values.

TYPE: bool

max_panics

Maximum permitted panic! invocations.

TYPE: int

RustTypeSafetyConfig

Bases: DetectorConfig

Rust newtype/type-safety preference settings.

ATTRIBUTE DESCRIPTION
primitive_types

Primitive types that should be wrapped in newtypes.

TYPE: list[str]

RustIteratorPreferenceConfig

Bases: DetectorConfig

Rust iterator-over-loop preference settings.

ATTRIBUTE DESCRIPTION
max_loops

Maximum for/while loops before suggesting iterators.

TYPE: int

RustMustUseConfig

Bases: DetectorConfig

Rust #[must_use] attribute enforcement settings.

RustDebugDeriveConfig

Bases: DetectorConfig

Rust #[derive(Debug)] enforcement settings.

RustNewtypePatternConfig

Bases: DetectorConfig

Rust newtype-pattern enforcement settings.

ATTRIBUTE DESCRIPTION
primitive_types

Types that should be wrapped as newtypes.

TYPE: list[str]

RustStdTraitsConfig

Bases: DetectorConfig

Rust standard-trait implementation enforcement settings.

RustEnumOverBoolConfig

Bases: DetectorConfig

Rust enum-over-boolean preference settings.

ATTRIBUTE DESCRIPTION
max_bool_fields

Maximum bool struct fields before suggesting an enum.

TYPE: int

RustLifetimeUsageConfig

Bases: DetectorConfig

Rust explicit-lifetime minimization settings.

ATTRIBUTE DESCRIPTION
max_explicit_lifetimes

Maximum explicit lifetime annotations.

TYPE: int

RustInteriorMutabilityConfig

Bases: DetectorConfig

Rust interior-mutability (RefCell/Cell) detection settings.

RustSendSyncConfig

Bases: DetectorConfig

Rust unsafe Send/Sync implementation detection settings.

RustErrorTraitsConfig

Bases: DetectorConfig

Rust error-type trait implementation enforcement settings.

RustNamingConfig

Bases: DetectorConfig

Rust naming convention (RFC 430) enforcement settings.

RustDefaultImplConfig

Bases: DetectorConfig

Rust Default trait implementation detection settings.

RustFromIntoConfig

Bases: DetectorConfig

Rust From/Into trait conversion enforcement settings.

Bash006Config

Bases: DetectorConfig

Bash script-length-without-functions enforcement settings.

ATTRIBUTE DESCRIPTION
max_script_length_without_functions

Maximum line count before requiring function decomposition.

TYPE: int | None

Bash011Config

Bases: DetectorConfig

Bash minimum variable-name-length enforcement settings.

ATTRIBUTE DESCRIPTION
min_variable_name_length

Shortest acceptable variable name.

TYPE: int | None

Js009Config

Bases: DetectorConfig

JavaScript class inheritance-depth enforcement settings.

ATTRIBUTE DESCRIPTION
max_inheritance_depth

Maximum allowed extends chain depth.

TYPE: int | None

Js011Config

Bases: DetectorConfig

JavaScript minimum identifier-length enforcement settings.

ATTRIBUTE DESCRIPTION
min_identifier_length

Shortest acceptable identifier name.

TYPE: int | None

JsDestructuringConfig

Bases: DetectorConfig

JavaScript destructuring preference enforcement settings.

JsObjectSpreadConfig

Bases: DetectorConfig

JavaScript object-spread preference over Object.assign settings.

JsNoWithConfig

Bases: DetectorConfig

JavaScript with statement prohibition settings.

JsParamCountConfig

Bases: DetectorConfig

JavaScript function parameter-count enforcement settings.

JsNoEvalConfig

Bases: DetectorConfig

JavaScript eval and new Function prohibition settings.

JsNoArgumentsConfig

Bases: DetectorConfig

JavaScript arguments object prohibition settings.

JsNoPrototypeMutationConfig

Bases: DetectorConfig

JavaScript built-in prototype mutation prohibition settings.

Cs008Config

Bases: DetectorConfig

C# public/private naming-convention enforcement settings.

ATTRIBUTE DESCRIPTION
public_naming

Expected naming style for public members.

TYPE: str | None

private_naming

Expected naming style for private members.

TYPE: str | None

GitHubActionsWorkflowConfig

Bases: DetectorConfig

GitHub Actions workflow composite detector settings.

SqlSelectStarConfig

Bases: DetectorConfig

SQL select-star detector settings.

SqlInsertColumnListConfig

Bases: DetectorConfig

SQL insert-without-column-list detector settings.

SqlDynamicSqlConfig

Bases: DetectorConfig

SQL dynamic concatenation detector settings.

SqlNolockConfig

Bases: DetectorConfig

SQL NOLOCK usage detector settings.

SqlImplicitJoinCoercionConfig

Bases: DetectorConfig

SQL join coercion detector settings.

SqlUnboundedQueryConfig

Bases: DetectorConfig

SQL unbounded select detector settings.

SqlAliasClarityConfig

Bases: DetectorConfig

SQL alias readability detector settings.

SqlTransactionBoundaryConfig

Bases: DetectorConfig

SQL transaction balance detector settings.

SqlAnsi89JoinConfig

Bases: DetectorConfig

SQL ANSI-89 comma-join detector settings.

PythonComplexUndocumentedConfig

Bases: DetectorConfig

Complex undocumented function detection settings.

PythonExplicitSilenceConfig

Bases: DetectorConfig

Bare except and silent catch detection settings.

PythonIdiomConfig

Bases: DetectorConfig

Non-idiomatic Python pattern detection settings.

PythonPracticalityConfig

Bases: DetectorConfig

Over-engineered abstraction detection settings.

PythonPrematureImplConfig

Bases: DetectorConfig

Premature NotImplementedError detection settings.

PythonSimpleDocumentedConfig

Bases: DetectorConfig

Public undocumented function detection settings.

PythonTodoStubConfig

Bases: DetectorConfig

TODO/FIXME/HACK/XXX comment detection settings.