Bug Report: Incorrect Godoc Comments on WithVersionCheck and WithFailfast
Description
Two With* option constructor functions in executor.go have copy-pasted, incorrect doc comments that describe the wrong behaviour. This is a documentation bug that will mislead anyone reading the API via go doc or pkg.go.dev.
Location
File: executor.go
WithVersionCheck (line 612):
// WithVersionCheck tells the [Executor] whether or not to check the version of
func WithVersionCheck(enableVersionCheck bool) ExecutorOption {
The comment is incomplete/truncated — it doesn't say what it checks the version of, and it never finishes the sentence.
WithFailfast (line 625):
// WithFailfast tells the [Executor] whether or not to check the version of
func WithFailfast(failfast bool) ExecutorOption {
The comment for WithFailfast is wrong — it's a direct copy of the incomplete WithVersionCheck comment. WithFailfast has nothing to do with version checking; it configures whether the executor stops immediately when any task fails.
Expected Behaviour
WithVersionCheck should have a comment that accurately describes enabling/disabling the Taskfile schema version check.
WithFailfast should have a comment describing that it configures the executor to stop executing further tasks after the first failure.
Suggested Fix
// WithVersionCheck tells the [Executor] whether or not to check the schema
// version of the Taskfile before running.
func WithVersionCheck(enableVersionCheck bool) ExecutorOption {
// WithFailfast tells the [Executor] to stop running tasks as soon as any task
// returns an error.
func WithFailfast(failfast bool) ExecutorOption {
Steps to Reproduce
- Open
executor.go
- Navigate to line 612 (
WithVersionCheck) and line 625 (WithFailfast)
- Observe that both comments say "tells the [Executor] whether or not to check the version of" —
WithFailfast's comment is clearly copy-pasted from WithVersionCheck and is wrong.
Impact
- Misleads library consumers reading Go docs
WithFailfast is particularly confusing since its comment describes an unrelated feature
Contribution
I'd like to submit a fix for this. This is a simple documentation-only change with no behaviour impact.
Bug Report: Incorrect Godoc Comments on
WithVersionCheckandWithFailfastDescription
Two
With*option constructor functions inexecutor.gohave copy-pasted, incorrect doc comments that describe the wrong behaviour. This is a documentation bug that will mislead anyone reading the API viago docor pkg.go.dev.Location
File:
executor.goWithVersionCheck(line 612):The comment is incomplete/truncated — it doesn't say what it checks the version of, and it never finishes the sentence.
WithFailfast(line 625):The comment for
WithFailfastis wrong — it's a direct copy of the incompleteWithVersionCheckcomment.WithFailfasthas nothing to do with version checking; it configures whether the executor stops immediately when any task fails.Expected Behaviour
WithVersionCheckshould have a comment that accurately describes enabling/disabling the Taskfile schema version check.WithFailfastshould have a comment describing that it configures the executor to stop executing further tasks after the first failure.Suggested Fix
Steps to Reproduce
executor.goWithVersionCheck) and line 625 (WithFailfast)WithFailfast's comment is clearly copy-pasted fromWithVersionCheckand is wrong.Impact
WithFailfastis particularly confusing since its comment describes an unrelated featureContribution
I'd like to submit a fix for this. This is a simple documentation-only change with no behaviour impact.