INNER CODE UNIT · Go

processFile

wundergraph/graphql-go-tools · v2/pkg/astvalidation/reference/main.go:106

func processFile(workingDir string, filename string, replacements Replacements) {
	fPath := filepath.Join(workingDir, filename)
	fileContent, _ := os.ReadFile(fPath)

	testName := strings.TrimSuffix(strings.Split(filepath.Base(filename), ".")[0], "-test")

	if skipRule(testName) {
		return
	}

	content := string(fileContent)
	for _, replacement := range replacements.ReplaceForRule(testName) {
		content = replacement.Do(content)
	}

	converter := &Converter{}
	result := converter.iterateLines(testName, content)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…