INNER CODE UNIT · Go

TestTheRootHoldsFourDocuments

xo/usql · agents_test.go:39

func TestTheRootHoldsFourDocuments(t *testing.T) {
	t.Parallel()
	entries, err := os.ReadDir(".")
	if err != nil {
		t.Fatal(err)
	}
	allowed := map[string]bool{
		"README.md": true, "AGENTS.md": true, "CLAUDE.md": true, "CONTRIBUTING.md": true,
	}
	for _, e := range entries {
		if e.IsDir() || !strings.HasSuffix(e.Name(), ".md") {
			continue
		}
		if !allowed[e.Name()] {
			t.Errorf("%s is in the repository root. Only README, AGENTS, CLAUDE and"+
				" CONTRIBUTING belong there, and everything else goes in docs/. See D1.", e.Name())
		}
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…