Skip to content

Commit

Permalink
deps: Upgraded Go dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
skyzyx committed Apr 11, 2024
1 parent a9597a9 commit 1e16d1c
Show file tree
Hide file tree
Showing 7 changed files with 356 additions and 115 deletions.
220 changes: 166 additions & 54 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,6 @@ run:
# list of build tags, all linters use it. Default is empty list.
# build-tags: []

# Which dirs to skip: issues from them won't be reported.
# Can use regexp here: `generated.*`, regexp is applied on full path,
# including the path prefix if one is set.
# Default value is empty list,
# but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work on Windows.
# skip-dirs: []

# default is true. Enables skipping of directories: vendor$, third_party$,
# testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true

# Which files to skip: they will be analyzed, but issues from them won't be reported.
# Default value is empty list,
# but there is no need to include all autogenerated files,
# we confidently recognize autogenerated files.
# If it's not please let us know.
# "/" will be replaced by current OS file path separator to properly work on Windows.
skip-files:
- .*\.my\.go$
- lib/bad.go

# If set we pass it to "go list -mod={option}". From "go help modules":
# If invoked with -mod=readonly, the go command is disallowed from the implicit
# automatic updating of go.mod described above. Instead, it fails when any changes
Expand All @@ -56,7 +34,12 @@ run:

# Allow multiple parallel golangci-lint instances running.
# If false (default) - golangci-lint acquires file lock on start.
allow-parallel-runners: false
allow-parallel-runners: true

# Allow multiple golangci-lint instances running, but serialize them around a lock.
# If false, golangci-lint exits with an error if it fails to acquire file lock on start.
# Default: false
allow-serial-runners: true

# Define the Go version limit.
# Mainly related to generics support since go1.18.
Expand All @@ -71,6 +54,7 @@ linters:
enable:
# - asasalint
# - bidichk
- copyloopvar
# - cyclop
- decorder
# - depguard
Expand All @@ -81,7 +65,6 @@ linters:
- errchkjson
- errorlint
- exhaustive
# - exhaustivestruct
# - forbidigo
- funlen
# - ginkgolinter
Expand All @@ -92,10 +75,9 @@ linters:
# - godot
- godox
- gofmt
# - gofumpt
- gofumpt
# - goheader
- goimports
# - golint # DEPRECATED
- gomnd
# - gomoddirectives
# - gomodguard
Expand All @@ -104,15 +86,13 @@ linters:
# - gosmopolitan
- govet
# - grouper
# - ifshort
- importas
- interfacebloat
# - ireturn
- lll
# - loggercheck
- maintidx
- makezero
# - maligned # DEPRECATED
- misspell
# - musttag
- nakedret
Expand All @@ -129,6 +109,7 @@ linters:
# - revive: @TODO: Review and enable
# - rowserrcheck
- sloglint
- spancheck
- staticcheck
- stylecheck
- tagalign
Expand All @@ -140,23 +121,29 @@ linters:
- unparam
- unused
- usestdlibvars
# - varcheck # DEPRECATED
# - varnamelen
- whitespace
- wrapcheck
- wsl

# output configuration options
output:
# Format: colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity
#
# Multiple can be specified by separating them by comma, output can be provided
# for each of them by separating format name and path by colon symbol.
# The formats used to render issues.
# Format: `colored-line-number`, `line-number`, `json`, `colored-tab`, `tab`, `checkstyle`, `code-climate`, `junit-xml`, `github-actions`, `teamcity`
# Output path can be either `stdout`, `stderr` or path to the file to write to.
# Example: "checkstyle:report.xml,json:stdout,colored-line-number"
#
# Default: colored-line-number
format: colored-line-number
# For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma.
# The output can be specified for each of them by separating format name and path by colon symbol.
# Example: "--out-format=checkstyle:report.xml,json:stdout,colored-line-number"
# The CLI flag (`--out-format`) override the configuration file.
#
# Default:
# formats:
# - format: colored-line-number
# path: stdout
formats:
- format: colored-line-number
path: stdout

# Print lines of code with issue.
# Default: true
Expand All @@ -174,13 +161,41 @@ output:
# Default is no prefix.
path-prefix: ""

# Sort results by: filepath, line and column.
# Sort results by the order defined in `sort-order`.
sort-results: true

# Order to use when sorting results.
# Require `sort-results` to `true`.
# Possible values: `file`, `linter`, and `severity`.
#
# If the severity values are inside the following list, they are ordered in this order:
# 1. error
# 2. warning
# 3. high
# 4. medium
# 5. low
# Either they are sorted alphabetically.
#
# Default: ["file"]
sort-order:
- linter
- severity
- file # filepath, line, and column.

# Show statistics per linter.
# Default: false
show-stats: true

# all available settings of specific linters
linters-settings:
# asasalint:
# bidichk:

copyloopvar:
# If true, ignore aliasing of loop variables.
# Default: false
ignore-alias: false

# cyclop:

decorder:
Expand Down Expand Up @@ -314,8 +329,6 @@ linters-settings:
# Default: false
explicit-exhaustive-map: false

# exhaustivestruct:

exhaustruct:
# List of regular expressions to match struct packages and names.
# If this list is empty, all structs are tested.
Expand Down Expand Up @@ -384,12 +397,23 @@ linters-settings:
ignore-calls: true

gocritic:
# Which checks should be enabled; can't be combined with 'disabled-checks'.
# See https://go-critic.github.io/overview#checks-overview.
# To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`.
# By default, list of stable checks is used.
# Disable all checks.
# Default: false
# disable-all: true

# Which checks should be enabled in addition to default checks; can't be combined with 'disabled-checks'.
# By default, list of stable checks is used (https://go-critic.github.io/overview#checks-overview):
# appendAssign, argOrder, assignOp, badCall, badCond, captLocal, caseOrder, codegenComment, commentFormatting,
# defaultCaseOrder, deprecatedComment, dupArg, dupBranchBody, dupCase, dupSubExpr, elseif, exitAfterDefer,
# flagDeref, flagName, ifElseChain, mapKey, newDeref, offBy1, regexpMust, singleCaseSwitch, sloppyLen,
# sloppyTypeAssert, switchTrue, typeSwitchVar, underef, unlambda, unslice, valSwap, wrapperFunc
# To see which checks are enabled run `GL_DEBUG=gocritic golangci-lint run --enable=gocritic`.
# enabled-checks:

# Enable all checks.
# Default: false
# enable-all: true

# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
# See https://github.com/go-critic/go-critic#usage -> section "Tags".
# Default: []
Expand All @@ -400,13 +424,6 @@ linters-settings:
- performance
- style

disabled-tags:
- badLock
- badRegexp
- badSyncOnceFunc
- docStub
- whyNoLint

# Settings passed to gocritic.
# The settings key is the name of a supported gocritic checker.
# The list of supported checkers can be find in https://go-critic.github.io/overview.
Expand Down Expand Up @@ -720,9 +737,6 @@ linters-settings:
# gosmopolitan:

govet:
# report about shadowed variables
check-shadowing: true

# Enable analyzers by name.
# (in addition to default:
# appends, asmdecl, assign, atomic, bools, buildtag, cgocall, composites, copylocks, defers, directive, errorsas,
Expand Down Expand Up @@ -804,7 +818,6 @@ linters-settings:
stringmethods: true

# grouper:
# ifshort:

importas:
# Do not allow unaliased imports of aliased packages.
Expand Down Expand Up @@ -864,9 +877,21 @@ linters-settings:
locale: US

# Default: []
# Typos to ignore.
# Should be in lower case.
# ignore-words:
# - someword

# Extra word corrections.
# `typo` and `correction` should only contain letters.
# The words are case-insensitive.
# Default: []
extra-words:
- typo: "iff"
correction: "if"
- typo: "cancelation"
correction: "cancellation"

# musttag:

nakedret:
Expand Down Expand Up @@ -910,6 +935,27 @@ linters-settings:
# Default: false
ignore-missing-subtests: true

perfsprint:
# Optimizes even if it requires an int or uint type cast.
# Default: true
int-conversion: true

# Optimizes into `err.Error()` even if it is only equivalent for non-nil errors.
# Default: false
err-error: false

# Optimizes `fmt.Errorf`.
# Default: true
errorf: true

# Optimizes `fmt.Sprintf` with only one argument.
# Default: true
sprintf1: true

# Optimizes into strings concatenation.
# Default: true
strconcat: true

# prealloc:
# predeclared:
# promlinter:
Expand All @@ -936,6 +982,25 @@ linters-settings:
# Default: false
args-on-sep-lines: false

spancheck:
# Checks to enable.
# Options include:
# - `end`: check that `span.End()` is called
# - `record-error`: check that `span.RecordError(err)` is called when an error is returned
# - `set-status`: check that `span.SetStatus(codes.Error, msg)` is called when an error is returned
# Default: ["end"]
# checks:
# - end
# - record-error
# - set-status

# A list of regexes for function signatures that silence `record-error` and `set-status` reports
# if found in the call path to a returned error.
# https://github.com/jjti/go-spancheck#ignore-check-signatures
# Default: []
# ignore-check-signatures:
# - "telemetry.RecordError"

staticcheck:
# https://staticcheck.io/docs/options#checks
# https://staticcheck.io/docs/checks/
Expand Down Expand Up @@ -1116,6 +1181,15 @@ linters-settings:
# Default: false
constant-kind: false

unconvert:
# Remove conversions that force intermediate rounding.
# Default: false
fast-math: false

# Be more conservative (experimental).
# Default: false
safe: false

unparam:
# Inspect exported functions.
#
Expand Down Expand Up @@ -1176,6 +1250,7 @@ linters-settings:
- .Errorf(
- errors.New(
- errors.Unwrap(
- errors.Join(
- .Wrap(
- .Wrapf(
- .WithMessage(
Expand Down Expand Up @@ -1388,6 +1463,43 @@ issues:
# value for this option is true.
exclude-use-default: false

# Which dirs to exclude: issues from them won't be reported.
# Can use regexp here: `generated.*`, regexp is applied on full path,
# including the path prefix if one is set.
# Default dirs are skipped independently of this option's value (see exclude-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work on Windows.
# Default: []
# exclude-dirs:
# - src/external_libs
# - autogenerated_by_my_lib

# Enables exclude of directories:
# - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
# Default: true
exclude-dirs-use-default: false

# Which files to exclude: they will be analyzed, but issues from them won't be reported.
# There is no need to include all autogenerated files,
# we confidently recognize autogenerated files.
# If it's not, please let us know.
# "/" will be replaced by current OS file path separator to properly work on Windows.
# Default: []
# exclude-files:
# - ".*\\.my\\.go$"
# - lib/bad.go

# To follow strictly the Go generated file convention.
#
# If set to true, source files that have lines matching only the following regular expression will be excluded:
# `^// Code generated .* DO NOT EDIT\.$`
# This line must appear before the first non-comment, non-blank text in the file.
# https://go.dev/s/generatedcode
#
# By default, a lax pattern is applied:
# sources are excluded if they contain lines `autogenerated file`, `code generated`, `do not edit`, etc.
# Default: false
exclude-generated-strict: false

# Fix found issues (if it's supported by the linter).
fix: false

Expand Down
Loading

0 comments on commit 1e16d1c

Please sign in to comment.