No public way to list the names of the lints, so a caller cannot tell a typo from a real name

Open Beginner friendly
#1,614 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@yegor256 is already working on this.

Since Nov 6, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
api

Research direction

Start in the org.eolang.lints package: read MonoLintNames.java and Source.java to see the package-private types. Choose one suggested API (e.g. a public LintNames iterable or Source.names()) and change visibility or add a method. Done means an outside caller can list lint names and eo can reject unknown ones.

Written by the indexing model from the issue text.

Description

enhancement

Source.without(String...) takes names and silently drops the ones that match nothing. A caller that lets a user name lints cannot check what it was given, because the catalogue of names is not reachable from outside the package.

In lints 0.5.0 the only public types are Defect, Fix, FxByXsl, FxEmpty, FxResource, Lint, Severity and Source. Lint.name() is public, but every way of getting the lints is not: PkMono, MonoLints and MonoLintNames are all package-private, and Source(XML, Iterable<Lint>) is too.

$ javap -cp lints-0.5.0.jar org.eolang.lints.MonoLintNames
final class org.eolang.lints.MonoLintNames extends org.cactoos.iterable.IterableEnvelope<java.lang.String> {
  org.eolang.lints.MonoLintNames();
}

Where it bites: eo-maven-plugin passes skipSourceLints from pom.xml straight to Source.without(...), so a typo in a pom.xml keeps the lint enabled and nothing says why (objectionary/eo#9332):

[INFO] Unlinting source lints: ["unit-test-misssing"]
[WARN] [LINT] foo.x.main:0 Tests not found for "main" (unit-test-missing/S)

The log claims the lint is unlinted and then reports it. Inside a source the same mistake is caught, because incorrect-unlint knows the names; a caller outside the package has no equivalent.

What would be enough: a public way to read the names, such as a public LintNames iterable of String, or Source.names(). Then eo could refuse an unknown name where it is configured, instead of ignoring it.

I have not sent a pull request, since which shape you want is your call.

Dominant language
Java
Stars
14
Forks
40
Avg merge
3d 12h
Merged PRs (30d)
67

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from objectionary/lints

All issues in objectionary/lints

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.