MCPcopy Create free account
hub / github.com/alibaba/open-code-review / writeFile

Function writeFile

internal/scan/provider_test.go:105–114  ·  view source on GitHub ↗
(t *testing.T, root, rel string, content []byte)

Source from the content-addressed store, hash-verified

103}
104
105func writeFile(t *testing.T, root, rel string, content []byte) {
106 t.Helper()
107 full := filepath.Join(root, rel)
108 if err := os.MkdirAll(filepath.Dir(full), 0o755); err != nil {
109 t.Fatalf("mkdir: %v", err)
110 }
111 if err := os.WriteFile(full, content, 0o644); err != nil {
112 t.Fatalf("write %s: %v", rel, err)
113 }
114}
115
116func gitCommit(t *testing.T, repo, msg string) {
117 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected