Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable use-any rule from revive #19120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/embed/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions server/storage/wal/wal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestNew(t *testing.T) {
func TestCreateNewWALFile(t *testing.T) {
tests := []struct {
name string
fileType interface{}
fileType any
forceNew bool
}{
{
Expand Down Expand Up @@ -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)
Expand Down
21 changes: 12 additions & 9 deletions tools/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ linters-settings: # please keep this alphabetized
- name: context-as-argument
severity: error
disabled: false
- name: context-keys-type
severity: error
disabled: false
- name: dot-imports
severity: error
disabled: false
Expand All @@ -64,13 +67,19 @@ linters-settings: # please keep this alphabetized
- name: error-naming
severity: error
disabled: false
- name: error-strings
severity: error
disabled: false
- name: errorf
severity: error
disabled: false
- name: if-return
severity: error
disabled: false
- name: increment-decrement
severity: error
disabled: false
- name: var-declaration
- name: indent-error-flow
severity: error
disabled: false
- name: package-comments
Expand All @@ -85,16 +94,10 @@ linters-settings: # please keep this alphabetized
- name: time-naming
severity: error
disabled: false
- name: indent-error-flow
severity: error
disabled: false
- name: errorf
severity: error
disabled: false
- name: context-keys-type
- name: use-any
severity: error
disabled: false
- name: error-strings
- name: var-declaration
severity: error
disabled: false
- name: var-naming
Expand Down
Loading