{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/bettercodehub.json",
  "$comment": "https://www.bettercodehub.com/docs/configuration-manual",
  "additionalProperties": false,
  "definitions": {
    "supportedProgrammingLanguage": {
      "type": "string",
      "enum": [
        "csharp",
        "cpp",
        "go",
        "groovy",
        "java",
        "javascript",
        "objectivec",
        "perl",
        "php",
        "python",
        "ruby",
        "scala",
        "script",
        "solidity",
        "swift",
        "typescript",
        "kotlin"
      ]
    },
    "excludeFileFilter": {
      "title": "Exclude",
      "type": "array",
      "items": {
        "title": "Pattern",
        "description": "A regular expression for the path(s) to exclude.",
        "type": "string"
      }
    },
    "fileFilter": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "include": {
          "title": "Include",
          "type": "array",
          "items": {
            "title": "Pattern",
            "description": "A regular expression for the path(s) to include.",
            "type": "string"
          }
        },
        "exclude": {
          "$ref": "#/definitions/excludeFileFilter"
        }
      }
    }
  },
  "description": "Configuration file for Better Code Hub to override the default configuration.",
  "properties": {
    "component_depth": {
      "title": "Component Depth",
      "type": "integer",
      "default": 1
    },
    "languages": {
      "title": "Languages",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/definitions/supportedProgrammingLanguage"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "name": {
                "$ref": "#/definitions/supportedProgrammingLanguage",
                "title": "Name"
              },
              "production": {
                "$ref": "#/definitions/fileFilter",
                "title": "Production"
              },
              "test": {
                "$ref": "#/definitions/fileFilter",
                "title": "Test"
              }
            }
          }
        ]
      }
    },
    "exclude": {
      "$ref": "#/definitions/excludeFileFilter"
    }
  },
  "title": "Better Code Hub",
  "type": "object"
}
