chore: reformat code
Using: - github.com/haunt98/gofimports - mvdan.cc/gofumpt - mvdan.cc/shmain
parent
1cb51967a3
commit
ed37b07e5c
|
@ -19,12 +19,15 @@ linters:
|
|||
- errcheck
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- staticcheck
|
||||
- typecheck
|
||||
- unused
|
||||
- errchkjson
|
||||
- errname
|
||||
- errorlint
|
||||
- execinquery
|
||||
- gocritic
|
||||
- goerr113
|
||||
- gofumpt
|
||||
- gosec
|
||||
|
@ -38,7 +41,10 @@ linters:
|
|||
linters-settings:
|
||||
gosec:
|
||||
excludes:
|
||||
- G101
|
||||
- G112
|
||||
- G402
|
||||
- G404
|
||||
- G501
|
||||
- G505
|
||||
exclude-generated: true
|
||||
|
@ -63,3 +69,7 @@ linters-settings:
|
|||
- unusedresult
|
||||
staticcheck:
|
||||
checks: ["all", "-SA1019"]
|
||||
gocritic:
|
||||
enabled-tags:
|
||||
- style
|
||||
- performance
|
||||
|
|
29
Makefile
29
Makefile
|
@ -1,9 +1,34 @@
|
|||
.PHONY: all test lint
|
||||
.PHONY: all test test-color coverage coverage-cli coverate-html lint format build
|
||||
|
||||
all: test lint
|
||||
all: test-color lint format
|
||||
go mod tidy
|
||||
|
||||
test:
|
||||
go test -race -failfast ./...
|
||||
|
||||
test-color:
|
||||
go install github.com/haunt98/go-test-color@latest
|
||||
go-test-color -race -failfast ./...
|
||||
|
||||
coverage:
|
||||
go test -coverprofile=coverage.out ./...
|
||||
|
||||
coverage-cli: coverage
|
||||
go tool cover -func=coverage.out
|
||||
|
||||
coverage-html: coverage
|
||||
go tool cover -html=coverage.out
|
||||
|
||||
lint:
|
||||
golangci-lint run ./...
|
||||
|
||||
format:
|
||||
go install github.com/haunt98/gofimports/cmd/gofimports@latest
|
||||
go install mvdan.cc/gofumpt@latest
|
||||
go install mvdan.cc/sh/v3/cmd/shfmt@latest
|
||||
gofimports -w -company github.com/make-go-great .
|
||||
gofumpt -w -extra .
|
||||
shfmt -w ./scripts
|
||||
|
||||
build:
|
||||
go build ./cmd/dot
|
||||
|
|
|
@ -4,8 +4,9 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/haunt98/dotfiles/internal/config"
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"github.com/haunt98/dotfiles/internal/config"
|
||||
)
|
||||
|
||||
type action struct {
|
||||
|
|
|
@ -5,8 +5,9 @@ import (
|
|||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/make-go-great/color-go"
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"github.com/make-go-great/color-go"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
Loading…
Reference in New Issue