Skip to content

Commit c2233d3

Browse files
authored
Merge pull request #5222 from volodya-lombrozo/5221-fix-lint-warnings
fix(#5221): fix lint warnings in eo-runtime source files
2 parents 66e1cb4 + 15c4274 commit c2233d3

9 files changed

Lines changed: 23 additions & 14 deletions

File tree

eo-runtime/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,20 @@
270270
skip entry entirely once the lint is removed from the lints repo.
271271
-->
272272
<lint>idempotent-attribute-is-not-first</lint>
273+
<!--
274+
@todo #5221:60min Enable `wrong-test-order` lint.
275+
The lint fires as a false positive when anonymous `>>` objects from
276+
the main body are floated past tests by vars-float-up transformation.
277+
Enable once objectionary/lints#954 is resolved.
278+
-->
279+
<lint>wrong-test-order</lint>
280+
<!--
281+
@todo #5221:30min Enable `compound-name` lint.
282+
Several objects in eo-runtime use compound names that follow system
283+
or platform naming conventions (e.g. neg-inf, groups-count, sin-family).
284+
Either rename the objects or adjust the lint rule, then enable it.
285+
-->
286+
<lint>compound-name</lint>
273287
</skipSourceLints>
274288
<skipProgramLints>
275289
<lint>inconsistent-args</lint>

eo-runtime/src/main/eo/fs/path.eo

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
+spdx SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
1616
+spdx SPDX-License-Identifier: MIT
1717
+unlint redundant-object
18-
+unlint ascii-only
1918

2019
# A `path` represents a path that is hierarchical and composed of a sequence of
2120
# directory and file name elements separated by a special separator or delimiter.

eo-runtime/src/main/eo/io/input-as-bytes.eo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
+alias io.copied
2-
+alias io.malloc-as-output
31
+alias io.bytes-as-input
2+
+alias io.copied
43
+alias io.dead-input
4+
+alias io.malloc-as-output
55
+architect yegor256@gmail.com
66
+home https://github.com/objectionary/eo
77
+package io

eo-runtime/src/main/eo/ms/sqrt.eo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
sqrt 0.0
1818
0.0
1919

20-
# Tests that sqrt of one is one.
20+
# Tests that the sqrt of one equals one.
2121
[] +> tests-sqrt-one
2222
eq. > @
2323
sqrt 1.0

eo-runtime/src/main/eo/nan.eo

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
+version 0.0.0
44
+spdx SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
55
+spdx SPDX-License-Identifier: MIT
6-
+unlint redundant-object
76
+unlint mandatory-package
87

98
# The `not a number` object is an abstraction

eo-runtime/src/main/eo/negative-infinity.eo

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
+version 0.0.0
44
+spdx SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
55
+spdx SPDX-License-Identifier: MIT
6-
+unlint compound-name
7-
+unlint redundant-object
86
+unlint mandatory-package
97

108
# Negative infinity.

eo-runtime/src/main/eo/number.eo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
# For non-finite values (`nan`, `+inf`, `-inf`) the input is returned
115115
# unchanged. For finite inputs we truncate toward zero via `as-i64`,
116116
# which matches mathematical floor for every value except negative
117-
# non-integers where the truncated result is strictly greater than
117+
# non-integers - where the truncated result is strictly greater than
118118
# the original, so we subtract `1` in that single case.
119119
[] > floor
120120
if. > @

eo-runtime/src/main/eo/positive-infinity.eo

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
+version 0.0.0
44
+spdx SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
55
+spdx SPDX-License-Identifier: MIT
6-
+unlint compound-name
7-
+unlint redundant-object
86
+unlint mandatory-package
97

108
# Positive infinity.

eo-runtime/src/main/eo/tt/as-ascii.eo

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
# The byte of `char` is left-padded with a zero byte into a 16-bit word,
1010
# read as an integer and then expressed as a number.
1111
[char] > as-ascii
12-
word.as-i16.as-number > @
13-
concat. > word
14-
00-
15-
char.as-bytes
12+
as-number. > @
13+
as-i16.
14+
concat.
15+
00-
16+
char.as-bytes
1617

1718
# Tests that as-ascii reads the code of an uppercase letter.
1819
[] +> tests-reads-code-of-uppercase-letter

0 commit comments

Comments
 (0)