Skip to content

feat: idiomatic hints system#98

Merged
danieljohnmorris merged 3 commits intomainfrom
feat/idiomatic-hints
Mar 7, 2026
Merged

feat: idiomatic hints system#98
danieljohnmorris merged 3 commits intomainfrom
feat/idiomatic-hints

Conversation

@danieljohnmorris
Copy link
Collaborator

Summary

  • Adds post-execution hints that suggest canonical ilo forms (e.g. === saves 1 char)
  • Hints go to stderr in text/ansi modes, or as {"hints":[...]} JSON on stderr in JSON mode
  • Suppressed with --no-hints / -nh flag
  • Source scanning respects string literal boundaries (no false positives from == in strings)

Test plan

  • collect_hints detects == outside strings
  • collect_hints ignores == inside string literals
  • collect_hints returns empty for single =
  • --no-hints / -nh flag suppresses hints
  • detect_output_mode 4-tuple tests updated
  • Manual verification: text, JSON, and suppressed modes
  • Full test suite passes

Scan source for non-canonical patterns (e.g. `==` instead of `=`) and
emit hints after successful execution. Hints go to stderr in text/ansi
modes, or as a JSON object in JSON mode.

Suppressed with --no-hints / -nh flag.
@danieljohnmorris danieljohnmorris merged commit 6f096a1 into main Mar 7, 2026
1 check passed
@danieljohnmorris danieljohnmorris deleted the feat/idiomatic-hints branch March 7, 2026 12:44
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