INNER CODE UNIT · Go

skipRule

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

func skipRule(name string) bool {
	return !slices.Contains(convertRules, name)
}

// processFile - convert and save reference test file
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)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…