mirror of
https://github.com/rclone/rclone.git
synced 2025-08-10 06:09:44 +02:00
build: add lint ignore comment required for golangci-staticcheck in addition to stand-alone staticcheck
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user