Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion e2e/config/test_schema_tombi
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ strict = true

[[schemas]]
path = "file://$SCHEMA_PATH"
include = ["mise-bad.toml", "mise-bad-age.toml", "mise-bad-dotfiles.toml", "mise-bad-env-default.toml", "mise-bad-env-directive.toml", "mise-bad-env-float.toml", "mise-bad-install-env-float.toml", "mise-bad-minimum-release-age-array.toml", "mise-bad-minimum-release-age-table.toml", "mise-bad-package-state.toml", "mise-bad-postinstall.toml", "mise-bad-vars.toml", "mise-bad-tmpl.toml", "mise-bad-tmpl-output-flag.toml", "mise-bad-os.toml", "mise-bad-watch-files.toml", "mise-bad-launchd-calendar.toml", "mise-bad-launchd-queue.toml", "mise-bad-launchd-throttle.toml", "mise-bad-systemd.toml", "mise-bad-oci-copy.toml", "mise-bad-shell-activate.toml"]
include = ["mise-bad.toml", "mise-bad-age.toml", "mise-bad-dotfiles.toml", "mise-bad-env-default.toml", "mise-bad-env-directive.toml", "mise-bad-env-directive-expand.toml", "mise-bad-env-float.toml", "mise-bad-install-env-float.toml", "mise-bad-minimum-release-age-array.toml", "mise-bad-minimum-release-age-table.toml", "mise-bad-package-state.toml", "mise-bad-postinstall.toml", "mise-bad-vars.toml", "mise-bad-tmpl.toml", "mise-bad-tmpl-output-flag.toml", "mise-bad-os.toml", "mise-bad-watch-files.toml", "mise-bad-launchd-calendar.toml", "mise-bad-launchd-queue.toml", "mise-bad-launchd-throttle.toml", "mise-bad-systemd.toml", "mise-bad-oci-copy.toml", "mise-bad-shell-activate.toml"]

[[schemas]]
path = "file://$TASK_SCHEMA_PATH"
Expand Down Expand Up @@ -303,6 +303,18 @@ TOML

assert_fail "$TOMBI_LINT mise-bad-env-directive.toml"

# `expand` is only read for `_.file`; reject it on path/source directives so
# editors do not suggest that the option has an effect there.
for directive in \
'_.path = { paths = ["./bin"], expand = true }' \
'_.source = { path = "env.sh", expand = true }'; do
cat >"$HOME/workdir/mise-bad-env-directive-expand.toml" <<TOML
[env]
$directive
TOML
assert_fail "$TOMBI_LINT mise-bad-env-directive-expand.toml"
done
Comment on lines +306 to +316

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Incomplete schema regression coverage

The added tests only check that expand = true is rejected for path and source directives. They do not cover the newly accepted value, values, and env.mise aliases or verify that unknown Python virtual-environment options are rejected. Since the two schemas are maintained separately, adding positive alias cases and negative Python-property cases would help prevent future drift between the schemas and runtime behavior.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!


cat >"$HOME/workdir/mise-bad-env-float.toml" <<'TOML'
[env]
FLOAT = 1.23
Expand Down
128 changes: 57 additions & 71 deletions schema/mise-task.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading