Skip to content

Commit 64eeafd

Browse files
yegor256claude
andauthored
fix(#1269): align comment-is-too-wide motive with the 100-char limit (#1293)
The lint has enforced 100 characters since 11d6464 ("100 chars per line in comments"), but the motive still documented 80. The docs are the stale side, so update the motive and pin the actual threshold with boundary packs (100 chars allowed, 101 flagged). Claude-Session: https://claude.ai/code/session_01LtRC58UjpmCN3yncfPAmhA Co-authored-by: Claude <noreply@anthropic.com>
1 parent a2f1b2d commit 64eeafd

5 files changed

Lines changed: 32 additions & 4 deletions

File tree

‎src/main/resources/org/eolang/motives/comments/comment-is-too-wide.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Comment Is Too Wide
22

3-
Each comment should not be wider than 80 characters.
3+
Each comment should not be wider than 100 characters.
44

55
Incorrect:
66

77
```eo
8-
# This is a very long comment that contains more than eighty characters and should be flagged by the lint as too wide.
8+
# This is a very long comment that contains more than 100 characters and should be flagged by the lint as too wide.
99
[] > foo
1010
```
1111

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# yamllint disable rule:line-length
5+
sheets:
6+
- /org/eolang/lints/comments/comment-is-too-wide.xsl
7+
asserts:
8+
- /defects[count(defect[@severity='warning'])=0]
9+
input: |
10+
# This comment is exactly 100 characters wide, therefore the lint must not report it as a defect here.
11+
12+
[] > foo
13+
42 > @
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# yamllint disable rule:line-length
5+
sheets:
6+
- /org/eolang/lints/comments/comment-is-too-wide.xsl
7+
asserts:
8+
- /defects[count(defect[@severity='warning'])=1]
9+
- /defects/defect[@line='3']
10+
- /defects/defect[contains(text(), 'The comment width is 101, while 100 is max allowed')]
11+
input: |
12+
# This comment is one character wider than the limit of 100, therefore the lint reports it as too wide.
13+
14+
[] > foo
15+
42 > @

‎src/test/resources/org/eolang/lints/packs/single/comment-is-too-wide/catches-multiline-wide-comment.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ asserts:
99
- /defects/defect[@line='4']
1010
input: |
1111
# This is good line.
12-
# This is a very long line that contains more than eighty characters and should be flagged by the lint as too wide.
12+
# This is a very long line that contains more than 100 characters and should be flagged by the lint as too wide.
1313
1414
[] > foo
1515
42 > @

‎src/test/resources/org/eolang/lints/packs/single/comment-is-too-wide/catches-too-wide-comment.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ asserts:
88
- /defects[count(defect[@severity='warning'])=1]
99
- /defects/defect[@line='3']
1010
input: |
11-
# This is a very long comment that contains more than eighty characters and should be flagged by the lint as too wide.
11+
# This is a very long comment that contains more than 100 characters and should be flagged by the lint as too wide.
1212
1313
[] > foo
1414
42 > @

0 commit comments

Comments
 (0)