chore(linters): Enable `datarace` rule for revive (#15984)

This commit is contained in:
Paweł Żak 2024-10-08 11:10:39 +02:00 committed by GitHub
parent 391b4b86a7
commit 3f04c52621
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 9 deletions

View File

@ -254,6 +254,7 @@ linters-settings:
- name: constant-logical-expr - name: constant-logical-expr
- name: context-as-argument - name: context-as-argument
- name: context-keys-type - name: context-keys-type
- name: datarace
- name: deep-exit - name: deep-exit
- name: defer - name: defer
- name: dot-imports - name: dot-imports

View File

@ -31,9 +31,9 @@ func TestShimSetsUpLogger(t *testing.T) {
require.NoError(t, err) 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) { func runErroringInputPlugin(t *testing.T, interval time.Duration, stdin io.Reader, stdout, stderr io.Writer) (chan bool, chan bool) {
metricProcessed = make(chan bool, 1) metricProcessed := make(chan bool, 1)
exited = make(chan bool, 1) exited := make(chan bool, 1)
inp := &erroringInput{} inp := &erroringInput{}
shim := New() shim := New()

View File

@ -54,9 +54,9 @@ func TestInputShimStdinSignalingWorks(t *testing.T) {
<-exited <-exited
} }
func runInputPlugin(t *testing.T, interval time.Duration, stdin io.Reader, stdout, stderr io.Writer) (metricProcessed chan bool, exited 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, 1) metricProcessed := make(chan bool, 1)
exited = make(chan bool, 1) exited := make(chan bool, 1)
inp := &testInput{ inp := &testInput{
metricProcessed: metricProcessed, metricProcessed: metricProcessed,
} }

View File

@ -53,9 +53,9 @@ func TestShimStdinSignalingWorks(t *testing.T) {
<-exited <-exited
} }
func runInputPlugin(t *testing.T, interval time.Duration, stdin io.Reader, stdout, stderr io.Writer) (metricProcessed, exited 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) metricProcessed := make(chan bool)
exited = make(chan bool) exited := make(chan bool)
inp := &testInput{ inp := &testInput{
metricProcessed: metricProcessed, metricProcessed: metricProcessed,
} }