diff --git a/server/embed/config.go b/server/embed/config.go index 3a382056834..2ea9e7dc179 100644 --- a/server/embed/config.go +++ b/server/embed/config.go @@ -832,7 +832,7 @@ func (cfg *configYAML) configFromFile(path string) error { } // parses the yaml bytes to raw map first, then getBoolFlagVal can get the top level bool flag value. - var cfgMap map[string]interface{} + var cfgMap map[string]any err = yaml.Unmarshal(b, &cfgMap) if err != nil { return err diff --git a/server/storage/wal/wal_test.go b/server/storage/wal/wal_test.go index a9e6dc84910..b7bebfb410f 100644 --- a/server/storage/wal/wal_test.go +++ b/server/storage/wal/wal_test.go @@ -97,7 +97,7 @@ func TestNew(t *testing.T) { func TestCreateNewWALFile(t *testing.T) { tests := []struct { name string - fileType interface{} + fileType any forceNew bool }{ { @@ -130,7 +130,7 @@ func TestCreateNewWALFile(t *testing.T) { err := os.WriteFile(p, []byte("test data"), fileutil.PrivateFileMode) require.NoError(t, err) - var f interface{} + var f any switch tt.fileType.(type) { case *os.File: f, err = createNewWALFile[*os.File](p, tt.forceNew) diff --git a/tools/.golangci.yaml b/tools/.golangci.yaml index 3ea8ab82302..afaaa6a91dc 100644 --- a/tools/.golangci.yaml +++ b/tools/.golangci.yaml @@ -44,58 +44,41 @@ linters-settings: # please keep this alphabetized # Align with https://github.com/alexkohler/nakedret/blob/v1.0.2/cmd/nakedret/main.go#L10 max-func-lines: 5 revive: - ignore-generated-header: false - severity: error confidence: 0.8 - enable-all-rules: false rules: - name: blank-imports - severity: error disabled: false - name: context-as-argument - severity: error + disabled: false + - name: context-keys-type disabled: false - name: dot-imports - severity: error disabled: false - name: error-return - severity: error disabled: false - name: error-naming - severity: error + disabled: false + - name: error-strings + disabled: false + - name: errorf disabled: false - name: if-return - severity: error disabled: false - name: increment-decrement - severity: error disabled: false - - name: var-declaration - severity: error + - name: indent-error-flow disabled: false - name: package-comments - severity: error disabled: false - name: range - severity: error disabled: false - name: receiver-naming - severity: error disabled: false - name: time-naming - severity: error disabled: false - - name: indent-error-flow - severity: error - disabled: false - - name: errorf - severity: error + - name: use-any disabled: false - - name: context-keys-type - severity: error - disabled: false - - name: error-strings - severity: error + - name: var-declaration disabled: false - name: var-naming disabled: false