{
  "$comment": "https://www.bettercodehub.com/docs/configuration-manual",
  "$id": "https://json.schemastore.org/bettercodehub.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "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": {
                "title": "Name",
                "$ref": "#/definitions/supportedProgrammingLanguage"
              },
              "production": {
                "title": "Production",
                "$ref": "#/definitions/fileFilter"
              },
              "test": {
                "title": "Test",
                "$ref": "#/definitions/fileFilter"
              }
            }
          }
        ]
      }
    },
    "exclude": {
      "$ref": "#/definitions/excludeFileFilter"
    }
  },
  "title": "Better Code Hub",
  "type": "object"
}