chore(linters): Enable `datarace` rule for revive (#15984)
This commit is contained in:
parent
391b4b86a7
commit
3f04c52621
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue