Skip to content

Commit

Permalink
Update lint tools and module version (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop committed Feb 25, 2022
1 parent 3f9824e commit 69a6d8b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import _ "github.com/bool64/dev" // Include development helpers to project.
Add `Makefile` to your module with includes standard targets.

```Makefile
#GOLANGCI_LINT_VERSION := "v1.43.0" # Optional configuration to pinpoint golangci-lint version.
#GOLANGCI_LINT_VERSION := "v1.44.2" # Optional configuration to pinpoint golangci-lint version.

# The head of Makefile determines location of dev-go to include standard targets.
GO ?= go
Expand Down
8 changes: 7 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
module github.com/bool64/dev

go 1.11
go 1.17

require github.com/stretchr/testify v1.4.0

require (
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v2 v2.2.2 // indirect
)
2 changes: 1 addition & 1 deletion makefiles/base.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#GOLANGCI_LINT_VERSION := "v1.43.0" # Optional configuration to pinpoint golangci-lint version.
#GOLANGCI_LINT_VERSION := "v1.44.2" # Optional configuration to pinpoint golangci-lint version.

# The head of Makefile determines location of dev-go to include standard targets.
GO ?= go
Expand Down
2 changes: 1 addition & 1 deletion scripts/fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ gogroup -order std,other -rewrite ${SOURCES_TO_LINT}
# gofumpt is a drop-in replacement for gofmt with stricter formatting: https://github.com/mvdan/gofumpt
if ! command -v gofumpt > /dev/null ; then \
echo "Installing gofumpt..."; \
$GO install mvdan.cc/gofumpt@4d8e76d698e7e061266253df920ef5b28d8f8f13;
$GO install mvdan.cc/gofumpt@v0.3.0;
fi

# simplify code
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

[ -z "$GO" ] && GO=go
[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.43.0"
[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.44.2"

# detecting GOPATH and removing trailing "/" if any
GOPATH="$(go env GOPATH)"
Expand Down
4 changes: 2 additions & 2 deletions templates/github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2.5.2
uses: golangci/golangci-lint-action@v3.0.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.43.0
version: v1.44.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down

0 comments on commit 69a6d8b

Please sign in to comment.