{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$comment": "https://docs.codeclimate.com/docs/advanced-configuration",
  "definitions": {
    "enabled": {
      "type": "object",
      "properties": {
        "enabled": {
          "title": "Enabled",
          "type": "boolean",
          "default": true
        }
      }
    },
    "config": {
      "title": "Config",
      "type": "object"
    },
    "threshold": {
      "title": "Threshold",
      "type": ["integer", "null"]
    }
  },
  "description": "Configuration file as an alternative for configuring your repository in the settings page.",
  "id": "https://json.schemastore.org/codeclimate.json",
  "properties": {
    "version": {
      "title": "Version",
      "description": "Required to adjust maintainability checks.",
      "type": "string",
      "default": "2"
    },
    "prepare": {
      "title": "Prepare",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "title": "URL",
            "type": "string",
            "format": "uri"
          },
          "path": {
            "title": "Path",
            "type": "string"
          }
        }
      }
    },
    "checks": {
      "title": "Checks",
      "type": "object",
      "properties": {
        "argument-count": {
          "$ref": "#/definitions/enabled",
          "title": "Argument Count",
          "properties": {
            "config": {
              "$ref": "#/definitions/config",
              "properties": {
                "threshold": {
                  "$ref": "#/definitions/threshold",
                  "default": 4
                }
              }
            }
          }
        },
        "complex-logic": {
          "$ref": "#/definitions/enabled",
          "title": "Complex Logic",
          "properties": {
            "config": {
              "$ref": "#/definitions/config",
              "properties": {
                "threshold": {
                  "$ref": "#/definitions/threshold",
                  "default": 4
                }
              }
            }
          }
        },
        "file-lines": {
          "$ref": "#/definitions/enabled",
          "title": "File Lines",
          "properties": {
            "config": {
              "$ref": "#/definitions/config",
              "properties": {
                "threshold": {
                  "$ref": "#/definitions/threshold",
                  "default": 250
                }
              }
            }
          }
        },
        "method-complexity": {
          "$ref": "#/definitions/enabled",
          "title": "Method Complexity",
          "properties": {
            "config": {
              "$ref": "#/definitions/config",
              "properties": {
                "threshold": {
                  "$ref": "#/definitions/threshold",
                  "default": 5
                }
              }
            }
          }
        },
        "method-count": {
          "$ref": "#/definitions/enabled",
          "title": "Method Count",
          "properties": {
            "config": {
              "$ref": "#/definitions/config",
              "properties": {
                "threshold": {
                  "$ref": "#/definitions/threshold",
                  "default": 20
                }
              }
            }
          }
        },
        "method-lines": {
          "$ref": "#/definitions/enabled",
          "title": "Method Lines",
          "properties": {
            "config": {
              "$ref": "#/definitions/config",
              "properties": {
                "threshold": {
                  "$ref": "#/definitions/threshold",
                  "default": 25
                }
              }
            }
          }
        },
        "nested-control-flow": {
          "$ref": "#/definitions/enabled",
          "title": "Nested Control Flow",
          "properties": {
            "config": {
              "$ref": "#/definitions/config",
              "properties": {
                "threshold": {
                  "$ref": "#/definitions/threshold",
                  "default": 4
                }
              }
            }
          }
        },
        "return-statements": {
          "$ref": "#/definitions/enabled",
          "title": "Return Statements",
          "properties": {
            "config": {
              "$ref": "#/definitions/config",
              "properties": {
                "threshold": {
                  "$ref": "#/definitions/threshold",
                  "default": 4
                }
              }
            }
          }
        },
        "similar-code": {
          "$ref": "#/definitions/enabled",
          "title": "Similar Code",
          "properties": {
            "config": {
              "$ref": "#/definitions/config",
              "properties": {
                "threshold": {
                  "$ref": "#/definitions/threshold"
                }
              }
            }
          }
        },
        "identical-code": {
          "$ref": "#/definitions/enabled",
          "title": "Identical Code",
          "properties": {
            "config": {
              "$ref": "#/definitions/config",
              "properties": {
                "threshold": {
                  "$ref": "#/definitions/threshold"
                }
              }
            }
          }
        }
      }
    },
    "plugins": {
      "title": "Plugins",
      "description": "To add a plugin to your analysis. You can find the complete list of available plugins here: https://docs.codeclimate.com/docs/list-of-engines",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/enabled"
      }
    },
    "exclude_patterns": {
      "title": "Exclude Patterns",
      "type": "array",
      "items": {
        "title": "Exclude Pattern",
        "type": "string"
      }
    }
  },
  "title": "Code Climate Configuration",
  "type": "object"
}
