From e4158dc5e465a28bfeaa927ce9adb1cf352ea4aa Mon Sep 17 00:00:00 2001 From: Pete Davison Date: Mon, 19 Dec 2022 01:06:09 +0000 Subject: [PATCH] feat: add local-prefixes flag to goimports linter (#958) --- .golangci.yml | 4 ++++ internal/output/output_test.go | 4 ++-- watch.go | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index bb593d8f..f21a2856 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,3 +6,7 @@ linters: enable: - goimports + +linters-settings: + goimports: + local-prefixes: github.com/go-task/task diff --git a/internal/output/output_test.go b/internal/output/output_test.go index 7a7d5bf7..4630de08 100644 --- a/internal/output/output_test.go +++ b/internal/output/output_test.go @@ -6,11 +6,11 @@ import ( "io" "testing" - "github.com/go-task/task/v3/internal/templater" - "github.com/go-task/task/v3/taskfile" "github.com/stretchr/testify/assert" "github.com/go-task/task/v3/internal/output" + "github.com/go-task/task/v3/internal/templater" + "github.com/go-task/task/v3/taskfile" ) func TestInterleaved(t *testing.T) { diff --git a/watch.go b/watch.go index 6af7dbc6..0aa6ab5a 100644 --- a/watch.go +++ b/watch.go @@ -10,10 +10,11 @@ import ( "syscall" "time" + "github.com/radovskyb/watcher" + "github.com/go-task/task/v3/internal/logger" "github.com/go-task/task/v3/internal/status" "github.com/go-task/task/v3/taskfile" - "github.com/radovskyb/watcher" ) const defaultWatchInterval = 5 * time.Second