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

Fix the lint target #1505

Merged
merged 1 commit into from
Jul 31, 2019
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
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ STATIC_BUILD=true
# build development images
DEV_IMAGE=false

GOLANGCI_EXISTS := $(shell command -v golangci-lint 2> /dev/null)

override LDFLAGS += \
-X ${PACKAGE}.version=${VERSION} \
-X ${PACKAGE}.buildDate=${BUILD_DATE} \
Expand Down Expand Up @@ -127,9 +129,12 @@ endif

.PHONY: lint
lint:
ifdef GOLANGCI_EXISTS
golangci-lint run --config golangci.yml
else
# Remove gometalinter after a migration time.
(command -v golangci-lint >/dev/null 2>&1 && golangci-lint run --config golangci.yml) || \
gometalinter --config gometalinter.json ./...
endif

.PHONY: test
test:
Expand Down
3 changes: 1 addition & 2 deletions cmd/argo/commands/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ func NewListCommand() *cobra.Command {
log.Fatal(err)
}

var tmpWorkFlows []wfv1.Workflow
tmpWorkFlows = wfList.Items
tmpWorkFlows := wfList.Items
for wfList.ListMeta.Continue != "" {
listOpts.Continue = wfList.ListMeta.Continue
wfList, err = wfClient.List(listOpts)
Expand Down
3 changes: 2 additions & 1 deletion cmd/argoexec/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package commands

import (
"encoding/json"
"github.com/argoproj/argo/util"
"os"

"github.com/argoproj/argo/util"

"github.com/argoproj/pkg/cli"
kubecli "github.com/argoproj/pkg/kube/cli"
log "github.com/sirupsen/logrus"
Expand Down
3 changes: 2 additions & 1 deletion workflow/controller/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package controller
import (
"encoding/json"
"fmt"
"strings"

"github.com/argoproj/argo/errors"
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
"github.com/argoproj/argo/workflow/common"
"github.com/valyala/fasttemplate"
"strings"
)

// dagContext holds context information about this context's DAG
Expand Down
3 changes: 2 additions & 1 deletion workflow/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/argoproj/argo/util"
"io"
"io/ioutil"
"net/url"
Expand All @@ -20,6 +19,8 @@ import (
"syscall"
"time"

"github.com/argoproj/argo/util"

argofile "github.com/argoproj/pkg/file"
log "github.com/sirupsen/logrus"
apiv1 "k8s.io/api/core/v1"
Expand Down