Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

An `+unlint` value with both quote types can crash linting

Closed Beginner friendly
#1,541 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
tooling

Research direction

Start in src/main/java/org/eolang/lints/LtUnlintNonExistingDefect.java, reading quoted() and the XPath construction in defects(). Reproduce with an +unlint tail containing both a double quote and an apostrophe, then run the linter on the parsed XMIR. Done means the malformed or non-existing suppression is reported without an XPath parse failure.

Written by the indexing model from the issue text.

Description

An invalid +unlint value containing both a double quote and an apostrophe can make linting fail with an XPath parse error instead of reporting the malformed suppression.

Steps to reproduce

  1. Add an EO +unlint meta whose tail contains both quote characters, for example unknown"rule'part.
  2. Run the linter on the parsed XMIR.

Actual result

LtUnlintNonExistingDefect builds an XPath expression to find the meta's line number. Its quoted() helper switches to single quotes when the value contains a double quote, but does not escape an apostrophe. The resulting XPath literal is invalid, so lints can abort while processing an invalid suppression.

Expected result

The linter should report the malformed or non-existing unlint value without aborting, regardless of quote characters in its text.

Technical evidence

In src/main/java/org/eolang/lints/LtUnlintNonExistingDefect.java, quoted() chooses either quote style but does not handle a value containing both. defects() passes that value into .../meta[head='unlint' and tail=%s]/@line; the XPath expression breaks when neither chosen quote style is escaped.

Dominant language
Java
Stars
14
Forks
41
Avg merge
3d 12m
Merged PRs (30d)
32

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.