Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Jun 19, 2024
1 parent 08b1e76 commit 276976b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ issues:
exclude-use-default: false
exclude-files:
- scanner/providers/gitcoin/gitcoin_stamps.go
- scripts/*
linters:
enable:
- misspell
Expand Down
14 changes: 9 additions & 5 deletions scanner/filter/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ package filter
type TokenFilter struct{}

// LoadFilter loads a filter from a file.
func LoadFilter(basePath, fileName string) (*TokenFilter, error) { return &TokenFilter{}, nil }
func LoadFilter(basePath, fileName string) (*TokenFilter, error) {
tf := &TokenFilter{}
_ = tf.loadLocalFilters()
return tf, nil
}

// Add adds a key to the filter.
func (tf *TokenFilter) Add(key []byte) {}
func (tf *TokenFilter) Add(key []byte) { tf.add(key) }

// Test checks if a key is in the filter.
func (tf *TokenFilter) Test(key []byte) bool { return false }
func (tf *TokenFilter) Test(key []byte) bool { return tf.test(key) }

// TestAndAdd checks if a key is in the filter, if not, add it to the filter. It
// is the combination of Test and conditional Add.
Expand All @@ -24,5 +28,5 @@ func (tf *TokenFilter) TestAndAdd(key []byte) bool { return false }
func (tf *TokenFilter) Commit() error { return nil }

func (tf *TokenFilter) loadLocalFilters() error { return nil }
func (tf *TokenFilter) add(key ...string) {}
func (tf *TokenFilter) test(key string) bool { return false }
func (tf *TokenFilter) add(key ...[]byte) {}
func (tf *TokenFilter) test(key []byte) bool { return false }

0 comments on commit 276976b

Please sign in to comment.