Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Nov 15, 2024
1 parent cb0a10f commit 6457078
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions go-runtime/compile/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,10 @@ func scaffoldBuildTemplateAndTidy(ctx context.Context, config moduleconfig.AbsMo
if err := exec.Command(wgctx, log.Debug, config.Dir, "go", "fmt", ftlTypesFilename).RunStderrError(wgctx); err != nil {
return fmt.Errorf("%s: failed to format module dir: %w", config.Dir, err)
}
return filesTransaction.ModifiedFiles(filepath.Join(config.Dir, "go.mod"), filepath.Join(config.Dir, "go.sum"), filepath.Join(config.Dir, ftlTypesFilename))
if err := filesTransaction.ModifiedFiles(filepath.Join(config.Dir, "go.mod"), filepath.Join(config.Dir, "go.sum"), filepath.Join(config.Dir, ftlTypesFilename)); err != nil {
return fmt.Errorf("could not files as modified after tidying module package: %w", err)
}
return nil
})
wg.Go(func() error {
if !mainModuleCtxChanged {
Expand All @@ -537,9 +540,12 @@ func scaffoldBuildTemplateAndTidy(ctx context.Context, config moduleconfig.AbsMo
if err := exec.Command(wgctx, log.Debug, mainDir, "go", "fmt", "./...").RunStderrError(wgctx); err != nil {
return fmt.Errorf("%s: failed to format main dir: %w", mainDir, err)
}
return filesTransaction.ModifiedFiles(filepath.Join(mainDir, "go.mod"), filepath.Join(mainDir, "go.sum"))
if err := filesTransaction.ModifiedFiles(filepath.Join(mainDir, "go.mod"), filepath.Join(mainDir, "go.sum")); err != nil {
return fmt.Errorf("could not files as modified after tidying main package: %w", err)
}
return nil
})
return wg.Wait()
return wg.Wait() //nolint:wrapcheck
}

type mainModuleContextBuilder struct {
Expand Down

0 comments on commit 6457078

Please sign in to comment.