The EO parser marks a truthy test attribute (++> name) by prefixing its
@name with +, and a throwing test attribute (--> name) by prefixing it
with - (see Suffix.attribute in eo-parser). Three lints know about the
first prefix only, so every throwing test is linted as if it were an ordinary
object: names/non-kebab-name.xsl:14, misc/sparse-decoration.xsl:17 and
tests/wrong-test-order.xsl:14 all filter on starts-with(@name, '+').
On eo-runtime of objectionary/eo this produces 236 bogus warnings out of
338: 98 non-kebab-name ("Formation name
-on-bytes-of-wrong-size-as-i16 must be in kebab-case" — the leading hyphen
is the marker, not part of the name), 95 sparse-decoration (a throwing test
such as 01-01-01.as-i16 --> on-bytes-of-wrong-size-as-i16 is a single-φ
formation by construction, exactly the case starts-with(@name, '+') already
excuses for truthy tests), and 43 wrong-test-order (the last ++> test in a
file is reported as misplaced because the --> tests that follow it are not
counted as tests).
The smallest fix is to widen the three predicates from
starts-with(@name, '+') to also accept -, ideally through one shared
eo:test-name() function in org/eolang/funcs/, since
misc/incorrect-test-object-name.xsl:14,
names/unsorted-named-attributes.xsl:14,
tests/unit-test-without-phi.xsl:14 and tests/unit-test-missing.xsl:14
carry the same assumption and will need it too.
The EO parser marks a truthy test attribute (
++> name) by prefixing its@namewith+, and a throwing test attribute (--> name) by prefixing itwith
-(seeSuffix.attributeineo-parser). Three lints know about thefirst prefix only, so every throwing test is linted as if it were an ordinary
object:
names/non-kebab-name.xsl:14,misc/sparse-decoration.xsl:17andtests/wrong-test-order.xsl:14all filter onstarts-with(@name, '+').On
eo-runtimeofobjectionary/eothis produces 236 bogus warnings out of338: 98
non-kebab-name("Formation name-on-bytes-of-wrong-size-as-i16must be in kebab-case" — the leading hyphenis the marker, not part of the name), 95
sparse-decoration(a throwing testsuch as
01-01-01.as-i16 --> on-bytes-of-wrong-size-as-i16is a single-φformation by construction, exactly the case
starts-with(@name, '+')alreadyexcuses for truthy tests), and 43
wrong-test-order(the last++>test in afile is reported as misplaced because the
-->tests that follow it are notcounted as tests).
The smallest fix is to widen the three predicates from
starts-with(@name, '+')to also accept-, ideally through one sharedeo:test-name()function inorg/eolang/funcs/, sincemisc/incorrect-test-object-name.xsl:14,names/unsorted-named-attributes.xsl:14,tests/unit-test-without-phi.xsl:14andtests/unit-test-missing.xsl:14carry the same assumption and will need it too.