mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
Develop: Add .golangci.yml and update install-go-tools.sh script
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
b45abbd0cd
commit
8fc9f807de
2 changed files with 23 additions and 0 deletions
21
.golangci.yml
Normal file
21
.golangci.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
version: "2"
|
||||
|
||||
linters:
|
||||
default: standard
|
||||
|
||||
# Extra linters that are usually worth the cost even on a big codebase.
|
||||
enable:
|
||||
- revive
|
||||
- gosec
|
||||
- gocritic # good generic bug/quality suggestions
|
||||
- misspell # catch obvious spelling mistakes in identifiers/comments
|
||||
|
||||
# Linters that tend to fight with established code style or structure:
|
||||
disable:
|
||||
- funlen
|
||||
- gocyclo
|
||||
- wsl
|
||||
- lll # don't enforce a strict max line length
|
||||
- mnd # don't go after every "magic number"
|
||||
- depguard # only useful once you define strict dependency rules
|
||||
- gomodguard
|
||||
2
scripts/dist/install-go-tools.sh
vendored
2
scripts/dist/install-go-tools.sh
vendored
|
|
@ -44,6 +44,7 @@ case $DESTARCH in
|
|||
GOBIN="/usr/local/bin" go install github.com/psampaz/go-mod-outdated@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/kyoh86/richgo@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||
;;
|
||||
|
||||
*)
|
||||
|
|
@ -58,6 +59,7 @@ case $DESTARCH in
|
|||
GOBIN="/usr/local/bin" go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/google/go-licenses@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/swaggo/swag/cmd/swag@latest
|
||||
GOBIN="/usr/local/bin" go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue