mirror of
https://github.com/rclone/rclone
synced 2024-11-27 05:23:40 +01:00
build: add lint ignore comment required for golangci-staticcheck in addition to stand-alone staticcheck
This commit is contained in:
parent
547f943851
commit
254c6ef1dd
@ -11,7 +11,9 @@ func TestGetConfig(t *testing.T) {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
// Check nil
|
// 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)
|
assert.Equal(t, globalConfig, config)
|
||||||
|
|
||||||
// Check empty config
|
// Check empty config
|
||||||
|
@ -848,7 +848,9 @@ func TestGetConfig(t *testing.T) {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
// Check nil
|
// 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)
|
assert.Equal(t, globalConfig, config)
|
||||||
|
|
||||||
// Check empty config
|
// Check empty config
|
||||||
|
Loading…
Reference in New Issue
Block a user