Skip to content

Commit

Permalink
Hygiene: enable additional lint presets.
Browse files Browse the repository at this point in the history
This PR opts us into remaining `golangci` presets and removes the
`disable-all` configuration such that we automatically inherit new
default linters.

To get here, I opted out from `staticcheck` and `ineffassign`, both of
which will require us to clean up existing issues prior to enablement.
That can be done in future PRs.

Context: tektoncd#5899
  • Loading branch information
bendory authored and tekton-robot committed Mar 1, 2023
1 parent f0b8c16 commit 4ee897b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ linters-settings:
packages-with-error-message:
- k8s.io/apimachinery/pkg/util/clock: 'use k8s.io/utils/clock or k8s.io/utils/clock/testing'
linters:
disable-all: true
enable:
- bodyclose
- decorder
Expand All @@ -36,11 +35,24 @@ linters:
- unused
- usestdlibvars
- whitespace
disable:
- ineffassign
- staticcheck
# Enabling presets means that new linters that we automatically adopt new
# linters that augment a preset. This also opts us in for replacement linters
# when a linter is deprecated.
presets:
- bugs
- comment
- complexity
- error
- format
- import
- metalinter
- module
- performance
- sql
- style
- test
- unused
output:
Expand Down

0 comments on commit 4ee897b

Please sign in to comment.