Skip to content

Commit

Permalink
chore: enable use-any rule from revive
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 committed Jan 1, 2025
1 parent f307354 commit ae6749c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
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

0 comments on commit ae6749c

Please sign in to comment.