Skip to content

Commit

Permalink
chore(linters): Enable datarace rule for revive
Browse files Browse the repository at this point in the history
  • Loading branch information
zak-pawel committed Oct 5, 2024
1 parent 40d7961 commit aabe040
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ linters-settings:
- name: constant-logical-expr
- name: context-as-argument
- name: context-keys-type
- name: datarace
- name: deep-exit
- name: defer
- name: dot-imports
Expand Down
6 changes: 3 additions & 3 deletions plugins/common/shim/goshim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func TestShimSetsUpLogger(t *testing.T) {
require.NoError(t, err)
}

func runErroringInputPlugin(t *testing.T, interval time.Duration, stdin io.Reader, stdout, stderr io.Writer) (metricProcessed chan bool, exited chan bool) {
metricProcessed = make(chan bool, 1)
exited = make(chan bool, 1)
func runErroringInputPlugin(t *testing.T, interval time.Duration, stdin io.Reader, stdout, stderr io.Writer) (chan bool, chan bool) {
metricProcessed := make(chan bool, 1)
exited := make(chan bool, 1)
inp := &erroringInput{}

shim := New()
Expand Down
6 changes: 3 additions & 3 deletions plugins/common/shim/input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ func TestInputShimStdinSignalingWorks(t *testing.T) {
<-exited
}

func runInputPlugin(t *testing.T, interval time.Duration, stdin io.Reader, stdout, stderr io.Writer) (metricProcessed chan bool, exited chan bool) {
metricProcessed = make(chan bool, 1)
exited = make(chan bool, 1)
func runInputPlugin(t *testing.T, interval time.Duration, stdin io.Reader, stdout, stderr io.Writer) (chan bool, chan bool) {
metricProcessed := make(chan bool, 1)
exited := make(chan bool, 1)
inp := &testInput{
metricProcessed: metricProcessed,
}
Expand Down
6 changes: 3 additions & 3 deletions plugins/inputs/execd/shim/shim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ func TestShimStdinSignalingWorks(t *testing.T) {
<-exited
}

func runInputPlugin(t *testing.T, interval time.Duration, stdin io.Reader, stdout, stderr io.Writer) (metricProcessed, exited chan bool) {
metricProcessed = make(chan bool)
exited = make(chan bool)
func runInputPlugin(t *testing.T, interval time.Duration, stdin io.Reader, stdout, stderr io.Writer) (chan bool, chan bool) {
metricProcessed := make(chan bool)
exited := make(chan bool)
inp := &testInput{
metricProcessed: metricProcessed,
}
Expand Down

0 comments on commit aabe040

Please sign in to comment.