Skip to content

Commit 21b8595

Browse files
committed
enable a few more linters
1 parent 42a6311 commit 21b8595

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ linters:
77
- asciicheck
88
- bidichk
99
- containedctx
10+
- contextcheck
1011
- copyloopvar
1112
- decorder
1213
- depguard
1314
- dogsled
15+
- dupword
1416
- durationcheck
1517
- embeddedstructfieldcheck
1618
- errcheck
@@ -19,6 +21,7 @@ linters:
1921
- exptostd
2022
- fatcontext
2123
- forbidigo
24+
- forcetypeassert
2225
- ginkgolinter
2326
- gocheckcompilerdirectives
2427
- godoclint
@@ -55,6 +58,7 @@ linters:
5558
- testableexamples
5659
- testifylint
5760
- thelper
61+
- tparallel
5862
- unconvert
5963
- unparam
6064
- unused

taskfile/task_execution.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ func (r *Runner) Run(name, cliArgs string, extraVars ...map[string]Var) error {
8080
}
8181

8282
entry, _ := r.runs.LoadOrStore(resolved, &taskRun{})
83-
return entry.(*taskRun).do(func() error {
83+
tr, ok := entry.(*taskRun)
84+
if !ok {
85+
return fmt.Errorf("internal error: unexpected runs entry type %T for task %q", entry, resolved)
86+
}
87+
return tr.do(func() error {
8488
return r.run(resolved, cliArgs, nil)
8589
})
8690
}

0 commit comments

Comments
 (0)