Skip to content

Commit

Permalink
chore(golangci-lint): Updating golangci-lint to v1.56.2 (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
fclairamb authored Mar 2, 2024
1 parent eea1b59 commit ad78d02
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,18 @@ name: Build
# events but only for the master branch
on:
push:
branches:
- main
pull_request:

permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
# Optional: Allow write access to checks to allow the action to annotate code in the PR.
checks: write

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Expand All @@ -30,7 +40,8 @@ jobs:
if: matrix.lint
uses: golangci/golangci-lint-action@v4.0.0
with:
version: v1.51.2
version: v1.56.2
only-new-issues: true

# Install Go
- name: Setup go
Expand Down
20 changes: 3 additions & 17 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ linters-settings:
min-len: 3
# minimal occurrences count to trigger, 3 by default
min-occurrences: 3
depguard:
list-type: blacklist
include-go-root: false
packages:
- github.com/sirupsen/logrus
packages-with-error-messages:
# specify an error message to output when a blacklisted package is used
github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
misspell:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
Expand All @@ -95,12 +87,6 @@ linters-settings:
line-length: 120
# tab width in spaces. Default to 1.
tab-width: 1
unused:
# treat code as a program (not a library) and report unused exported identifiers; default is false.
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
unparam:
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
Expand Down Expand Up @@ -165,7 +151,7 @@ linters:
enable:
- asciicheck
- bodyclose
- deadcode
# - deadcode -> unused
- depguard
- dogsled
- dupl
Expand Down Expand Up @@ -208,13 +194,13 @@ linters:
# - scopelint --> exportloopref
- exportloopref
- staticcheck
- structcheck
# - structcheck -> unused
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
# - varcheck -> unused
- whitespace
# - wrapcheck
- wsl
Expand Down

0 comments on commit ad78d02

Please sign in to comment.