swt 2.0.0

🍬 Sweet: A blazing-fast code health and architecture analyzer.
Documentation
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Config",
  "description": "Global analyzer configuration.",
  "type": "object",
  "properties": {
    "exclude": {
      "description": "Glob patterns for files/directories to exclude.",
      "type": "array",
      "default": [
        "node_modules",
        "vendor",
        "dist",
        "target",
        "__pycache__",
        "build",
        ".git"
      ],
      "items": {
        "type": "string"
      }
    },
    "thresholds": {
      "description": "Global and language-specific threshold overrides.",
      "$ref": "#/$defs/ThresholdsConfig",
      "default": {
        "global": {
          "max_depth": 5,
          "max_imports": 20,
          "max_lines": 250,
          "max_repetition": 10.0
        },
        "overrides": {}
      }
    },
    "ui": {
      "description": "Terminal UI settings.",
      "$ref": "#/$defs/UIConfig",
      "default": {
        "bitter_threshold": 400,
        "lemon_threshold": 200
      }
    }
  },
  "$defs": {
    "PartialThresholds": {
      "description": "Sparse threshold structure for specific overrides.",
      "type": "object",
      "properties": {
        "max_depth": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0
        },
        "max_imports": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0
        },
        "max_lines": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0
        },
        "max_repetition": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        }
      }
    },
    "Thresholds": {
      "description": "Defines health metric limits for analysis.",
      "type": "object",
      "properties": {
        "max_depth": {
          "description": "Maximum allowed control flow nesting depth.",
          "type": "integer",
          "format": "uint",
          "default": 5,
          "minimum": 0
        },
        "max_imports": {
          "description": "Maximum allowed import/dependency statements.",
          "type": "integer",
          "format": "uint",
          "default": 20,
          "minimum": 0
        },
        "max_lines": {
          "description": "Maximum allowed source lines of code.",
          "type": "integer",
          "format": "uint",
          "default": 250,
          "minimum": 0
        },
        "max_repetition": {
          "description": "Maximum allowed repetition percentage (0-100).",
          "type": "number",
          "format": "double",
          "default": 10.0
        }
      }
    },
    "ThresholdsConfig": {
      "description": "Threshold management container.",
      "type": "object",
      "properties": {
        "global": {
          "description": "Default thresholds for all files.",
          "$ref": "#/$defs/Thresholds",
          "default": {
            "max_depth": 5,
            "max_imports": 20,
            "max_lines": 250,
            "max_repetition": 10.0
          }
        },
        "overrides": {
          "description": "Language-specific overrides indexed by extension.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/PartialThresholds"
          },
          "default": {}
        }
      }
    },
    "UIConfig": {
      "description": "Visual feedback configuration for terminal reporting.",
      "type": "object",
      "properties": {
        "bitter_threshold": {
          "description": "Line threshold to trigger the 'bitter' error status.",
          "type": "integer",
          "format": "uint",
          "default": 400,
          "minimum": 0
        },
        "lemon_threshold": {
          "description": "Line threshold to trigger the 'lemon' warning.",
          "type": "integer",
          "format": "uint",
          "default": 200,
          "minimum": 0
        }
      }
    }
  }
}