Skip to content

Commit 28408ef

Browse files
authored
fix(schema): workaround IntelliJ JSON Schema validation bug (#2576)
1 parent a2d34ff commit 28408ef

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
(e.g., URLs or namespaced functions) (#2101, #2573 by @vmaerten).
4949
- The `--yes` flag is now accessible in templates via the new `CLI_ASSUME_YES`
5050
variable (#2577, #2479 by @semihbkgr).
51+
- Fixed false positive "property 'for' is not allowed" warnings in IntelliJ when
52+
using `for` loops in Taskfiles (#2576 by @vmaerten).
5153

5254
## v3.45.5 - 2025-11-11
5355

website/src/public/schema.json

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@
233233
"$ref": "#/definitions/defer_cmd_call"
234234
},
235235
{
236-
"$ref": "#/definitions/for_cmds_call"
236+
"$ref": "#/definitions/for_cmd_call"
237+
},
238+
{
239+
"$ref": "#/definitions/for_task_call"
237240
}
238241
]
239242
},
@@ -401,7 +404,7 @@
401404
"additionalProperties": false,
402405
"required": ["defer"]
403406
},
404-
"for_cmds_call": {
407+
"for_cmd_call": {
405408
"type": "object",
406409
"properties": {
407410
"for": {
@@ -415,6 +418,20 @@
415418
"description": "Silent mode disables echoing of command before Task runs it",
416419
"type": "boolean"
417420
},
421+
"platforms": {
422+
"description": "Specifies which platforms the command should be run on.",
423+
"$ref": "#/definitions/platforms"
424+
}
425+
},
426+
"additionalProperties": false,
427+
"required": ["for", "cmd"]
428+
},
429+
"for_task_call": {
430+
"type": "object",
431+
"properties": {
432+
"for": {
433+
"$ref": "#/definitions/for"
434+
},
418435
"task": {
419436
"description": "Task to run",
420437
"type": "string"
@@ -423,14 +440,17 @@
423440
"description": "Values passed to the task called",
424441
"$ref": "#/definitions/vars"
425442
},
443+
"silent": {
444+
"description": "Silent mode disables echoing of command before Task runs it",
445+
"type": "boolean"
446+
},
426447
"platforms": {
427448
"description": "Specifies which platforms the command should be run on.",
428449
"$ref": "#/definitions/platforms"
429450
}
430451
},
431-
"oneOf": [{ "required": ["cmd"] }, { "required": ["task"] }],
432452
"additionalProperties": false,
433-
"required": ["for"]
453+
"required": ["for", "task"]
434454
},
435455
"for_deps_call": {
436456
"type": "object",
@@ -451,9 +471,8 @@
451471
"$ref": "#/definitions/vars"
452472
}
453473
},
454-
"oneOf": [{ "required": ["cmd"] }, { "required": ["task"] }],
455474
"additionalProperties": false,
456-
"required": ["for"]
475+
"required": ["for", "task"]
457476
},
458477
"for": {
459478
"anyOf": [
@@ -475,7 +494,7 @@
475494
"description": "A list of values to iterate over",
476495
"type": "array",
477496
"items": {
478-
"type": "string"
497+
"type": ["string", "number"]
479498
}
480499
},
481500
"for_attribute": {

0 commit comments

Comments
 (0)