swt 1.1.0

🍬 Sweet: A blazing-fast code health and architecture analyzer.
Documentation
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Config",
  "description": "Analyzer global configuration.",
  "type": "object",
  "properties": {
    "exclude": {
      "description": "Directory or file patterns excluded from analysis.",
      "type": "array",
      "default": [
        "node_modules",
        "vendor",
        "dist",
        "target",
        "__pycache__",
        "build",
        ".git"
      ],
      "items": {
        "type": "string"
      }
    },
    "thresholds": {
      "description": "Global and language-specific threshold settings.",
      "$ref": "#/$defs/ThresholdsConfig",
      "default": {
        "global": {
          "max_depth": 5,
          "max_imports": 20,
          "max_lines": 250,
          "max_repetition": 10.0
        },
        "overrides": {}
      }
    }
  },
  "$defs": {
    "PartialThresholds": {
      "description": "Subset of thresholds for language-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.\n\nFiles exceeding these limits are flagged as \"bitter\".",
      "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 statements.",
          "type": "integer",
          "format": "uint",
          "default": 20,
          "minimum": 0
        },
        "max_lines": {
          "description": "Maximum allowed source lines.",
          "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 including global defaults and language-specific overrides.",
      "type": "object",
      "properties": {
        "global": {
          "description": "Default thresholds for all supported files.",
          "$ref": "#/$defs/Thresholds",
          "default": {
            "max_depth": 5,
            "max_imports": 20,
            "max_lines": 250,
            "max_repetition": 10.0
          }
        },
        "overrides": {
          "description": "Overrides indexed by file extension (e.g., \"rs\", \"java\").",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/PartialThresholds"
          },
          "default": {}
        }
      }
    }
  }
}