File tree Expand file tree Collapse file tree 6 files changed +12
-13
lines changed
Expand file tree Collapse file tree 6 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 11OUT_DIR := ./out
22GO_FILES := $(shell find . -type f \( -iname '* .go' \) )
3+ GO_MODULE := github.com/eikendev/hackenv
34
45SCRIPT_FILES := $(wildcard ./bin/* )
56
@@ -14,17 +15,18 @@ clean:
1415
1516.PHONY : test
1617test : lint_scripts
17- stdout=$$(gofumpt -l . 2>&1 ) ; if [ " $$ stdout" ]; then exit 1; fi
18+ if [ -n " $$ (gofumpt -l $( GO_FILES) )" ]; then echo " Code is not properly formatted" ; exit 1; fi
19+ if [ -n " $$ (goimports -l -local $( GO_MODULE) $( GO_FILES) )" ]; then echo " Imports are not properly formatted" ; exit 1; fi
1820 go vet ./...
1921 misspell -error $(GO_FILES )
2022 gocyclo -over 10 $(GO_FILES )
2123 staticcheck ./...
22- errcheck ./...
24+ errcheck -ignoregenerated ./...
2325 gocritic check -disable=
' #experimental,#opinionated' [email protected] 3 ./...
2426 revive -set_exit_status ./...
2527 nilaway ./...
2628 go test -v -cover ./...
27- gosec -exclude-dir=tests ./...
29+ gosec -exclude-generated ./...
2830 govulncheck ./...
2931 @printf ' \n%s\n' " > Test successful"
3032
3739 go install github.com/mgechev/revive@latest
3840 go install github.com/securego/gosec/v2/cmd/gosec@latest
3941 go install go.uber.org/nilaway/cmd/nilaway@latest
42+ go install golang.org/x/tools/cmd/goimports@latest
4043 go install golang.org/x/vuln/cmd/govulncheck@latest
4144 go install honnef.co/go/tools/cmd/staticcheck@latest
4245 go install mvdan.cc/gofumpt@latest
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,9 +5,10 @@ import (
55 "os/exec"
66 "strings"
77
8+ log "github.com/sirupsen/logrus"
9+
810 "github.com/eikendev/hackenv/internal/options"
911 "github.com/eikendev/hackenv/internal/scripts"
10- log "github.com/sirupsen/logrus"
1112)
1213
1314// FixCommand represents the options specific to the fix command.
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ import (
77 "regexp"
88 "time"
99
10+ "github.com/adrg/xdg"
1011 log "github.com/sirupsen/logrus"
12+ rawLibvirt "libvirt.org/go/libvirt"
1113
12- "github.com/adrg/xdg"
1314 "github.com/eikendev/hackenv/internal/constants"
14- rawLibvirt "libvirt.org/go/libvirt"
1515)
1616
1717type infoRetriever func (string , * regexp.Regexp ) (* DownloadInfo , error )
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ import (
55 "errors"
66
77 log "github.com/sirupsen/logrus"
8+ "libvirt.org/go/libvirt"
89
910 "github.com/eikendev/hackenv/internal/constants"
1011 "github.com/eikendev/hackenv/internal/images"
11- "libvirt.org/go/libvirt"
1212)
1313
1414var domainStates = map [libvirt.DomainState ]string {
Original file line number Diff line number Diff line change 77 "os/exec"
88 "path/filepath"
99
10+ "github.com/adrg/xdg"
1011 log "github.com/sirupsen/logrus"
1112
12- "github.com/adrg/xdg"
1313 "github.com/eikendev/hackenv/internal/constants"
1414)
1515
You can’t perform that action at this time.
0 commit comments