Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

Replace deprecated deadline flag with timeout #152

Merged
merged 2 commits into from
Oct 14, 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
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
deadline: 2m
timeout: 2m

linters-settings:
govet:
Expand Down
2 changes: 1 addition & 1 deletion pkg/goenvbuild/ensuredeps/ensure.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (r *Runner) syncDeps(ctx context.Context, repoName string) error {

func (r Runner) checkDeps(ctx context.Context, repoName string) error {
r.log.Infof("Checking deps...")
out, _ := r.cr.Run(ctx, "golangci-lint", "run", "--no-config", "--disable-all", "-E", "typecheck", "--deadline=5m")
out, _ := r.cr.Run(ctx, "golangci-lint", "run", "--no-config", "--disable-all", "-E", "typecheck", "--timeout=5m")
lines := strings.Split(out, "\n")
for _, line := range lines {
line = strings.TrimSpace(strings.ToLower(line))
Expand Down
2 changes: 1 addition & 1 deletion pkg/goenvbuild/preparer.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func parseVersion(v string) (*version, error) {

func (p Preparer) runGolangciLint(ctx context.Context, sg *result.StepGroup, runner *command.StreamingRunner) error {
cmd := "golangci-lint"
args := []string{"run", "-v", "--deadline=5m"}
args := []string{"run", "-v", "--timeout=5m"}
sg.AddStepCmd(cmd, args...)
_, err := runner.Run(ctx, cmd, args...)
return err
Expand Down
2 changes: 1 addition & 1 deletion pkg/worker/analyze/linters/golinters/golangci_lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (g GolangciLint) Run(ctx context.Context, sg *logresult.StepGroup, exec exe
"run",
"--out-format=json",
"--issues-exit-code=0",
"--deadline=5m",
"--timeout=5m",
"--new=false",
"--new-from-rev=",
"--new-from-patch=" + g.PatchPath,
Expand Down