Skip to content

Commit 973a154

Browse files
committed
Refactor error message for better clarity.
1 parent a27cc7e commit 973a154

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/main/java/org/eolang/lints/LtIncorrectNumberOfAttrs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public Collection<Defect> defects(final Map<String, XML> pkg) throws IOException
4545
program,
4646
Integer.parseInt(xnav.attribute("line").text().orElse("0")),
4747
String.format(
48-
"The object \"%s\" expects %d arguments, while %d provided",
48+
"The object \"%s\" usually expects %d arguments, while %d provided here",
4949
object, expected, provided
5050
)
5151
)

src/test/resources/org/eolang/lints/packs/wpa/incorrect-number-of-attributes/catches-incorrect-attributes-in-vertical-application.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ lints:
77
asserts:
88
- /defects[count(defect[@severity='error'])=1]
99
- /defects/defect[@object='usage' and @line='5']
10-
- /defects/defect[1][normalize-space()='The object "Φ.org.eolang.a" expects 2 arguments, while 1 provided']
10+
- /defects/defect[1][normalize-space()='The object "Φ.org.eolang.a" usually expects 2 arguments, while 1 provided here']
1111
foo.eo: |
1212
# A.
1313
[pos sigma] > a

src/test/resources/org/eolang/lints/packs/wpa/incorrect-number-of-attributes/catches-incorrect-number-of-attributes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ lints:
77
asserts:
88
- /defects[count(defect[@severity='error'])=1]
99
- /defects/defect[@object='app' and @line='3']
10-
- /defects/defect[1][normalize-space()='The object "Φ.org.eolang.foo" expects 1 arguments, while 2 provided']
10+
- /defects/defect[1][normalize-space()='The object "Φ.org.eolang.foo" usually expects 1 arguments, while 2 provided here']
1111
foo.eo: |
1212
# Foo with one attribute.
1313
[a] > foo

0 commit comments

Comments
 (0)