swt 3.2.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,
          "min_duplicate_lines": 4
        },
        "overrides": {
          "cs": null,
          "gd": null,
          "java": null,
          "js": null,
          "py": null,
          "rs": null,
          "ts": null
        }
      }
    }
  },
  "$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"
        },
        "min_duplicate_lines": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0
        }
      }
    },
    "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
        },
        "min_duplicate_lines": {
          "description": "Minimum identical lines to trigger repetition detection.",
          "type": "integer",
          "format": "uint",
          "default": 4,
          "minimum": 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,
            "min_duplicate_lines": 4
          }
        },
        "overrides": {
          "description": "Language-specific overrides.",
          "$ref": "#/$defs/ThresholdsOverrides",
          "default": {
            "cs": null,
            "gd": null,
            "java": null,
            "js": null,
            "py": null,
            "rs": null,
            "ts": null
          }
        }
      }
    },
    "ThresholdsOverrides": {
      "description": "Known and custom language overrides.",
      "type": "object",
      "properties": {
        "cs": {
          "description": "C# overrides (.cs)",
          "anyOf": [
            {
              "$ref": "#/$defs/PartialThresholds"
            },
            {
              "type": "null"
            }
          ]
        },
        "gd": {
          "description": "`GDScript` overrides (.gd)",
          "anyOf": [
            {
              "$ref": "#/$defs/PartialThresholds"
            },
            {
              "type": "null"
            }
          ]
        },
        "java": {
          "description": "Java overrides (.java)",
          "anyOf": [
            {
              "$ref": "#/$defs/PartialThresholds"
            },
            {
              "type": "null"
            }
          ]
        },
        "js": {
          "description": "JavaScript overrides (.js, .mjs, .cjs)",
          "anyOf": [
            {
              "$ref": "#/$defs/PartialThresholds"
            },
            {
              "type": "null"
            }
          ]
        },
        "py": {
          "description": "Python overrides (.py)",
          "anyOf": [
            {
              "$ref": "#/$defs/PartialThresholds"
            },
            {
              "type": "null"
            }
          ]
        },
        "rs": {
          "description": "Rust overrides (.rs)",
          "anyOf": [
            {
              "$ref": "#/$defs/PartialThresholds"
            },
            {
              "type": "null"
            }
          ]
        },
        "ts": {
          "description": "TypeScript overrides (.ts, .tsx)G",
          "anyOf": [
            {
              "$ref": "#/$defs/PartialThresholds"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": {
        "$ref": "#/$defs/PartialThresholds"
      }
    }
  }
}