Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed gofmt and golint issues and added the check in CI #126

Merged
merged 1 commit into from
May 26, 2020

Conversation

parauliya
Copy link
Contributor

@parauliya parauliya commented May 21, 2020

This PR has the following things
1. Fixed the goimports and golint issue in the current code.
2. Add check for goimports and golint issues in the CI pipeline

Copy link
Contributor

@mmlb mmlb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running goimports -w . I get:

~/go/src/github.com/tinkerbell/tink> git diff | e:cat
diff --git a/protos/hardware/hardware.pb.go b/protos/hardware/hardware.pb.go
index da25773..4f4b60e 100644
--- a/protos/hardware/hardware.pb.go
+++ b/protos/hardware/hardware.pb.go
@@ -6,11 +6,12 @@ package hardware
 import (
 	context "context"
 	fmt "fmt"
+	math "math"
+
 	proto "github.com/golang/protobuf/proto"
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
-	math "math"
 )
 
 // Reference imports to suppress errors if they are not otherwise used.
diff --git a/protos/template/template.pb.go b/protos/template/template.pb.go
index f793cb9..89a863c 100644
--- a/protos/template/template.pb.go
+++ b/protos/template/template.pb.go
@@ -6,12 +6,13 @@ package template
 import (
 	context "context"
 	fmt "fmt"
+	math "math"
+
 	proto "github.com/golang/protobuf/proto"
 	timestamp "github.com/golang/protobuf/ptypes/timestamp"
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
-	math "math"
 )
 
 // Reference imports to suppress errors if they are not otherwise used.
diff --git a/protos/workflow/workflow.pb.go b/protos/workflow/workflow.pb.go
index ec89a58..b5db11a 100644
--- a/protos/workflow/workflow.pb.go
+++ b/protos/workflow/workflow.pb.go
@@ -6,12 +6,13 @@ package workflow
 import (
 	context "context"
 	fmt "fmt"
+	math "math"
+
 	proto "github.com/golang/protobuf/proto"
 	timestamp "github.com/golang/protobuf/ptypes/timestamp"
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
-	math "math"
 )

cmd/tink-worker/worker.go Outdated Show resolved Hide resolved
client/main.go Outdated Show resolved Hide resolved
test/framework/worker.go Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@mmlb
Copy link
Contributor

mmlb commented May 21, 2020

Also lets use goimports instead of gofmt since it does better handling of imports.

@mmlb
Copy link
Contributor

mmlb commented May 22, 2020

@parauliya can you rebase instead of merge master in please? merge makes history messier.

@mmlb
Copy link
Contributor

mmlb commented May 22, 2020

Besides that :lgtm:

@parauliya
Copy link
Contributor Author

parauliya commented May 25, 2020

@parauliya can you rebase instead of merge master in please? merge makes history messier.

@mmlb , I rebased my branch to upstream/master.

@parauliya parauliya linked an issue May 25, 2020 that may be closed by this pull request
@parauliya parauliya added this to In Progress in Issues List May 25, 2020
This commit has the following things
1. Fixed the goimports and golint issue in the current code.
2. Add check for goimports and golint issues in the CI pipeline
@parauliya parauliya changed the title Fixed gofmt and golint issues Fixed gofmt and golint issues and added the check in CI May 25, 2020
Copy link
Contributor

@gauravgahlot gauravgahlot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gauravgahlot gauravgahlot merged commit a1cc6cf into tinkerbell:master May 26, 2020
Issues List automation moved this from In Progress to Just shipped May 26, 2020
@gauravgahlot gauravgahlot deleted the fix_fmt_lint_issue branch May 26, 2020 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Issues List
  
Just shipped
Development

Successfully merging this pull request may close these issues.

Make lint, vet and fmtcheck part of Makefile and part of CI run
3 participants