Repository: reviewdog/reviewdog
Pull request #339 (2019-10-01 18:10:24)

Cleanup
Minor changes after the first look at the project.


Patch:
diff --git a/cienv/cienv.go b/cienv/cienv.go
index 847b8ddd..26cfa872 100644
--- a/cienv/cienv.go
+++ b/cienv/cienv.go
@@ -24,12 +24,12 @@ type BuildInfo struct {
 
 // GetBuildInfo returns BuildInfo from environment variables.
 //
-// Supporrted CI services' documents:
+// Supported CI services' documents:
 // - Travis CI: https://docs.travis-ci.com/user/environment-variables/
 // - Circle CI: https://circleci.com/docs/environment-variables/
 // - Drone.io: http://docs.drone.io/environment-reference/
 // - GitLab CI: https://docs.gitlab.com/ee/ci/variables/#predefined-variables-environment-variables
-//   - GitLab CI doesn't export ID of Merge Request. https://gitlab.com/gitlab-org/gitlab-ce/issues/15280
+// - GitLab CI doesn't export ID of Merge Request. https://gitlab.com/gitlab-org/gitlab-ce/issues/15280
 func GetBuildInfo() (prInfo *BuildInfo, isPR bool, err error) {
 	if IsInGitHubAction() {
 		return getBuildInfoFromGitHubAction()
diff --git a/cmd/reviewdog/doghouse.go b/cmd/reviewdog/doghouse.go
index f712b51a..a73e2e8d 100644
--- a/cmd/reviewdog/doghouse.go
+++ b/cmd/reviewdog/doghouse.go
@@ -11,13 +11,14 @@ import (
 	"sort"
 	"strings"
 
+	"golang.org/x/oauth2"
+	"golang.org/x/sync/errgroup"
+
 	"github.com/reviewdog/reviewdog"
 	"github.com/reviewdog/reviewdog/cienv"
 	"github.com/reviewdog/reviewdog/doghouse"
 	"github.com/reviewdog/reviewdog/doghouse/client"
 	"github.com/reviewdog/reviewdog/project"
-	"golang.org/x/oauth2"
-	"golang.org/x/sync/errgroup"
 )
 
 func runDoghouse(ctx context.Context, r io.Reader, w io.Writer, opt *option, isProject bool, allowNonPR bool) error {
@@ -138,7 +139,7 @@ func postResultSet(ctx context.Context, resultSet *reviewdog.ResultMap, ghInfo *
 				filteredResultSet.Store(name, res.CheckedResults)
 			}
 			if res.ReportURL == "" && res.CheckedResults == nil {
-				return fmt.Errorf("No result found for %q", name)
+				return fmt.Errorf("no result found for %q", name)
 			}
 			return nil
 		})
diff --git a/cmd/reviewdog/main.go b/cmd/reviewdog/main.go
index 806cf74b..eed2cb0b 100644
--- a/cmd/reviewdog/main.go
+++ b/cmd/reviewdog/main.go
@@ -20,23 +20,23 @@ import (
 	"golang.org/x/oauth2"
 
 	"github.com/google/go-github/v28/github"
-	shellwords "github.com/mattn/go-shellwords"
+	"github.com/mattn/go-shellwords"
 	"github.com/reviewdog/errorformat/fmts"
+	"github.com/xanzy/go-gitlab"
+
 	"github.com/reviewdog/reviewdog"
 	"github.com/reviewdog/reviewdog/cienv"
 	"github.com/reviewdog/reviewdog/commands"
 	"github.com/reviewdog/reviewdog/project"
 	githubservice "github.com/reviewdog/reviewdog/service/github"
 	gitlabservice "github.com/reviewdog/reviewdog/service/gitlab"
-	gitlab "github.com/xanzy/go-gitlab"
 )
 
 const usageMessage = "" +
 	`Usage:	reviewdog [flags]
 	reviewdog accepts any compiler or linter results from stdin and filters
 	them by diff for review. reviewdog also can posts the results as a comment to
-	GitHub if you use reviewdog in CI service.
-`
+	GitHub if you use reviewdog in CI service.`
 
 type option struct {
 	version          bool
diff --git a/diff/parse.go b/diff/parse.go
index 2591ee24..4dd643b5 100644
--- a/diff/parse.go
+++ b/diff/parse.go
@@ -225,7 +225,7 @@ func parseExtendedHeader(r *bufio.Reader) []string {
 				break
 			}
 			line, _ := readline(r)
-			es = append(es, string(line))
+			es = append(es, line)
 		}
 	}
 	return es
@@ -298,7 +298,7 @@ endhunk:
 }
 
 func (p *hunkParser) done(lold, lnew int, hr *hunkrange) bool {
-	end := (lold >= hr.lold+hr.sold && lnew >= hr.lnew+hr.snew)
+	end := lold >= hr.lold+hr.sold && lnew >= hr.lnew+hr.snew
 	if b, err := p.r.Peek(1); err != nil || (string(b) != tokenNoNewlineAtEOF && end) {
 		return true
 	}
diff --git a/doghouse/appengine/checker.go b/doghouse/appengine/checker.go
index 93fbeb8b..9f2f474e 100644
--- a/doghouse/appengine/checker.go
+++ b/doghouse/appengine/checker.go
@@ -72,7 +72,7 @@ func (gc *githubChecker) handleCheck(w http.ResponseWriter, r *http.Request) {
 
 func (gc *githubChecker) validateCheckRequest(ctx context.Context, w http.ResponseWriter, r *http.Request, owner, repo string) bool {
 	if extractBearerToken(r) == "" {
-		// Update Travis IP Addresss before checking IP to reduce the # of
+		// Update Travis IP Address before checking IP to reduce the # of
 		// flaky errors when token is not present.
 		if err := ciutil.UpdateTravisCIIPAddrs(&http.Client{}); err != nil {
 			log.Printf("[ERROR] failed to update travis CI IP addresses: %v\n", err)
@@ -117,7 +117,7 @@ func githubRepoURL(ctx context.Context, r *http.Request, owner, repo string) str
 	return u.String()
 }
 
-func doghouseBaseURL(ctx context.Context, r *http.Request) *url.URL {
+func doghouseBaseURL(_ context.Context, r *http.Request) *url.URL {
 	scheme := ""
 	if r.URL != nil && r.URL.Scheme != "" {
 		scheme = r.URL.Scheme
diff --git a/doghouse/appengine/github.go b/doghouse/appengine/github.go
index 5bc8c528..939eb580 100644
--- a/doghouse/appengine/github.go
+++ b/doghouse/appengine/github.go
@@ -16,10 +16,11 @@ import (
 
 	"github.com/google/go-github/v28/github"
 	"github.com/justinas/nosurf"
+	"golang.org/x/oauth2"
+
 	"github.com/reviewdog/reviewdog/doghouse/server"
 	"github.com/reviewdog/reviewdog/doghouse/server/cookieman"
 	"github.com/reviewdog/reviewdog/doghouse/server/storage"
-	"golang.org/x/oauth2"
 )
 
 type GitHubHandler struct {
diff --git a/doghouse/appengine/github_webhook.go b/doghouse/appengine/github_webhook.go
index 880d93c7..9c5310b2 100644
--- a/doghouse/appengine/github_webhook.go
+++ b/doghouse/appengine/github_webhook.go
@@ -7,6 +7,7 @@ import (
 	"net/http"
 
 	"github.com/google/go-github/v28/github"
+
 	"github.com/reviewdog/reviewdog/doghouse/server/storage"
 )
 
diff --git a/doghouse/appengine/main.go b/doghouse/appengine/main.go
index a7b97084..3daad565 100644
--- a/doghouse/appengine/main.go
+++ b/doghouse/appengine/main.go
@@ -9,6 +9,7 @@ import (
 
 	"github.com/haya14busa/secretbox"
 	"github.com/justinas/nosurf"
+
 	"github.com/reviewdog/reviewdog/doghouse/server/cookieman"
 	"github.com/reviewdog/reviewdog/doghouse/server/storage"
 )
@@ -104,7 +105,7 @@ func main() {
 	log.Fatal(http.ListenAndServe(":"+os.Getenv("PORT"), nil))
 }
 
-func handleTop(w http.ResponseWriter, r *http.Request) {
+func handleTop(w http.ResponseWriter, _ *http.Request) {
 	var data struct {
 		Title string
 	}
diff --git a/doghouse/appengine/template.go b/doghouse/appengine/template.go
index 1c13e5fd..63a70050 100644
--- a/doghouse/appengine/template.go
+++ b/doghouse/appengine/template.go
@@ -7,20 +7,21 @@ import (
 	"net/http"
 
 	"github.com/rakyll/statik/fs"
+
 	_ "github.com/reviewdog/reviewdog/doghouse/appengine/statik"
 )
 
 var tmplFiles http.FileSystem
 
 func mustParseTemplatesFiles(filenames ...string) *template.Template {
-	t, err := parseTempaltesFiles(filenames...)
+	t, err := parseTemplatesFiles(filenames...)
 	if err != nil {
 		log.Fatal(err)
 	}
 	return t
 }
 
-func parseTempaltesFiles(filenames ...string) (*template.Template, error) {
+func parseTemplatesFiles(filenames ...string) (*template.Template, error) {
 	var t *template.Template
 	for _, filename := range filenames {
 		if t == nil {
diff --git a/doghouse/appengine/warmup.go b/doghouse/appengine/warmup.go
index 0e6cc117..d24c0c33 100644
--- a/doghouse/appengine/warmup.go
+++ b/doghouse/appengine/warmup.go
@@ -7,7 +7,7 @@ import (
 	"github.com/reviewdog/reviewdog/doghouse/server/ciutil"
 )
 
-func warmupHandler(w http.ResponseWriter, r *http.Request) {
+func warmupHandler(_ http.ResponseWriter, _ *http.Request) {
 	log.Printf("[INFO] warming up server...\n")
 
 	if err := ciutil.UpdateTravisCIIPAddrs(&http.Client{}); err != nil {
diff --git a/doghouse/client/github_client.go b/doghouse/client/github_client.go
index e846145c..6d85b9fd 100644
--- a/doghouse/client/github_client.go
+++ b/doghouse/client/github_client.go
@@ -4,6 +4,7 @@ import (
 	"context"
 
 	"github.com/google/go-github/v28/github"
+
 	"github.com/reviewdog/reviewdog/doghouse"
 	"github.com/reviewdog/reviewdog/doghouse/server"
 )
diff --git a/doghouse/server/doghouse.go b/doghouse/server/doghouse.go
index 154c3a35..42d12e83 100644
--- a/doghouse/server/doghouse.go
+++ b/doghouse/server/doghouse.go
@@ -9,6 +9,7 @@ import (
 	"time"
 
 	"github.com/google/go-github/v28/github"
+
 	"github.com/reviewdog/reviewdog"
 	"github.com/reviewdog/reviewdog/diff"
 	"github.com/reviewdog/reviewdog/doghouse"
@@ -16,7 +17,7 @@ import (
 )
 
 // GitHub check runs API cannot handle too large requests.
-// Set max number of filtered findings to be showen in check-run summary.
+// Set max number of filtered findings to be shown in check-run summary.
 // ERROR:
 //  https://api.github.com/repos/easymotion/vim-easymotion/check-runs: 422
 //  Invalid request.
@@ -239,7 +240,7 @@ func (ch *Checker) rawPullRequestDiff(ctx context.Context, pr int) ([]byte, erro
 	if err != nil {
 		return nil, err
 	}
-	return []byte(d), nil
+	return d, nil
 }
 
 func annotationsToCheckResults(as []*doghouse.Annotation) []*reviewdog.CheckResult {
diff --git a/doghouse/server/storage/token.go b/doghouse/server/storage/token.go
index 292321cc..f4e208c2 100644
--- a/doghouse/server/storage/token.go
+++ b/doghouse/server/storage/token.go
@@ -7,7 +7,7 @@ import (
 	"cloud.google.com/go/datastore"
 )
 
-// GitHubRepositoryToken represents token data for aunthenticating reviewdog CLI
+// GitHubRepositoryToken represents token data for authenticating reviewdog CLI
 // to the target repository.
 type GitHubRepositoryToken struct {
 	Token string
diff --git a/doghouse/service.go b/doghouse/service.go
index 313982be..43820de6 100644
--- a/doghouse/service.go
+++ b/doghouse/service.go
@@ -42,7 +42,7 @@ type CheckResponse struct {
 
 	// CheckedResults is checked annotations result.
 	// This field is expected to be filled for GitHub Actions integration and
-	// filled when ReportURL is not available. i.e. reviewdog doens't have write
+	// filled when ReportURL is not available. i.e. reviewdog doesn't have write
 	// permission to Check API.
 	// It's also not expected to be passed over network via JSON.
 	// TODO(haya14busa): Consider to move this type to this package to avoid
@@ -51,7 +51,7 @@ type CheckResponse struct {
 	CheckedResults []*reviewdog.FilteredCheck
 }
 
-// Annotation represents an annotaion to file or specific line.
+// Annotation represents an annotation to file or specific line.
 type Annotation struct {
 	// Relative file path
 	// Required.
@@ -62,7 +62,7 @@ type Annotation struct {
 	// Annotation message.
 	// Required.
 	Message string `json:"message,omitempty"`
-	// Original error message of this annotaion.
+	// Original error message of this annotation.
 	// Optional.
 	RawMessage string `json:"raw_message,omitempty"`
 }
diff --git a/project/conf.go b/project/conf.go
index 86b6d34e..af29e8f3 100644
--- a/project/conf.go
+++ b/project/conf.go
@@ -2,7 +2,7 @@
 // config.
 package project
 
-import yaml "gopkg.in/yaml.v2"
+import "gopkg.in/yaml.v2"
 
 // Config represents reviewdog config.
 type Config struct {
@@ -11,9 +11,8 @@ type Config struct {
 
 // Runner represents config for a runner.
 type Runner struct {
-	// Runner comamnd. (e.g. `golint ./...`)
+	// Runner command. (e.g. `golint ./...`)
 	Cmd string
-
 	// tool name in review comment. (e.g. `golint`)
 	Name string
 	// errorformat name. (e.g. `checkstyle`)
diff --git a/project/run.go b/project/run.go
index 8042b820..2d892bbf 100644
--- a/project/run.go
+++ b/project/run.go
@@ -11,9 +11,10 @@ import (
 	"runtime"
 	"strings"
 
+	"golang.org/x/sync/errgroup"
+
 	"github.com/reviewdog/reviewdog"
 	"github.com/reviewdog/reviewdog/diff"
-	"golang.org/x/sync/errgroup"
 )
 
 // RunAndParse runs commands and parse results. Returns map of tool name to check results.
diff --git a/service/github/github.go b/service/github/github.go
index a9440429..1782eb64 100644
--- a/service/github/github.go
+++ b/service/github/github.go
@@ -8,6 +8,7 @@ import (
 	"sync"
 
 	"github.com/google/go-github/v28/github"
+
 	"github.com/reviewdog/reviewdog"
 	"github.com/reviewdog/reviewdog/service/github/githubutils"
 	"github.com/reviewdog/reviewdog/service/serviceutil"
diff --git a/service/github/githubutils/utils.go b/service/github/githubutils/utils.go
index 48072e85..c968372d 100644
--- a/service/github/githubutils/utils.go
+++ b/service/github/githubutils/utils.go
@@ -30,7 +30,7 @@ func PathLink(owner, repo, sha, path string, line int) string {
 		owner, repo, sha, path, fragment)
 }
 
-// BasicLocationFormat format chec CheckResult to %f|%l col %c| erorformat.
+// BasicLocationFormat format check CheckResult to %f|%l col %c| errorformat.
 func BasicLocationFormat(c *reviewdog.CheckResult) string {
 	loc := c.Path + "|"
 	if c.Lnum != 0 {
diff --git a/service/gitlab/gitlab_mr_commit.go b/service/gitlab/gitlab_mr_commit.go
index 3cc83cc1..96608ad1 100644
--- a/service/gitlab/gitlab_mr_commit.go
+++ b/service/gitlab/gitlab_mr_commit.go
@@ -8,10 +8,11 @@ import (
 	"strings"
 	"sync"
 
-	"github.com/reviewdog/reviewdog"
-	"github.com/reviewdog/reviewdog/service/serviceutil"
 	"github.com/xanzy/go-gitlab"
 	"golang.org/x/sync/errgroup"
+
+	"github.com/reviewdog/reviewdog"
+	"github.com/reviewdog/reviewdog/service/serviceutil"
 )
 
 var _ reviewdog.CommentService = &GitLabMergeRequestCommitCommenter{}
diff --git a/service/gitlab/gitlab_mr_diff.go b/service/gitlab/gitlab_mr_diff.go
index 401cce1b..cad304ad 100644
--- a/service/gitlab/gitlab_mr_diff.go
+++ b/service/gitlab/gitlab_mr_diff.go
@@ -6,9 +6,10 @@ import (
 	"os/exec"
 	"strings"
 
+	"github.com/xanzy/go-gitlab"
+
 	"github.com/reviewdog/reviewdog"
 	"github.com/reviewdog/reviewdog/service/serviceutil"
-	gitlab "github.com/xanzy/go-gitlab"
 )
 
 var _ reviewdog.DiffService = &GitLabMergeRequestDiff{}
diff --git a/service/gitlab/gitlab_mr_discussion.go b/service/gitlab/gitlab_mr_discussion.go
index 194b5fb2..044cf243 100644
--- a/service/gitlab/gitlab_mr_discussion.go
+++ b/service/gitlab/gitlab_mr_discussion.go
@@ -8,10 +8,11 @@ import (
 	"path/filepath"
 	"sync"
 
+	"github.com/xanzy/go-gitlab"
+	"golang.org/x/sync/errgroup"
+
 	"github.com/reviewdog/reviewdog"
 	"github.com/reviewdog/reviewdog/service/serviceutil"
-	gitlab "github.com/xanzy/go-gitlab"
-	"golang.org/x/sync/errgroup"
 )
 
 // GitLabMergeRequestDiscussionCommenter is a comment and diff service for GitLab MergeRequest.
diff --git a/service/serviceutil/serviceutil.go b/service/serviceutil/serviceutil.go
index 9009b109..3942911b 100644
--- a/service/serviceutil/serviceutil.go
+++ b/service/serviceutil/serviceutil.go
@@ -18,11 +18,11 @@ func (p PostedComments) IsPosted(c *reviewdog.Comment, lineNum int) bool {
 	if _, ok := p[c.Path]; !ok {
 		return false
 	}
-	bodys, ok := p[c.Path][lineNum]
+	bodies, ok := p[c.Path][lineNum]
 	if !ok {
 		return false
 	}
-	for _, body := range bodys {
+	for _, body := range bodies {
 		if body == CommentBody(c) {
 			return true
 		}


Test patch:
diff --git a/cmd/reviewdog/doghouse_test.go b/cmd/reviewdog/doghouse_test.go
index 93a0efea..1357162f 100644
--- a/cmd/reviewdog/doghouse_test.go
+++ b/cmd/reviewdog/doghouse_test.go
@@ -9,12 +9,13 @@ import (
 	"testing"
 
 	"github.com/google/go-cmp/cmp"
+	"golang.org/x/oauth2"
+
 	"github.com/reviewdog/reviewdog"
 	"github.com/reviewdog/reviewdog/cienv"
 	"github.com/reviewdog/reviewdog/doghouse"
 	"github.com/reviewdog/reviewdog/doghouse/client"
 	"github.com/reviewdog/reviewdog/project"
-	"golang.org/x/oauth2"
 )
 
 func setupEnvs(testEnvs map[string]string) (cleanup func()) {
diff --git a/doghouse/server/doghouse_test.go b/doghouse/server/doghouse_test.go
index a978485a..70e7b82a 100644
--- a/doghouse/server/doghouse_test.go
+++ b/doghouse/server/doghouse_test.go
@@ -8,6 +8,7 @@ import (
 
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-github/v28/github"
+
 	"github.com/reviewdog/reviewdog/doghouse"
 )
 
@@ -112,7 +113,7 @@ func TestCheck_OK(t *testing.T) {
 				t.Errorf("UpdateCheckRunOptions.Conclusion = %q, want %q", *opt.Conclusion, conclusion)
 			}
 		} else {
-			wantAnnotaions := []*github.CheckRunAnnotation{
+			wantAnnotations := []*github.CheckRunAnnotation{
 				{
 					Path:            github.String("sample.new.txt"),
 					StartLine:       github.Int(2),
@@ -123,7 +124,7 @@ func TestCheck_OK(t *testing.T) {
 					RawDetails:      github.String("raw test message"),
 				},
 			}
-			if d := cmp.Diff(annotations, wantAnnotaions); d != "" {
+			if d := cmp.Diff(annotations, wantAnnotations); d != "" {
 				t.Errorf("Annotation diff found:\n%s", d)
 			}
 		}
@@ -256,7 +257,7 @@ func TestCheck_OK_nonPullRequests(t *testing.T) {
 				t.Errorf("UpdateCheckRunOptions.Conclusion = %q, want %q", *opt.Conclusion, conclusion)
 			}
 		} else {
-			wantAnnotaions := []*github.CheckRunAnnotation{
+			wantAnnotations := []*github.CheckRunAnnotation{
 				{
 					Path:            github.String("sample.new.txt"),
 					StartLine:       github.Int(2),
@@ -276,7 +277,7 @@ func TestCheck_OK_nonPullRequests(t *testing.T) {
 					RawDetails:      github.String("raw test message2"),
 				},
 			}
-			if d := cmp.Diff(annotations, wantAnnotaions); d != "" {
+			if d := cmp.Diff(annotations, wantAnnotations); d != "" {
 				t.Errorf("Annotation diff found:\n%s", d)
 			}
 		}
diff --git a/filter_test.go b/filter_test.go
index af0e8079..c4507973 100644
--- a/filter_test.go
+++ b/filter_test.go
@@ -9,6 +9,7 @@ import (
 	"testing"
 
 	"github.com/google/go-cmp/cmp"
+
 	"github.com/reviewdog/reviewdog/diff"
 )
 
diff --git a/project/run_test.go b/project/run_test.go
index 9e2b20c2..ec14f9cf 100644
--- a/project/run_test.go
+++ b/project/run_test.go
@@ -42,7 +42,7 @@ func TestRun(t *testing.T) {
 		}
 	})
 
-	t.Run("erorformat error", func(t *testing.T) {
+	t.Run("errorformat error", func(t *testing.T) {
 		conf := &Config{
 			Runner: map[string]*Runner{
 				"test": {},
diff --git a/service/github/github_test.go b/service/github/github_test.go
index 2ac685fc..0cdbf2ee 100644
--- a/service/github/github_test.go
+++ b/service/github/github_test.go
@@ -12,9 +12,10 @@ import (
 
 	"github.com/google/go-github/v28/github"
 	"github.com/kylelemons/godebug/pretty"
+	"golang.org/x/oauth2"
+
 	"github.com/reviewdog/reviewdog"
 	"github.com/reviewdog/reviewdog/service/serviceutil"
-	"golang.org/x/oauth2"
 )
 
 const notokenSkipTestMes = "skipping test (requires actual Personal access tokens. export REVIEWDOG_TEST_GITHUB_API_TOKEN=<GitHub Personal Access Token>)"
@@ -321,7 +322,7 @@ func TestGitHubPullRequest_Post_toomany(t *testing.T) {
 	if err != nil {
 		t.Fatal(err)
 	}
-	comments := []*reviewdog.Comment{}
+	var comments []*reviewdog.Comment
 	for i := 0; i < 100; i++ {
 		comments = append(comments, &reviewdog.Comment{
 			CheckResult: &reviewdog.CheckResult{
diff --git a/service/gitlab/gitlab_mr_commit_test.go b/service/gitlab/gitlab_mr_commit_test.go
index f4bb4b04..aacbf5d7 100644
--- a/service/gitlab/gitlab_mr_commit_test.go
+++ b/service/gitlab/gitlab_mr_commit_test.go
@@ -9,9 +9,10 @@ import (
 	"testing"
 
 	"github.com/kylelemons/godebug/pretty"
+	"github.com/xanzy/go-gitlab"
+
 	"github.com/reviewdog/reviewdog"
 	"github.com/reviewdog/reviewdog/service/serviceutil"
-	"github.com/xanzy/go-gitlab"
 )
 
 func TestGitLabMergeRequestCommitCommenter_Post_Flush_review_api(t *testing.T) {
diff --git a/service/gitlab/gitlab_mr_diff_test.go b/service/gitlab/gitlab_mr_diff_test.go
index cebee2f1..37a80bde 100644
--- a/service/gitlab/gitlab_mr_diff_test.go
+++ b/service/gitlab/gitlab_mr_diff_test.go
@@ -6,7 +6,7 @@ import (
 	"net/http/httptest"
 	"testing"
 
-	gitlab "github.com/xanzy/go-gitlab"
+	"github.com/xanzy/go-gitlab"
 )
 
 func TestGitLabMergeRequestDiff_Diff(t *testing.T) {
diff --git a/service/gitlab/gitlab_mr_discussion_test.go b/service/gitlab/gitlab_mr_discussion_test.go
index 55fd68b5..f2ac99b7 100644
--- a/service/gitlab/gitlab_mr_discussion_test.go
+++ b/service/gitlab/gitlab_mr_discussion_test.go
@@ -9,9 +9,10 @@ import (
 	"testing"
 
 	"github.com/google/go-cmp/cmp"
+	"github.com/xanzy/go-gitlab"
+
 	"github.com/reviewdog/reviewdog"
 	"github.com/reviewdog/reviewdog/service/serviceutil"
-	gitlab "github.com/xanzy/go-gitlab"
 )
 
 func TestGitLabMergeRequestDiscussionCommenter_Post_Flush_review_api(t *testing.T) {