{
  "$schema": "./schema.json",
  "version": 2,
  "axioms": {
    "linguist": "language",
    "licensee": "license",
    "packagers": "packager"
  },
  "rules": {
    "license-file-exists": {
      "level": "error",
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["LICENSE*", "COPYING*"],
          "nocase": true
        }
      }
    },
    "readme-file-exists": {
      "level": "error",
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["README*"],
          "nocase": true
        }
      }
    },
    "contributing-file-exists": {
      "level": "error",
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["{docs/,.github/,}CONTRIB*"],
          "nocase": true
        }
      }
    },
    "code-of-conduct-file-exists": {
      "level": "error",
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": [
            "{docs/,.github/,}CODEOFCONDUCT*",
            "{docs/,.github/,}CODE-OF-CONDUCT*",
            "{docs/,.github/,}CODE_OF_CONDUCT*"
          ],
          "nocase": true
        }
      }
    },
    "changelog-file-exists": {
      "level": "error",
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["CHANGELOG*"],
          "nocase": true
        }
      }
    },
    "security-file-exists": {
      "level": "error",
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["{docs/,.github/,}SECURITY.md"]
        }
      }
    },
    "support-file-exists": {
      "level": "error",
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["{docs/,.github/,}SUPPORT*"],
          "nocase": true
        }
      }
    },
    "readme-references-license": {
      "level": "error",
      "rule": {
        "type": "file-contents",
        "options": {
          "globsAll": ["README*"],
          "content": "license",
          "flags": "i"
        }
      }
    },
    "binaries-not-present": {
      "level": "error",
      "rule": {
        "type": "file-type-exclusion",
        "options": {
          "type": ["**/*.exe", "**/*.dll", "!node_modules/**"]
        }
      }
    },
    "test-directory-exists": {
      "level": "error",
      "rule": {
        "type": "directory-existence",
        "options": {
          "globsAny": ["**/test*", "**/specs"],
          "nocase": true
        }
      }
    },
    "integrates-with-ci": {
      "level": "error",
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": [
            ".gitlab-ci.yml",
            ".travis.yml",
            "appveyor.yml",
            ".appveyor.yml",
            "circle.yml",
            ".circleci/config.yml",
            "Jenkinsfile",
            ".drone.yml",
            ".github/workflows/*",
            "azure-pipelines.yml"
          ]
        }
      }
    },
    "code-of-conduct-file-contains-email": {
      "level": "error",
      "rule": {
        "type": "file-contents",
        "options": {
          "globsAll": [
            "CODEOFCONDUCT*",
            "CODE-OF-CONDUCT*",
            "CODE_OF_CONDUCT*",
            ".github/CODEOFCONDUCT*",
            ".github/CODE-OF-CONDUCT*",
            ".github/CODE_OF_CONDUCT*"
          ],
          "content": ".+@.+\\..+",
          "flags": "i",
          "human-readable-content": "email address"
        }
      }
    },
    "source-license-headers-exist": {
      "level": "warning",
      "rule": {
        "type": "file-starts-with",
        "options": {
          "globsAll": ["**/*.js", "!node_modules/**"],
          "lineCount": 5,
          "patterns": ["Copyright", "License"],
          "flags": "i"
        }
      }
    },
    "github-issue-template-exists": {
      "level": "error",
      "rule": {
        "type": "file-existence",
        "options": {
          "dirs": true,
          "globsAny": ["ISSUE_TEMPLATE*", ".github/ISSUE_TEMPLATE*"]
        }
      }
    },
    "github-pull-request-template-exists": {
      "level": "error",
      "rule": {
        "type": "file-existence",
        "options": {
          "dirs": true,
          "globsAny": [
            "PULL_REQUEST_TEMPLATE*",
            ".github/PULL_REQUEST_TEMPLATE*",
            ".github/pull_request_template.md",
            "docs/pull_request_template.md",
            "docs/PULL_REQUEST_TEMPLATE*",
            "pull_request_template.md"
          ]
        }
      }
    },
    "javascript-package-metadata-exists": {
      "level": "error",
      "where": ["language=javascript"],
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["package.json"]
        }
      }
    },
    "ruby-package-metadata-exists": {
      "level": "error",
      "where": ["language=ruby"],
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["Gemfile"]
        }
      }
    },
    "java-package-metadata-exists": {
      "level": "error",
      "where": ["language=java"],
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["pom.xml", "build.xml", "build.gradle"]
        }
      }
    },
    "python-package-metadata-exists": {
      "level": "error",
      "where": ["language=python"],
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["setup.py", "requirements.txt"]
        }
      }
    },
    "objective-c-package-metadata-exists": {
      "level": "error",
      "where": ["language=objective-c"],
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["Cartfile", "Podfile", "*.podspec"]
        }
      }
    },
    "swift-package-metadata-exists": {
      "level": "error",
      "where": ["language=swift"],
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["Package.swift"]
        }
      }
    },
    "erlang-package-metadata-exists": {
      "level": "error",
      "where": ["language=erlang"],
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["rebar.config"]
        }
      }
    },
    "elixir-package-metadata-exists": {
      "level": "error",
      "where": ["language=elixir"],
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["mix.exs"]
        }
      }
    },
    "license-detectable-by-licensee": {
      "level": "off",
      "where": ["license=*"],
      "rule": {
        "type": "license-detectable-by-licensee",
        "options": {}
      }
    },
    "notice-file-exists": {
      "level": "error",
      "where": ["license=Apache-2.0"],
      "rule": {
        "type": "file-existence",
        "options": {
          "globsAny": ["NOTICE*"],
          "fail-message": "The NOTICE file is described in section 4.4 of the Apache License version 2.0. Its presence is not mandated by the license itself, but by ASF policy."
        }
      }
    },
    "best-practices-badge-present": {
      "level": "off",
      "rule": {
        "type": "best-practices-badge-present"
      }
    }
  }
}
