Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update golangci-lint to 1.44.0 #1578

Merged
merged 1 commit into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ linters:
- gosimple
- govet
- ineffassign
- interfacer
- misspell
- nakedret
- rowserrcheck
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ start: image
kubectl -n argo-events wait --for=condition=Ready --timeout 60s pod --all

$(GOPATH)/bin/golangci-lint:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b `go env GOPATH`/bin v1.42.1
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b `go env GOPATH`/bin v1.44.0

.PHONY: lint
lint: $(GOPATH)/bin/golangci-lint
Expand Down
3 changes: 2 additions & 1 deletion eventsources/sources/amqp/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ package amqp
import (
"context"
"encoding/json"
"sigs.k8s.io/yaml"
"time"

"sigs.k8s.io/yaml"

"github.com/pkg/errors"
amqplib "github.com/streadway/amqp"
"go.uber.org/zap"
Expand Down
3 changes: 2 additions & 1 deletion eventsources/sources/amqp/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ limitations under the License.
package amqp

import (
"github.com/stretchr/testify/assert"
"testing"

"github.com/stretchr/testify/assert"
)

func TestParseYamlTable(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion eventsources/sources/kafka/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func (el *EventListener) partitionConsumer(ctx context.Context, log *zap.Sugared
}
}

func getSaramaConfig(kafkaEventSource *v1alpha1.KafkaEventSource, log *zap.SugaredLogger) (*sarama.Config, error) { //nolint:interfacer
func getSaramaConfig(kafkaEventSource *v1alpha1.KafkaEventSource, log *zap.SugaredLogger) (*sarama.Config, error) {
config := sarama.NewConfig()

if kafkaEventSource.Version == "" {
Expand Down
1 change: 0 additions & 1 deletion sensors/dependencies/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -922,5 +922,4 @@ func TestFilter(t *testing.T) {
assert.Error(t, err)
assert.False(t, pass)
})

}
21 changes: 4 additions & 17 deletions test/stress/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,23 +277,10 @@ func (o *options) runTesting(ctx context.Context, eventSourceName, sensorName st
return fmt.Errorf("no pod found for sensor %s", sensorName)
}

successActionReg, err := regexp.Compile(logTriggerActionSuccessful)
if err != nil {
return fmt.Errorf("failed to compile regex for sensor success pattern: %v", err)
}
failureActionReg, err := regexp.Compile(logTriggerActionFailed)
if err != nil {
return fmt.Errorf("failed to compile regex for sensor failure pattern: %v", err)
}

successEventReg, err := regexp.Compile(logEventSuccessful)
if err != nil {
return fmt.Errorf("failed to compile regex for event source success pattern: %v", err)
}
failureEventReg, err := regexp.Compile(logEventFailed)
if err != nil {
return fmt.Errorf("failed to compile regex for event source failure pattern: %v", err)
}
successActionReg := regexp.MustCompile(logTriggerActionSuccessful)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

failureActionReg := regexp.MustCompile(logTriggerActionFailed)
successEventReg := regexp.MustCompile(logEventSuccessful)
failureEventReg := regexp.MustCompile(logEventFailed)

fmt.Printf(`
*********************************************************
Expand Down