From 6cf6941a7709e290e2d42b54bf229b1e4b2372ea Mon Sep 17 00:00:00 2001 From: kyu08 <49891479+kyu08@users.noreply.github.com> Date: Wed, 22 May 2024 14:00:55 +0900 Subject: Add `copyloopvar` to enabled linters --- .golangci.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.golangci.yml') diff --git a/.golangci.yml b/.golangci.yml index 85a956508..169150a57 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,10 +14,16 @@ linters: - exhaustive - makezero - nakedret + - copyloopvar # - goconst # TODO: enable and fix issues fast: false linters-settings: + copyloopvar: + # Check all assigning the loop variable to another variable. + # Default: false + # If true, an assignment like `a := x` will be detected as an error. + check-alias: true exhaustive: default-signifies-exhaustive: true staticcheck: -- cgit v1.2.3