1
mirror of https://github.com/rclone/rclone synced 2024-11-23 00:06:55 +01:00

build: add lint ignore comment required for golangci-staticcheck in addition to stand-alone staticcheck

This commit is contained in:
albertony 2022-08-20 15:25:39 +02:00
parent 547f943851
commit 254c6ef1dd
2 changed files with 6 additions and 2 deletions

View File

@ -11,7 +11,9 @@ func TestGetConfig(t *testing.T) {
ctx := context.Background()
// Check nil
config := GetConfig(nil) //lint:ignore SA1012 we want to test passing a nil Context and therefore ignore lint suggestion of using context.TODO
//lint:ignore SA1012 false positive when running staticcheck, we want to test passing a nil Context and therefore ignore lint suggestion to use context.TODO
//nolint:staticcheck // Don't include staticcheck when running golangci-lint to avoid SA1012
config := GetConfig(nil)
assert.Equal(t, globalConfig, config)
// Check empty config

View File

@ -848,7 +848,9 @@ func TestGetConfig(t *testing.T) {
ctx := context.Background()
// Check nil
config := GetConfig(nil) //lint:ignore SA1012 we want to test passing a nil Context and therefore ignore lint suggestion of using context.TODO
//lint:ignore SA1012 false positive when running staticcheck, we want to test passing a nil Context and therefore ignore lint suggestion to use context.TODO
//nolint:staticcheck // Don't include staticcheck when running golangci-lint to avoid SA1012
config := GetConfig(nil)
assert.Equal(t, globalConfig, config)
// Check empty config