objectionary / objectionary/lints
`line-is-absent` lint falsely reports objects with duplicate names in different scopes
@h1alexbel is already working on this.
Since Jul 29, 2026.
- Dominant language
- Java
- Stars
- 14
- Forks
- 39
- Avg merge
- 22h 54m
- Merged PRs (30d)
- 90
Description
Problem
The line-is-absent lint uses a global key by object name.
In src/main/resources/org/eolang/lints/refs/line-is-absent.xsl, the lookup is based on @name only, and it does not take lexical scope into account.
What happens
If an XMIR document contains two objects with the same name in different scopes, and one of them has no @line, a reference to the other one may still trigger line-is-absent.
That creates a false positive: the lint reports a missing @line on an unrelated object that is not the actual resolution target.
Why this is a bug
The rule is supposed to verify the referenced object, not any object in the document that happens to share the same name.
A global key by @name is not enough when the same name is reused in different lexical scopes.
What should happen
The lint should only report line-is-absent when the object actually resolved by the reference lacks @line.
Objects with the same name in unrelated scopes should not affect the result.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.