objectionary / objectionary/lints

Unnecessary usage of plain JUnit test in LtIncorrectUnlintTest, can be replaced with YAML packs

Open
#1,455 0 comments 0 reactions 1 assignee View on GitHub

@volodya-lombrozo is already working on this.

Since Sep 11, 2026.

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

Description

LtIncorrectUnlintTest still lives as a plain JUnit test, but it doesn't need to. incorrect-unlint is already registered under its real name in PkMono/MonoLints, constructed there with the full, real list of lint names (MonoLints.ALL_NAMES). XtLint already resolves a lint by name from PkMono for YAML packs (lint: incorrect-unlint), the same mechanism used for syntax-version and reserved-name.

All eight existing test methods (catchesIncorrectUnlints, allowsCorrectUnlints, providesClearMessage, understandsUnlintsWithLineNumber, catchesNonExistingUnlintWithLineNumber, catchesUnlintWithInvalidLineFormat, catchesUnlintWithEmptyLinePart, allowsUnlintWithRange) only feed EO source and assert on defect count/text, using lint names that are either real (ascii-only, comment-not-capitalized) or simply non-existent (hello, a). None require a custom/injected name list or params support, so they can move as-is into src/test/resources/org/eolang/lints/packs/single/incorrect-unlint/*.yaml and the Java test file can be deleted.

(Note: this doesn't apply to LtUnlintNonExistingDefectTest -> that one injects a mock Lint that throws to prove non-invocation, which YAML packs can't express, so it should stay a Java test.)

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.