We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a62fd5a commit c160d36Copy full SHA for c160d36
tools/flakeguard/golang/golang.go
@@ -291,7 +291,10 @@ func SkipTests(repoPath string, testsToSkip []*SkipTest) error {
291
292
// Write back the file
293
var out strings.Builder
294
- if err := printer.Fprint(&out, fset, fileAst); err != nil {
+ customPrint := printer.Config{
295
+ Mode: printer.RawFormat, // Stop go from messing with whitespace when printing out the file (messes with git diff, not the place to do this)
296
+ }
297
+ if err := customPrint.Fprint(&out, fset, fileAst); err != nil {
298
return fmt.Errorf("error printing file '%s': %w", path, err)
299
}
300
if err := os.WriteFile(path, []byte(out.String()), 0644); err != nil {
0 commit comments