Skip to content

Commit

Permalink
Took out golangci-lint linter (due to inablity to fix things or repor…
Browse files Browse the repository at this point in the history
…t problems properly); made makefile target to reformat instead
  • Loading branch information
reggieriser committed May 19, 2022
1 parent dd61fe4 commit 996a043
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
linters-settings:
gci:
sections:
- standard
- default
- prefix(github.com/transcom/mymove)
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
Expand Down Expand Up @@ -37,7 +32,6 @@ linters:
enable:
- deadcode
- errcheck
- gci
- gofmt
- goimports
- gomodguard
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ bin/gotestsum: .check_go_version.stamp .check_gopath.stamp pkg/tools/tools.go
bin/mockery: .check_go_version.stamp .check_gopath.stamp pkg/tools/tools.go
go build -o bin/mockery github.com/vektra/mockery/v2

# No static linking / $(LDFLAGS) because gci is only used for making go imports consistent
bin/gci: .check_go_version.stamp .check_gopath.stamp pkg/tools/tools.go
go build -o bin/gci github.com/daixiang0/gci

### Cert Targets
# AWS is only providing a bundle for the 2022 cert, which includes 2017? and rds-ca-rsa4096-g1
bin/rds-ca-rsa4096-g1.pem:
Expand Down Expand Up @@ -366,6 +370,7 @@ build_tools: bin/gin \
bin/big-cat \
bin/generate-deploy-notes \
bin/ecs-deploy \
bin/gci \
bin/generate-payment-request-edi \
bin/generate-shipment-summary \
bin/generate-test-data \
Expand Down Expand Up @@ -1185,6 +1190,12 @@ reviewapp_docker_destroy:
.PHONY: telemetry_docker
telemetry_docker:
docker-compose -f docker-compose.telemetry.yml up

.PHONY: fix_go_imports
fix_go_imports: bin/gci
find . -name '*.go' -not -path "./pkg/gen/*" -not -path "./pkg/assets/*" -not -path "*/*mocks/*" \
-exec gci write --Section Standard --Section Default --Section "Prefix(github.com/transcom/mymove)" {} \;

#
# ----- END RANDOM TARGETS -----
#
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require (
github.com/aws/aws-sdk-go v1.44.13
github.com/benbjohnson/clock v1.3.0
github.com/codegangsta/gin v0.0.0-20171026143024-cafe2ce98974
github.com/daixiang0/gci v0.3.3
github.com/disintegration/imaging v1.6.2
github.com/dustin/go-humanize v1.0.0
github.com/felixge/httpsnoop v1.0.3
Expand Down Expand Up @@ -130,6 +131,7 @@ require (
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/hhrutter/lzw v0.0.0-20190827003112-58b82c5a41cc // indirect
github.com/hhrutter/tiff v0.0.0-20190827003322-d08e2ad45835 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/daixiang0/gci v0.3.3 h1:55xJKH7Gl9Vk6oQ1cMkwrDWjAkT1D+D1G9kNmRcAIY4=
github.com/daixiang0/gci v0.3.3/go.mod h1:1Xr2bxnQbDxCqqulUOv8qpGqkgRw9RSCGGjEC2LjF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -471,6 +473,8 @@ github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOn
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk=
github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/hhrutter/lzw v0.0.0-20190827003112-58b82c5a41cc h1:crd+cScoxEqSOqClzjkNMNQNdMCF3SGXhPdDWBQfNZE=
github.com/hhrutter/lzw v0.0.0-20190827003112-58b82c5a41cc/go.mod h1:yJBvOcu1wLQ9q9XZmfiPfur+3dQJuIhYQsMGLYcItZk=
github.com/hhrutter/tiff v0.0.0-20190827003322-d08e2ad45835 h1:8XqemC6WorzU92LW/+cMr8e+oCpRUobYuieBCpb7bLw=
Expand Down
2 changes: 2 additions & 0 deletions pkg/tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ package tools
import (
// Install for hot reloading server
_ "github.com/codegangsta/gin"
// Tool to help ensure consistent formatting of import statements
_ "github.com/daixiang0/gci"
// Install for managing the database
_ "github.com/gobuffalo/pop/v6/soda"
// Install go-junit-report for CircleCI test result report generation
Expand Down

0 comments on commit 996a043

Please sign in to comment.