From d6c2119b80470f8209a7999ad6066e4ab506bb40 Mon Sep 17 00:00:00 2001 From: Adam Chalkley Date: Thu, 15 Apr 2021 04:56:03 -0500 Subject: [PATCH] Re-enable deprecated maligned linter 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 --- .golangci.yml | 24 ++++++++++++++++++------ unstable/.golangci.yml | 30 ++++++++++++++++++++++++------ 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 0828fe7e..ab0c6970 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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 diff --git a/unstable/.golangci.yml b/unstable/.golangci.yml index ce4fd9d1..57408160 100644 --- a/unstable/.golangci.yml +++ b/unstable/.golangci.yml @@ -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: @@ -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