Skip to content

Commit

Permalink
Fix linting issues by excluding tests and fake server
Browse files Browse the repository at this point in the history
  • Loading branch information
afritzler committed Oct 28, 2024
1 parent 4d0c4b4 commit 109222f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ linters-settings:
alias: ${1}client

issues:
# exclude copylocks issues in fake servers and unit tests
exclude-files:
- iri/testing/volume/fake.go
- iri/testing/bucket/fake.go
- iri/testing/machine/fake.go
- poollet/machinepoollet/controllers/machine_controller_test.go
# don't skip warning about doc comments
# don't exclude the default set of lint
exclude-use-default: false
Expand Down
4 changes: 2 additions & 2 deletions broker/machinebroker/cmd/machinebroker/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func Run(ctx context.Context, opts Options) error {

g, ctx := errgroup.WithContext(ctx)
g.Go(func() error {
return runServer(ctx, setupLog, log, srv)
return runServer(ctx, setupLog, srv)
})
g.Go(func() error {
return runGRPCServer(ctx, setupLog, log, srv, opts)
Expand All @@ -133,7 +133,7 @@ func Run(ctx context.Context, opts Options) error {
return g.Wait()
}

func runServer(ctx context.Context, setupLog, _ logr.Logger, srv *server.Server) error {
func runServer(ctx context.Context, setupLog logr.Logger, srv *server.Server) error {
setupLog.V(1).Info("Starting server loops")
if err := srv.Start(ctx); err != nil {
return fmt.Errorf("error starting server loops: %w", err)
Expand Down
2 changes: 0 additions & 2 deletions hack/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@
package hack

import (
// Use gogoproto for protobuf generation.
_ "github.com/gogo/protobuf/gogoproto"
_ "k8s.io/code-generator"
)

0 comments on commit 109222f

Please sign in to comment.