objectionary / objectionary/lints

`VoidXpath` is orphaned production code referenced only by its own test

Open
#1,443 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
14
Forks
39
Avg merge
22h 54m
Merged PRs (30d)
90

Description

What happens

src/main/java/org/eolang/lints/VoidXpath.java is production code with no production caller.

On current master 91ff81b80f0918d1e01846f289ead22dc58ad3e0, a repository-wide search for VoidXpath returns only:

src/main/java/org/eolang/lints/VoidXpath.java
src/test/java/org/eolang/lints/VoidXpathTest.java

GitHub code search over objectionary/lints gives the same two files. The only construction is the class's own test:

new VoidXpath(fqn).asString()

The class is package-private (final class VoidXpath implements Text), so it cannot be an external API, and it does not follow the Lt* lint naming/registration path that could make it discoverable indirectly as a lint.

Why this is a problem

The class presents a maintained-looking XPath conversion utility in production, with its own tests, but no execution path can reach it. Changes to locator/XMIR semantics can therefore trigger maintenance work on code that cannot affect the linter, and a future contributor may incorrectly assume it is the canonical way void references are resolved.

Its test only proves the orphaned helper against itself; it does not protect any production behavior.

What should happen

Either wire VoidXpath into the production path that is supposed to use it, if such a path still exists, or remove VoidXpath.java together with VoidXpathTest.java as dead code.

I searched open/closed issues for VoidXpath and found no existing report.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/main/java/org/eolang/lints/VoidXpath.java and src/test/java/org/eolang/lints/VoidXpathTest.java, then verify the repository-wide search for other production references. Determine whether a production path still needs this helper; done means either wiring it into that path with appropriate coverage or removing both orphaned files.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.