Skip to content

fix: reject include without taskfile or dir#2892

Open
Lewin671 wants to merge 1 commit into
go-task:mainfrom
Lewin671:fix/include-missing-taskfile-error
Open

fix: reject include without taskfile or dir#2892
Lewin671 wants to merge 1 commit into
go-task:mainfrom
Lewin671:fix/include-missing-taskfile-error

Conversation

@Lewin671

Copy link
Copy Markdown

Fixes #1881.

What changed

  • Reject advanced include mappings that specify neither taskfile nor dir.
  • Add a regression test for the malformed include case from the issue.
  • Assert the old misleading include-cycle error is no longer returned.

Why

A mapping under includes: without a Taskfile path currently falls through to default Taskfile discovery. In the issue example, that makes a simple configuration mistake look like an include cycle. Failing during Taskfile decoding gives the user a direct configuration error instead.

Validation

  • go test ./...
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest run

@Lewin671 Lewin671 marked this pull request as ready for review June 26, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect/confusing include cycle detected error message after a silly mistake

1 participant