Skip to content

feat(#1317): add identity-object lint - #1320

Merged
yegor256 merged 4 commits into
masterfrom
claude/eager-planck-70lsa9
Sep 1, 2026
Merged

yegor256 merged 4 commits into
masterfrom
claude/eager-planck-70lsa9

Conversation

@yegor256

Copy link
Copy Markdown
Member

Summary

  • Adds a new identity-object lint that flags a handwritten identity formation ([x] > (φ ↦ x)) that could be replaced with the I glyph.
  • A formation is only matched when it binds exactly one void and decorates that same void via ξ; the glyph's own desugared shape is told apart by its formation, void and φ all sharing the same @line/@pos, since all three come from the single glyph character (per the heuristic proposed in the issue).
  • Adds the lint's motive doc and a YAML test pack covering the catching case, the desugared-glyph false positive, the three near-miss shapes called out in the issue (two voids, φ applied to something, φ reaching a name that isn't its own void), an anonymous-formation case, and a line-0/context case.

Closes #1317

Test plan

  • mvn test -Dtest=LtByXslTest#testsAllLintsByEo — all 427 YAML packs pass, including the new identity-object pack
  • mvn test — full test suite passes
  • mvn verify -DskipTests — qulice static analysis passes
  • xcop, yamllint, reuse lint, typos, markdownlint-cli2, vale — all pass on the new files (no errors)

Generated by Claude Code

claude added 4 commits August 28, 2026 06:23
Flags a hand-written identity formation ([x] > (φ ↦ x)) that could be
replaced with the `I` glyph. A formation is matched only when it binds
exactly one void and decorates that same void via ξ; the glyph's own
desugared shape is told apart by its formation, void and φ all sharing
the same @line/@pos, since all three come from the single glyph
character.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KicXH9j9HV3JxU57JHJr33
The o[2] predicate chain re-scoped o[1] to the phi node's own
(nonexistent) children instead of the formation's void, so the lint
never matched. Flatten the chained brackets into a single conjunction
so every o[1]/o[2] reference stays anchored to the candidate formation.
Also spell "handwritten" as one word per the repo's grammar check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KicXH9j9HV3JxU57JHJr33
The placeholder base "Q.number" isn't a valid fqn under the XMIR
schema; use "Φ.number" like the rest of the test packs do.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KicXH9j9HV3JxU57JHJr33
@yegor256
yegor256 marked this pull request as ready for review August 28, 2026 06:41
Copilot AI lite review requested due to automatic review settings August 28, 2026 06:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@yegor256
yegor256 merged commit 71a4678 into master Sep 1, 2026
25 checks passed
@yegor256
yegor256 deleted the claude/eager-planck-70lsa9 branch September 1, 2026 06:37

yegor256 commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

Thanks for the contribution!


Generated by Claude Code

@0crat

0crat commented Sep 5, 2026

Copy link
Copy Markdown

@yegor256 Thanks for the contribution! You've earned +4 points for this: +16 as a basis; -4 for too many hits-of-code (168 >= 100); -8 for the lack of code review. Please, keep them coming. Your running score is +1704; don't forget to check your Zerocracy account too).

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.

Linter doesn't flag usage of manual identity object instead of I glyph

4 participants