Skip to content

Commit 453b177

Browse files
authored
Upgrade golangci-lint to 1.49.0 (#45)
1 parent c9e8e9d commit 453b177

9 files changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/cloc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
- name: Count Lines Of Code
2525
id: loc
2626
run: |
27-
curl -sLO https://github.com/vearutop/sccdiff/releases/download/v1.0.2/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && echo "b17e76bede22af0206b4918d3b3c4e7357f2a21b57f8de9e7c9dc0eb56b676c0 sccdiff" | shasum -c
27+
curl -sLO https://github.com/vearutop/sccdiff/releases/download/v1.0.3/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz
28+
sccdiff_hash=$(git hash-object ./sccdiff)
29+
[ "$sccdiff_hash" == "ae8a07b687bd3dba60861584efe724351aa7ff63" ] || (echo "::error::unexpected hash for sccdiff, possible tampering: $sccdiff_hash" && exit 1)
2830
OUTPUT=$(cd pr && ../sccdiff -basedir ../base)
2931
echo "${OUTPUT}"
3032
OUTPUT="${OUTPUT//$'\n'/%0A}"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import _ "github.com/bool64/dev" // Include development helpers to project.
2626
Add `Makefile` to your module with includes standard targets.
2727

2828
```Makefile
29-
#GOLANGCI_LINT_VERSION := "v1.48.0" # Optional configuration to pinpoint golangci-lint version.
29+
#GOLANGCI_LINT_VERSION := "v1.49.0" # Optional configuration to pinpoint golangci-lint version.
3030

3131
# The head of Makefile determines location of dev-go to include standard targets.
3232
GO ?= go

makefiles/base.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#GOLANGCI_LINT_VERSION := "v1.48.0" # Optional configuration to pinpoint golangci-lint version.
1+
#GOLANGCI_LINT_VERSION := "v1.49.0" # Optional configuration to pinpoint golangci-lint version.
22

33
# The head of Makefile determines location of dev-go to include standard targets.
44
GO ?= go

scripts/.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ linters:
3939
- ireturn
4040
- exhaustruct
4141
- nonamedreturns
42+
- nosnakecase
43+
- structcheck
44+
- varcheck
45+
- deadcode
4246

4347
issues:
4448
exclude-use-default: false

scripts/lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
[ -z "$GO" ] && GO=go
4-
[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.48.0"
4+
[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.49.0"
55

66
# detecting GOPATH and removing trailing "/" if any
77
GOPATH="$(go env GOPATH)"

templates/github/workflows/cloc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
- name: Count Lines Of Code
2525
id: loc
2626
run: |
27-
curl -sLO https://github.com/vearutop/sccdiff/releases/download/v1.0.2/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && echo "b17e76bede22af0206b4918d3b3c4e7357f2a21b57f8de9e7c9dc0eb56b676c0 sccdiff" | shasum -c
27+
curl -sLO https://github.com/vearutop/sccdiff/releases/download/v1.0.3/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz
28+
sccdiff_hash=$(git hash-object ./sccdiff)
29+
[ "$sccdiff_hash" == "ae8a07b687bd3dba60861584efe724351aa7ff63" ] || (echo "::error::unexpected hash for sccdiff, possible tampering: $sccdiff_hash" && exit 1)
2830
OUTPUT=$(cd pr && ../sccdiff -basedir ../base)
2931
echo "${OUTPUT}"
3032
OUTPUT="${OUTPUT//$'\n'/%0A}"

templates/github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: golangci/golangci-lint-action@v3.1.0
2828
with:
2929
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
30-
version: v1.48.0
30+
version: v1.49.0
3131

3232
# Optional: working directory, useful for monorepos
3333
# working-directory: somedir

templates/github/workflows/release-assets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- created
99
env:
1010
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11-
GO_VERSION: 1.18.x
11+
GO_VERSION: 1.19.x
1212
jobs:
1313
build:
1414
name: Upload Release Assets

templates/github/workflows/test-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
GO111MODULE: "on"
1717
RUN_BASE_COVERAGE: "on" # Runs test for PR base in case base test coverage is missing.
1818
DOCKER_COMPOSE_FILE: ./docker-compose.yml
19-
GO_VERSION: 1.18.x
19+
GO_VERSION: 1.19.x
2020
TARGET_DELTA_COV: 90 # Target coverage of changed lines, in percents
2121
jobs:
2222
test:

0 commit comments

Comments
 (0)