Skip to content

🐛 fix(check): type argument selectors on unknown input and self[...] - #2705

Merged
harehare merged 6 commits into
mainfrom
fix/check-lint-false-positives
Oct 28, 2026
Merged

harehare merged 6 commits into
mainfrom
fix/check-lint-false-positives

Conversation

@harehare

@harehare harehare commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor
  • 📝 Documentation
  • ⚡ Performance
  • ✅ Test
  • 📦 Build / dependencies
  • 👷 CI

Checklist

  • I ran cargo fmt and cargo clippy and addressed any warnings
  • I ran just test-all and all tests pass
  • I added or updated tests covering this change
  • I updated relevant documentation (/docs, crate README.md) if needed

Additional Context

missing_else_in_expr no longer reports an if at the end of a pipeline,
which is the documented way to drop a node. prefer_specific_heading no
longer reports .h in queries that read .depth or .level.
A selector argument without a known input type is now an unresolved
type variable, since it may select from a node or an array of nodes
(nodes | compact(.code)). self[0] and self[:n] are no longer reported
as unresolved symbols.
missing_else_in_expr looked for later stages only among symbols added
with add_symbol, so an if followed by .h1 or let x = 2 was treated as the
end of the pipeline and its warning was suppressed.
self[i] and self[a:b] now index or slice the piped input like a
variable does, instead of leaving the result unconstrained. Children of
an argument selector on unknown input are checked against the selected
node kind, so compact(.code.depth) reports the missing attribute while
the selector's own result still varies with its input.
self[0][1] has two bracket groups with one index each, but two children
were always routed to the slice overload, so the result was an array.
bracket_group_count now tells a chain from a slice, and each index is
applied to the previous result. A chain mixed with slices stays
unconstrained. DeferredTupleAccess carries the result type so the
intermediate steps need no symbol.
@harehare
harehare force-pushed the fix/check-lint-false-positives branch from 67f9407 to dd2fdd9 Compare October 27, 2026 13:52
Chained lookups like self[0][0][0][0] resolve one level per pass, but the checker ran the deferred tuple access resolver a fixed three times, leaving the fourth element untyped. Drain the resolver until it makes no progress.
@harehare
harehare force-pushed the fix/check-lint-false-positives branch from 10b407b to 6b85bac Compare October 28, 2026 10:49
@harehare
harehare merged commit c4fa2bc into main Oct 28, 2026
12 checks passed
@harehare
harehare deleted the fix/check-lint-false-positives branch October 28, 2026 12:33
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.

1 participant