Skip to content

Commit 26393c5

Browse files
committed
shuffle
1 parent 6542631 commit 26393c5

File tree

3 files changed

+33
-24
lines changed

3 files changed

+33
-24
lines changed

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

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.cactoos.io.InputOf;
3232
import org.cactoos.iterable.IterableEnvelope;
3333
import org.cactoos.iterable.Mapped;
34+
import org.cactoos.iterable.Shuffled;
3435

3536
/**
3637
* All lints defined by XSLs.
@@ -67,20 +68,22 @@ final class PkByXsl extends IterableEnvelope<Lint<XML>> {
6768
*/
6869
private static Iterable<Lint<XML>> all() {
6970
try {
70-
return new Mapped<>(
71-
res -> new LtByXsl(
72-
new InputOf(res.getInputStream()),
73-
new InputOf(
74-
PkByXsl.XSL_PATTERN.matcher(
75-
PkByXsl.LINTS_PATH.matcher(
76-
res.getURL().toString()
77-
).replaceAll("eolang/motives")
78-
).replaceAll(".md")
79-
)
80-
),
81-
Arrays.asList(
82-
new PathMatchingResourcePatternResolver().getResources(
83-
"classpath*:org/eolang/lints/**/*.xsl"
71+
return new Shuffled<Lint<XML>>(
72+
new Mapped<>(
73+
res -> new LtByXsl(
74+
new InputOf(res.getInputStream()),
75+
new InputOf(
76+
PkByXsl.XSL_PATTERN.matcher(
77+
PkByXsl.LINTS_PATH.matcher(
78+
res.getURL().toString()
79+
).replaceAll("eolang/motives")
80+
).replaceAll(".md")
81+
)
82+
),
83+
Arrays.asList(
84+
new PathMatchingResourcePatternResolver().getResources(
85+
"classpath*:org/eolang/lints/**/*.xsl"
86+
)
8487
)
8588
)
8689
);

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import javax.annotation.concurrent.ThreadSafe;
2929
import org.cactoos.iterable.IterableEnvelope;
3030
import org.cactoos.iterable.Joined;
31+
import org.cactoos.iterable.Shuffled;
3132
import org.eolang.lints.comments.LtAsciiOnly;
3233
import org.eolang.lints.misc.LtTestNotVerb;
3334

@@ -47,11 +48,13 @@ final class PkMono extends IterableEnvelope<Lint<XML>> {
4748
*/
4849
PkMono() {
4950
super(
50-
new Joined<Lint<XML>>(
51-
new PkByXsl(),
52-
Arrays.asList(
53-
new LtAsciiOnly(),
54-
new LtTestNotVerb()
51+
new Shuffled<>(
52+
new Joined<Lint<XML>>(
53+
new PkByXsl(),
54+
Arrays.asList(
55+
new LtAsciiOnly(),
56+
new LtTestNotVerb()
57+
)
5558
)
5659
)
5760
);

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.jcabi.xml.XML;
2727
import java.util.Map;
2828
import org.cactoos.iterable.IterableEnvelope;
29+
import org.cactoos.iterable.Shuffled;
2930
import org.cactoos.list.ListOf;
3031
import org.eolang.lints.critical.LtIncorrectAlias;
3132
import org.eolang.lints.errors.LtObjectIsNotUnique;
@@ -47,11 +48,13 @@ public final class PkWpa extends IterableEnvelope<Lint<Map<String, XML>>> {
4748
*/
4849
public PkWpa() {
4950
super(
50-
new ListOf<>(
51-
new LtUnitTestMissing(),
52-
new LtUnitTestWithoutLiveFile(),
53-
new LtIncorrectAlias(),
54-
new LtObjectIsNotUnique()
51+
new Shuffled<>(
52+
new ListOf<>(
53+
new LtUnitTestMissing(),
54+
new LtUnitTestWithoutLiveFile(),
55+
new LtIncorrectAlias(),
56+
new LtObjectIsNotUnique()
57+
)
5558
)
5659
);
5760
}

0 commit comments

Comments
 (0)