linters: enable scopelint (#3963)

* Pin range scope vars

* Don't disable scopelint

This PR repairs linter errors seen when running the following commands:
golangci-lint run --no-config --disable-all=true --enable=scopelint

Contributes to #3262
This commit is contained in:
Phil Salant
2019-09-11 01:15:18 -04:00
committed by Anton Kaliaev
parent 961e1d360f
commit d1d517a9b7
33 changed files with 73 additions and 1 deletions

View File

@ -75,6 +75,7 @@ func TestLoadAndUpgrade(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
// need to re-write the file everytime because upgrading renames it
err := ioutil.WriteFile(oldFilePath, []byte(oldPrivvalContent), 0600)