(t *testing.T, repo, relPath, content string)
| 29 | } |
| 30 | |
| 31 | func writeRulesCheckTestFile(t *testing.T, repo, relPath, content string) { |
| 32 | t.Helper() |
| 33 | full := filepath.Join(repo, relPath) |
| 34 | if err := os.MkdirAll(filepath.Dir(full), 0o755); err != nil { |
| 35 | t.Fatal(err) |
| 36 | } |
| 37 | if err := os.WriteFile(full, []byte(content), 0o644); err != nil { |
| 38 | t.Fatal(err) |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | // setRulesCheckRepo points the rulesCheckCmd's package-level --repo flag at |
| 43 | // repo for the duration of the test, restoring it afterward. runRulesCheck |
no outgoing calls
no test coverage detected