From caeb331c81f7a198f02c698bb7bb652cdb161910 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Fri, 21 Jan 2022 16:49:21 -0400 Subject: [PATCH] chore: add golangci-lint nad ix makefile --- .golangci.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ Makefile | 7 +++---- 2 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..981454a --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,42 @@ +skip-dirs-use-default: true + +run: + timeout: 5m + +linters: + enable: + - bodyclose + - deadcode + - depguard + - dogsled + - errcheck + - errorlint + - exportloopref + - gocritic + - gocyclo + - gofmt + - goimports + - goprintffuncname + - gosimple + - gosec + - govet + - ineffassign + - misspell + - noctx + - nolintlint + - prealloc + - rowserrcheck + - staticcheck + - structcheck + - stylecheck + - typecheck + - unconvert + - unparam + - unused + - varcheck + - whitespace + fast: true + +linters-settings: + goimports: + local-prefixes: github.com/rjNemo/go-passgen \ No newline at end of file diff --git a/Makefile b/Makefile index 1c92e2a..a98a79e 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,14 @@ lint: - golint cmd/... - golint passgen/... + golangci-lint run dev: air run: - go main.go + go run main.go run-web: - go main.go --web=t + go run main.go --web=t web: cd client && npm run start