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

Commit ba9e131

Browse files
authored
Merge pull request #152 from vthiery/replace-deadline-flag-with-timeout
Replace deprecated deadline flag with timeout
2 parents e6a9d94 + 039124e commit ba9e131

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
run:
2-
deadline: 2m
2+
timeout: 2m
33

44
linters-settings:
55
govet:

pkg/goenvbuild/ensuredeps/ensure.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func (r *Runner) syncDeps(ctx context.Context, repoName string) error {
161161

162162
func (r Runner) checkDeps(ctx context.Context, repoName string) error {
163163
r.log.Infof("Checking deps...")
164-
out, _ := r.cr.Run(ctx, "golangci-lint", "run", "--no-config", "--disable-all", "-E", "typecheck", "--deadline=5m")
164+
out, _ := r.cr.Run(ctx, "golangci-lint", "run", "--no-config", "--disable-all", "-E", "typecheck", "--timeout=5m")
165165
lines := strings.Split(out, "\n")
166166
for _, line := range lines {
167167
line = strings.TrimSpace(strings.ToLower(line))

pkg/goenvbuild/preparer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ func parseVersion(v string) (*version, error) {
282282

283283
func (p Preparer) runGolangciLint(ctx context.Context, sg *result.StepGroup, runner *command.StreamingRunner) error {
284284
cmd := "golangci-lint"
285-
args := []string{"run", "-v", "--deadline=5m"}
285+
args := []string{"run", "-v", "--timeout=5m"}
286286
sg.AddStepCmd(cmd, args...)
287287
_, err := runner.Run(ctx, cmd, args...)
288288
return err

pkg/worker/analyze/linters/golinters/golangci_lint.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (g GolangciLint) Run(ctx context.Context, sg *logresult.StepGroup, exec exe
3232
"run",
3333
"--out-format=json",
3434
"--issues-exit-code=0",
35-
"--deadline=5m",
35+
"--timeout=5m",
3636
"--new=false",
3737
"--new-from-rev=",
3838
"--new-from-patch=" + g.PatchPath,

0 commit comments

Comments
 (0)