{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/better-code-hub/latest.json",
  "title": "Better Code Hub",
  "description": "Configuration file for Better Code Hub to override the default configuration.",
  "x-lintel": {
    "source": "https://www.schemastore.org/bettercodehub.json",
    "sourceSha256": "0c09d70d0f8492e60311bb4fd64000fcb7fd3edc4ebbc61f03010536a412aa22",
    "fileMatch": [
      ".bettercodehub.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "component_depth": {
      "title": "Component Depth",
      "type": "integer",
      "default": 1
    },
    "languages": {
      "title": "Languages",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/supportedProgrammingLanguage"
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/$defs/supportedProgrammingLanguage",
                "title": "Name"
              },
              "production": {
                "$ref": "#/$defs/fileFilter",
                "title": "Production"
              },
              "test": {
                "$ref": "#/$defs/fileFilter",
                "title": "Test"
              }
            },
            "additionalProperties": false
          }
        ]
      }
    },
    "exclude": {
      "$ref": "#/$defs/excludeFileFilter"
    }
  },
  "$defs": {
    "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",
      "properties": {
        "include": {
          "title": "Include",
          "type": "array",
          "items": {
            "title": "Pattern",
            "description": "A regular expression for the path(s) to include.",
            "type": "string"
          }
        },
        "exclude": {
          "$ref": "#/$defs/excludeFileFilter"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false,
  "$comment": "https://www.bettercodehub.com/docs/configuration-manual"
}
