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

`comment-is-too-wide` splits a comment at a literal `\n`, so it reports a wrong line or misses a wide one

Open Beginner friendly
#1,600 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@StanislavKozachenko is already working on this.

Since Oct 28, 2026.

  • #1605 by @StanislavKozachenko — open

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, xml
Domain
testing, tooling

Research direction

Start at comment-is-too-wide.xsl:15 and compare the current tokenize(replace(...)) expression with the expected tokenize(., '
') behavior described in the issue. Reproduce with the provided EO examples and new Source(new EoSyntax(new InputOf(path)).parsed()).defects(). Done when both examples report the expected line and width.

Written by the indexing model from the issue text.

Description

bug

comment-is-too-wide.xsl:15 splits a comment into lines like this:

<xsl:variable name="lines" select="tokenize(replace(., '\\n', '&#10;'), '&#10;')"/>

The regex \\n matches a backslash followed by n, that is the two characters \n written in the text of the comment. The parser already puts real line breaks into <comment>, so this replace() only adds a line break where a comment mentions \n, which is common in comments about strings (e.g. eol.eo in the EO runtime: On UNIX systems, it returns "\n"). As a result, the lint reports a wrong line or misses a wide line.

Steps to reproduce

On master 8c3474dc6eb341cb4968c8dd299ca2b0dba151c0, run the lints on this program:

# Joins the parts with the "\n" separator.
# This is a very long line that contains more than 100 characters and should be flagged by the lint as too wide.

+architect [email protected]
+home https://github.com/objectionary/eo
+package com.example
+spdx SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
+spdx SPDX-License-Identifier: MIT
+version 0.0.0

[x] > foo
  x > @

  [] +> can-return-its-argument
    eq. > @
      foo 42
      42
new Source(new EoSyntax(new InputOf(path)).parsed()).defects();

and on the same program with the two comment lines replaced by a single one:

# Prints the "Hello,\nWorld!" text to the standard output, and this comment line is wider than one hundred chars.
Actual result

For the first program:

[comment-is-too-wide/S WARNING]:3 The comment line width is 110, while 100 is max allowed

Line 3 is empty; the wide line is line 2. With "|" instead of "\n" in the first comment line, the same defect is reported at :2.

For the second program there is no comment-is-too-wide defect at all, although the comment line is 111 characters wide.

Expected result
[comment-is-too-wide/S WARNING]:2 The comment line width is 110, while 100 is max allowed

for the first program, and

[comment-is-too-wide/S WARNING]:1 The comment width is 111, while 100 is max allowed

for the second one. This is what the lint reports when the comment is split only at real line breaks, i.e. with tokenize(., '&#10;').

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.