Skip to content

Commit

Permalink
chore: Update golangci-lint to 1.44.0 (argoproj#1578)
Browse files Browse the repository at this point in the history
This commit updates golangci-lint and removes the interfacer check because it
was marked as deprecated and will be removed. See
golangci/golangci-lint#541 for more information.

Signed-off-by: William Van Hevelingen <[email protected]>
  • Loading branch information
blkperl authored Feb 1, 2022
1 parent 8f20be2 commit f752d25
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 23 deletions.
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)
failureActionReg := regexp.MustCompile(logTriggerActionFailed)
successEventReg := regexp.MustCompile(logEventSuccessful)
failureEventReg := regexp.MustCompile(logEventFailed)

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

0 comments on commit f752d25

Please sign in to comment.