{
  "$defs": {
    "CloneDetectionConfig": {
      "additionalProperties": false,
      "properties": {
        "min_lines": {
          "default": 3,
          "title": "Min Lines",
          "type": "integer"
        },
        "min_duplicates": {
          "default": 2,
          "title": "Min Duplicates",
          "type": "integer"
        },
        "identical_clones_only": {
          "default": false,
          "title": "Identical Clones Only",
          "type": "boolean"
        }
      },
      "title": "CloneDetectionConfig",
      "type": "object"
    },
    "CodingAssistantConfig": {
      "additionalProperties": false,
      "properties": {
        "project_description": {
          "default": "",
          "title": "Project Description",
          "type": "string"
        },
        "enabled": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": true,
          "title": "Enabled"
        },
        "recipe_prompts": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Recipe Prompts",
          "type": "object"
        }
      },
      "title": "CodingAssistantConfig",
      "type": "object"
    },
    "GitHubConfig": {
      "additionalProperties": false,
      "properties": {
        "labels": {
          "default": [],
          "items": {
            "type": "string"
          },
          "title": "Labels",
          "type": "array"
        },
        "ignore_labels": {
          "default": [
            "sourcery-ignore"
          ],
          "items": {
            "type": "string"
          },
          "title": "Ignore Labels",
          "type": "array"
        },
        "request_review": {
          "$ref": "#/$defs/RequestReview",
          "default": "author"
        },
        "sourcery_branch": {
          "default": "sourcery-dev/{base_branch}",
          "title": "Sourcery Branch",
          "type": "string"
        }
      },
      "title": "GitHubConfig",
      "type": "object"
    },
    "MatchRuleTestConfig": {
      "additionalProperties": false,
      "properties": {
        "match": {
          "title": "Match",
          "type": "string"
        },
        "expect": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Expect"
        }
      },
      "required": [
        "match"
      ],
      "title": "MatchRuleTestConfig",
      "type": "object"
    },
    "MetricsConfig": {
      "additionalProperties": false,
      "properties": {
        "quality_threshold": {
          "default": 25.0,
          "title": "Quality Threshold",
          "type": "number"
        }
      },
      "title": "MetricsConfig",
      "type": "object"
    },
    "NoMatchRuleTestConfig": {
      "additionalProperties": false,
      "properties": {
        "no-match": {
          "title": "No-Match",
          "type": "string"
        }
      },
      "required": [
        "no-match"
      ],
      "title": "NoMatchRuleTestConfig",
      "type": "object"
    },
    "PathsConfig": {
      "additionalProperties": false,
      "properties": {
        "include": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Exclude"
        }
      },
      "title": "PathsConfig",
      "type": "object"
    },
    "ProxyConfig": {
      "additionalProperties": false,
      "properties": {
        "url": {
          "anyOf": [
            {
              "format": "uri",
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Url"
        },
        "ssl_certs_file": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Ssl Certs File"
        },
        "no_ssl_verify": {
          "default": false,
          "title": "No Ssl Verify",
          "type": "boolean"
        }
      },
      "title": "ProxyConfig",
      "type": "object"
    },
    "RequestReview": {
      "additionalProperties": false,
      "properties": {
        "origin": {
          "$ref": "#/$defs/Reviewer",
          "default": ""
        },
        "forked": {
          "$ref": "#/$defs/Reviewer",
          "default": ""
        }
      },
      "title": "RequestReview",
      "type": "object"
    },
    "Reviewer": {
      "title": "Reviewer",
      "type": "string"
    },
    "RuleConfig": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "maxLength": 88,
          "pattern": "^[A-Za-z][A-Za-z0-9-_/:]*$",
          "rank": 10,
          "title": "Id",
          "type": "string"
        },
        "description": {
          "rank": 9,
          "title": "Description",
          "type": "string"
        },
        "pattern": {
          "rank": 8,
          "title": "Pattern",
          "type": "string"
        },
        "language": {
          "anyOf": [
            {
              "$ref": "#/$defs/RuleLanguage"
            },
            {
              "type": "null"
            }
          ],
          "default": "python",
          "rank": 7
        },
        "replacement": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Replacement"
        },
        "condition": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Condition"
        },
        "explanation": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Explanation"
        },
        "paths": {
          "anyOf": [
            {
              "$ref": "#/$defs/PathsConfig"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "tests": {
          "default": [],
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/MatchRuleTestConfig"
              },
              {
                "$ref": "#/$defs/NoMatchRuleTestConfig"
              }
            ]
          },
          "title": "Tests",
          "type": "array"
        },
        "tags": {
          "default": [],
          "items": {
            "maxLength": 88,
            "pattern": "^[A-Za-z][A-Za-z0-9-_/:]*$",
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        }
      },
      "required": [
        "id",
        "description",
        "pattern"
      ],
      "title": "RuleConfig",
      "type": "object"
    },
    "RuleLanguage": {
      "enum": [
        "python",
        "java",
        "javascript",
        "typescript"
      ],
      "title": "RuleLanguage",
      "type": "string"
    },
    "RuleSettingsConfig": {
      "additionalProperties": false,
      "properties": {
        "enable": {
          "default": [
            "default"
          ],
          "items": {
            "type": "string"
          },
          "title": "Enable",
          "type": "array"
        },
        "disable": {
          "default": [],
          "description": "A list of rule IDs Sourcery will never suggest.",
          "items": {
            "type": "string"
          },
          "title": "Disable",
          "type": "array"
        },
        "include": {
          "default": null,
          "deprecated": true,
          "items": {
            "type": "string"
          },
          "new_field": "enable",
          "title": "Include",
          "type": "array"
        },
        "skip": {
          "default": null,
          "deprecated": true,
          "items": {
            "type": "string"
          },
          "new_field": "disable",
          "title": "Skip",
          "type": "array"
        },
        "rule_types": {
          "default": [
            "refactoring",
            "suggestion",
            "comment"
          ],
          "items": {
            "$ref": "#/$defs/RuleType"
          },
          "title": "Rule Types",
          "type": "array"
        },
        "python_version": {
          "choices": [
            {
              "type": "none"
            },
            {
              "type": "str"
            },
            {
              "properties": {
                "major": {
                  "title": "Major",
                  "type": "integer"
                },
                "minor": {
                  "title": "Minor",
                  "type": "integer"
                }
              },
              "required": [
                "major",
                "minor"
              ],
              "title": "PythonVersion",
              "type": "object"
            }
          ],
          "default": null,
          "description": "A string specifying the lowest Python version your project supports. Sourcery will not suggest refactorings requiring a higher Python version.",
          "type": "union"
        }
      },
      "title": "RuleSettingsConfig",
      "type": "object"
    },
    "RuleType": {
      "enum": [
        "refactoring",
        "suggestion",
        "comment",
        "hover"
      ],
      "title": "RuleType",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "properties": {
    "version": {
      "const": "1",
      "default": "1",
      "description": "The schema version of this config file",
      "enum": [
        "1"
      ],
      "rank": 11,
      "title": "Version",
      "type": "string"
    },
    "ignore": {
      "default": [
        ".git",
        "env",
        ".env",
        ".tox",
        "node_modules",
        "vendor",
        "venv",
        ".venv",
        "~/.pyenv",
        "~/.rye",
        "~/.vscode",
        ".vscode",
        "~/.cache",
        "~/.config",
        "~/.local"
      ],
      "description": "A list of paths or files which Sourcery will ignore.",
      "items": {
        "type": "string"
      },
      "rank": 10,
      "title": "Ignore",
      "type": "array"
    },
    "rule_settings": {
      "$ref": "#/$defs/RuleSettingsConfig",
      "default": {
        "enable": [
          "default"
        ],
        "disable": [],
        "rule_types": [
          "refactoring",
          "suggestion",
          "comment"
        ],
        "python_version": null,
        "allow_adding_imports": false
      },
      "rank": 9
    },
    "refactor": {
      "$ref": "#/$defs/RuleSettingsConfig",
      "default": {
        "enable": [
          "default"
        ],
        "disable": [],
        "rule_types": [
          "refactoring",
          "suggestion",
          "comment"
        ],
        "python_version": null,
        "allow_adding_imports": false
      },
      "deprecated": true,
      "new_field": "rule_settings"
    },
    "rules": {
      "default": [],
      "description": "A list of custom rules Sourcery will include in its analysis.",
      "items": {
        "$ref": "#/$defs/RuleConfig"
      },
      "title": "Rules",
      "type": "array"
    },
    "rule_tags": {
      "additionalProperties": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "default": {},
      "description": "Additional rule tags.",
      "title": "Rule Tags",
      "type": "object"
    },
    "metrics": {
      "$ref": "#/$defs/MetricsConfig",
      "default": {
        "quality_threshold": 25.0
      }
    },
    "github": {
      "$ref": "#/$defs/GitHubConfig",
      "default": {
        "labels": [],
        "ignore_labels": [
          "sourcery-ignore"
        ],
        "request_review": "author",
        "sourcery_branch": "sourcery-dev/{base_branch}"
      }
    },
    "clone_detection": {
      "$ref": "#/$defs/CloneDetectionConfig",
      "default": {
        "min_lines": 3,
        "min_duplicates": 2,
        "identical_clones_only": false
      }
    },
    "proxy": {
      "$ref": "#/$defs/ProxyConfig",
      "default": {
        "url": null,
        "ssl_certs_file": null,
        "no_ssl_verify": false
      }
    },
    "coding_assistant": {
      "$ref": "#/$defs/CodingAssistantConfig",
      "default": {
        "project_description": "",
        "enabled": true,
        "recipe_prompts": {}
      }
    }
  },
  "title": "SourceryConfig",
  "type": "object"
}
