Skip to content

Commit ad78d02

Browse files
authored
chore(golangci-lint): Updating golangci-lint to v1.56.2 (#438)
1 parent eea1b59 commit ad78d02

2 files changed

Lines changed: 15 additions & 18 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@ name: Build
44
# events but only for the master branch
55
on:
66
push:
7+
branches:
8+
- main
79
pull_request:
810

11+
permissions:
12+
# Required: allow read access to the content for analysis.
13+
contents: read
14+
# Optional: allow read access to pull request. Use with `only-new-issues` option.
15+
pull-requests: read
16+
# Optional: Allow write access to checks to allow the action to annotate code in the PR.
17+
checks: write
18+
919
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1020
jobs:
1121
# This workflow contains a single job called "build"
@@ -30,7 +40,8 @@ jobs:
3040
if: matrix.lint
3141
uses: golangci/golangci-lint-action@v4.0.0
3242
with:
33-
version: v1.51.2
43+
version: v1.56.2
44+
only-new-issues: true
3445

3546
# Install Go
3647
- name: Setup go

.golangci.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,6 @@ linters-settings:
7474
min-len: 3
7575
# minimal occurrences count to trigger, 3 by default
7676
min-occurrences: 3
77-
depguard:
78-
list-type: blacklist
79-
include-go-root: false
80-
packages:
81-
- github.com/sirupsen/logrus
82-
packages-with-error-messages:
83-
# specify an error message to output when a blacklisted package is used
84-
github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
8577
misspell:
8678
# Correct spellings using locale preferences for US or UK.
8779
# Default is to use a neutral variety of English.
@@ -95,12 +87,6 @@ linters-settings:
9587
line-length: 120
9688
# tab width in spaces. Default to 1.
9789
tab-width: 1
98-
unused:
99-
# treat code as a program (not a library) and report unused exported identifiers; default is false.
100-
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
101-
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
102-
# with golangci-lint call it on a directory with the changed file.
103-
check-exported: false
10490
unparam:
10591
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
10692
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
@@ -165,7 +151,7 @@ linters:
165151
enable:
166152
- asciicheck
167153
- bodyclose
168-
- deadcode
154+
# - deadcode -> unused
169155
- depguard
170156
- dogsled
171157
- dupl
@@ -208,13 +194,13 @@ linters:
208194
# - scopelint --> exportloopref
209195
- exportloopref
210196
- staticcheck
211-
- structcheck
197+
# - structcheck -> unused
212198
- stylecheck
213199
- typecheck
214200
- unconvert
215201
- unparam
216202
- unused
217-
- varcheck
203+
# - varcheck -> unused
218204
- whitespace
219205
# - wrapcheck
220206
- wsl

0 commit comments

Comments
 (0)