{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "stack": "go",
  "description": "Go test gap rules. Sources in *.go; tests are *_test.go beside the code they cover, which is why there is no test directory convention here.",
  "sourceExtensions": [".go"],
  "testPathSuffixes": ["_test.go"],
  "testPathContains": [],
  "excludePathGlobs": ["vendor/", "third_party/", "*.pb.go", "*_generated.go", "*_mock.go"],
  "publicApiPatterns": [
    {
      "id": "exported_func",
      "regex": "^func\\s+([A-Z][A-Za-z0-9_]*)\\s*\\("
    },
    {
      "id": "exported_method",
      "regex": "^func\\s+\\([^)]*\\)\\s+([A-Z][A-Za-z0-9_]*)\\s*\\("
    },
    {
      "id": "exported_type",
      "regex": "^type\\s+([A-Z][A-Za-z0-9_]*)\\s+(?:struct|interface|func|map|\\[|chan|\\*|[A-Za-z])"
    }
  ],
  "hint": "Cover exported identifiers with a table-driven Test<Name> in the same package's <file>_test.go. An unexported identifier is covered through the exported one that calls it."
}
