{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "stack": "csharp",
  "description": "C# test gap rules. Sources in *.cs; tests sit in a sibling project named *.Tests or *Tests with a Tests or Test suffix on the class file.",
  "sourceExtensions": [".cs"],
  "testPathSuffixes": ["Tests.cs", "Test.cs"],
  "testPathContains": [".Tests/", "Tests/", ".Test/"],
  "excludePathGlobs": ["bin/", "obj/", "*.g.cs", "*.Designer.cs", "*.generated.cs", "Migrations/"],
  "publicApiPatterns": [
    {
      "id": "public_type",
      "regex": "\\bpublic\\s+(?:static\\s+|abstract\\s+|sealed\\s+|partial\\s+)*(?:class|interface|struct|enum|record)\\s+([A-Z][A-Za-z0-9_]*)"
    },
    {
      "id": "public_method",
      "regex": "\\bpublic\\s+(?:static\\s+|virtual\\s+|override\\s+|async\\s+)*[\\w<>\\[\\],.? ]+\\s+([A-Z][A-Za-z0-9_]*)\\s*\\("
    }
  ],
  "hint": "Cover public types and methods with a test class named <Type>Tests in the matching test project."
}
