Skip to content

Commit d09db50

Browse files
authored
Merge branch 'master' into renovate/com.github.volodya-lombrozo-jtcop-maven-plugin-1.x
2 parents 73ed2b1 + 1c7d0a6 commit d09db50

File tree

3 files changed

+16
-27
lines changed

3 files changed

+16
-27
lines changed

.github/workflows/comment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
comment:
1313
timeout-minutes: 15
1414
runs-on: ubuntu-24.04
15+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }}
1516
steps:
1617
- name: Dump GitHub context
1718
env:

src/test/java/org/eolang/lints/SourceTest.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,6 @@
7373
@ExtendWith(MktmpResolver.class)
7474
final class SourceTest {
7575

76-
/**
77-
* Single lint for fast tests that only need to verify basic defect detection.
78-
*/
79-
private static final Iterable<Lint<XML>> SINGLE = new ListOf<>(
80-
new Unchecked<>(
81-
() -> new LtByXsl("comments/comment-without-dot")
82-
).value()
83-
);
84-
8576
@Timeout(unit = TimeUnit.SECONDS, value = 60L)
8677
@Test
8778
void returnsEmptyListOfDefects() throws IOException {
@@ -154,7 +145,7 @@ void checksSimple(@Mktmp final Path dir) throws IOException {
154145
MatcherAssert.assertThat(
155146
"the defect is found",
156147
new Source(
157-
new XMLDocument(path), SourceTest.SINGLE
148+
new XMLDocument(path), new ListOf<>(new LtByXsl("comments/comment-without-dot"))
158149
).defects().size(),
159150
Matchers.greaterThan(0)
160151
);
@@ -171,7 +162,7 @@ void lintsInMultipleThreads() {
171162
new EoSyntax(
172163
"# Foo\n[] > foo\n"
173164
).parsed(),
174-
SourceTest.SINGLE
165+
new ListOf<>(new LtByXsl("comments/comment-without-dot"))
175166
).defects().size()
176167
).asList()
177168
).size(),
@@ -241,7 +232,7 @@ void doesNotThrowIoException() {
241232
() ->
242233
new Source(
243234
new XMLDocument("<object><o name='correct'/></object>"),
244-
SourceTest.SINGLE
235+
new ListOf<>(new LtByXsl("comments/comment-without-dot"))
245236
).defects(),
246237
"Exception was thrown, but it should not be"
247238
);
@@ -392,7 +383,7 @@ void outputsInformationAboutSingleScope() throws IOException {
392383
"[] > foo"
393384
)
394385
).parsed(),
395-
SourceTest.SINGLE
386+
new ListOf<>(new LtByXsl("comments/comment-without-dot"))
396387
).defects(),
397388
Matchers.hasItem(
398389
Matchers.hasToString(

src/test/java/org/eolang/lints/WpaLintsTest.java

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,6 @@
3333
*/
3434
final class WpaLintsTest {
3535

36-
/**
37-
* WPA lints mapped to their names.
38-
*/
39-
private static final Map<String, Lint<Map<String, XML>>> WPA =
40-
new Sticky<>(
41-
new MapOf<String, Lint<Map<String, XML>>>(
42-
new Mapped<>(
43-
wpl -> new MapEntry<>(wpl.name(), wpl),
44-
new WpaLints()
45-
)
46-
)
47-
);
48-
4936
@Test
5037
@SuppressWarnings("JTCOP.RuleAssertionMessage")
5138
void staysPackagePrivate() {
@@ -64,7 +51,17 @@ void staysPackagePrivate() {
6451
void testsAllLintsByEo(final String yaml) throws IOException {
6552
MatcherAssert.assertThat(
6653
"Story failures are not empty, but they should.",
67-
new WpaStory(yaml, WpaLintsTest.WPA).execute(),
54+
new WpaStory(
55+
yaml,
56+
new Sticky<>(
57+
new MapOf<String, Lint<Map<String, XML>>>(
58+
new Mapped<>(
59+
wpl -> new MapEntry<>(wpl.name(), wpl),
60+
new WpaLints()
61+
)
62+
)
63+
)
64+
).execute(),
6865
new WpaStoryMatcher()
6966
);
7067
}

0 commit comments

Comments
 (0)