Skip to content

Commit

Permalink
Update linter & releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Delbende committed Jun 24, 2024
1 parent 2b558ce commit 4527314
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
16 changes: 3 additions & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,22 @@ linters:
# Base linters disabled for all projects.
- funlen
- gomnd # Too picky. For example it says that 1000 (used in number of ms in one second) is a magic number.
- exhaustivestruct # This linter is meant to be used only for special cases. It is not recommended to use it for all files in a project.
- exhaustruct # Same as above.
- mnd # Same as above.
- exhaustruct # This linter is meant to be used only for special cases. It is not recommended to use it for all files in a project.
- gci # Conflicts with gofumpt.
- varnamelen # I think there is too many false-positive.
- ireturn # Complain that interface A implementation method return an interface B... it's a requirement of interface A that is unavoidable.
- nonamedreturns # Warn for every named return, not useful.
- interfacebloat # Warn when an interface has too many methods, not useful.
# Deprecated and replaced linter.
- maligned
- golint
- interfacer
- scopelint
- ifshort
- deadcode
- structcheck
- varcheck
- nosnakecase
- execinquery
# We use maintidx to lint function complexity.
- gocyclo
- cyclop
- gocognit

linters-settings:
nolintlint:
# Ensure that nolint directives don't have a leading space.
allow-leading-space: false
# Require nolint directives to mention the specific linter being suppressed.
require-specific: true

Expand Down
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
project_name: squirreldb-ingestor
snapshot:
# Our version is based on the date.
Expand Down
5 changes: 2 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

set -e


GORELEASER_VERSION="v1.25.1"
GORELEASER_VERSION="v2.0.1"
USER_UID=$(id -u)

case "$1" in
Expand Down Expand Up @@ -68,7 +67,7 @@ else
git config --global --add safe.directory /src
goreleaser check
go test ./...
goreleaser --rm-dist --snapshot --parallelism 2
goreleaser --clean --snapshot --parallelism 2
chown -R $USER_UID dist
"

Expand Down
2 changes: 1 addition & 1 deletion lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

LINTER_VERSION=v1.57.2
LINTER_VERSION=v1.59.1

USER_UID=$(id -u)

Expand Down

0 comments on commit 4527314

Please sign in to comment.