fix(schema): workaround IntelliJ JSON Schema validation bug by vmaerten · Pull Request #2576 · go-task/task

added 2 commits

December 14, 2025 10:06
IntelliJ/PhpStorm has a bug (IJPL-63564) where it incorrectly validates
YAML files against JSON schemas that use `oneOf` with `required` constraints.

This causes false positive "property 'for' is not allowed" warnings.

Changes:
- Split `for_cmds_call` into `for_cmd_call` and `for_task_call`
  Each definition now has its own `required` array instead of using
  `oneOf: [{ required: ["cmd"] }, { required: ["task"] }]`

- Fix bug in `for_deps_call` where `oneOf` referenced non-existent
  `cmd` property (deps can only call tasks, not commands)

The schema remains semantically equivalent - the `additionalProperties: false`
on each split definition ensures mutual exclusivity of cmd/task.

@vmaerten vmaerten marked this pull request as ready for review

December 14, 2025 09:44

@vmaerten

@vmaerten

@vmaerten vmaerten deleted the fix/json-schema-intellij-workaround branch

December 15, 2025 22:03

Copilot AI pushed a commit to libor-m/task that referenced this pull request

Mar 27, 2026
…2576)

Co-authored-by: libor-m <1497769+libor-m@users.noreply.github.com>