Skip to content

Commit

Permalink
Re-enable deprecated maligned linter
Browse files Browse the repository at this point in the history
Disable govet:fieldalignment, re-enable deprecated maligned
linter until the Go team offers more control over the types
of checks provided by the fieldalignment linter or
golangci-lint does so.

refs GH-302
  • Loading branch information
atc0005 committed Apr 15, 2021
1 parent 2646540 commit d6c2119
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 12 deletions.
24 changes: 18 additions & 6 deletions .golangci.yml
Expand Up @@ -29,16 +29,28 @@ linters:
- golint
- gosec
- govet

# Deprecated linter, but still functional as of golangci-lint v1.39.0.
# See https://github.com/atc0005/go-ci/issues/302 for more information.
- maligned

- misspell
- prealloc
- staticcheck
- stylecheck
- unconvert
#
# Disable fieldalignment settings until the Go team offers more control over
# the types of checks provided by the fieldalignment linter or golangci-lint
# does so.
#
# See https://github.com/atc0005/go-ci/issues/302 for more information.
#

disable:
- maligned
# disable:
# - maligned

linters-settings:
govet:
enable:
- fieldalignment
# linters-settings:
# govet:
# enable:
# - fieldalignment
30 changes: 24 additions & 6 deletions unstable/.golangci.yml
Expand Up @@ -40,14 +40,26 @@ linters:
- golint
- gosec
- govet

# Deprecated linter, but still functional as of golangci-lint v1.39.0.
# See https://github.com/atc0005/go-ci/issues/302 for more information.
- maligned

- misspell
- prealloc
- staticcheck
- stylecheck
- unconvert

disable:
- maligned
#
# Disable govet:fieldalignment, re-enable deprecated maligned linter until the
# Go team offers more control over the types of checks provided by the
# fieldalignment linter or golangci-lint does so.
#
# See https://github.com/atc0005/go-ci/issues/302 for more information.
#
# disable:
# - maligned

linters-settings:
gocognit:
Expand All @@ -57,7 +69,13 @@ linters-settings:
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 15

govet:
enable:
- fieldalignment
#
# Disable govet:fieldalignment, re-enable deprecated maligned linter until the
# Go team offers more control over the types of checks provided by the
# fieldalignment linter or golangci-lint does so.
#
# See https://github.com/atc0005/go-ci/issues/302 for more information.
#
# govet:
# enable:
# - fieldalignment

0 comments on commit d6c2119

Please sign in to comment.