Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
2a60271
Update dependency org.pitest:pitest-maven to v1.24.1 (#840)
renovate[bot] May 21, 2026
8eac592
refactor(#874): introduce EoProgram fixture with caching for tests
volodya-lombrozo May 21, 2026
19ffefc
style(#874): Fix code style issues and suppress warnings in tests
volodya-lombrozo May 21, 2026
1f05397
fix(#874): Return deep copy of cached XML to prevent mutation issues
volodya-lombrozo May 21, 2026
543232c
refactor(#874): introduce `EoProgram` helper to simplify test parsing
rultor May 21, 2026
ba3e4ba
refactor(#873): remove duplicate `first-foo.eo` in favor of `foo-with…
volodya-lombrozo May 22, 2026
6e455ce
refactor(#872): Allow EoProgram to accept raw EO code via Input
volodya-lombrozo May 22, 2026
f9646de
refactor(#872): replace EoSyntax with EoProgram in test classes
volodya-lombrozo May 22, 2026
f9836e9
chore(deps): update errata-ai/vale-action action to v2.1.2 (#875)
renovate[bot] May 23, 2026
b3c3ece
chore(deps): update davidanson/markdownlint-cli2-action action to v23…
renovate[bot] May 23, 2026
3adbd80
chore(deps): update crate-ci/typos action to v1.46.2 (#854)
renovate[bot] May 23, 2026
edf42ab
refactor(#879): extract verb-check logic into Vocabulary class
volodya-lombrozo May 25, 2026
3affdb1
test(#879): Replace MayBeSlow with concurrent execution mode in Vocab…
volodya-lombrozo May 25, 2026
6bbc2bc
test(#879): enable concurrent execution for parameterized tests
volodya-lombrozo May 25, 2026
190820a
chore(deps): update dependency org.eolang:hone-maven-plugin to v0.26.…
renovate[bot] May 25, 2026
2bbea29
chore(deps): update dependency com.jcabi:jcabi-matchers to v1.9.0 (#881)
renovate[bot] May 25, 2026
20ed341
fix(deps): update slf4j monorepo to v2.0.18 (#880)
renovate[bot] May 25, 2026
6ced678
chore(deps): update crate-ci/typos action to v1.46.3
renovate[bot] May 25, 2026
9ea577b
chore(deps): update dependency org.ow2.asm:asm to v9.10.1
renovate[bot] May 25, 2026
dacfe0e
refactor(#879): extract isVerb helper method in LtTestNotVerb
volodya-lombrozo May 25, 2026
79e4eca
feat(#879): extract name-validation logic into `Vocabulary` class
rultor May 25, 2026
e3837c4
chore(deps): update dependency org.pitest:pitest-maven to v1.25.0
renovate[bot] May 25, 2026
38d3141
build(#886): Configure surefire plugin to run only reserved test groups
volodya-lombrozo May 25, 2026
7388986
build(#886): Configure surefire plugin to run only 'deep' test group
volodya-lombrozo May 25, 2026
457c985
build(#886): exclude benchmark and conflicting test groups from profiles
volodya-lombrozo May 25, 2026
4b04dbc
chore(deps): update dependency org.pitest:pitest-maven to v1.25.0
rultor May 25, 2026
b0cec7c
chore(deps): update crate-ci/typos action to v1.46.3
rultor May 25, 2026
f3ac319
chore(deps): update dependency org.ow2.asm:asm to v9.10.1
rultor May 25, 2026
c93111e
chore(#872): Remove outdated todo comment from LtByXslTest
volodya-lombrozo May 26, 2026
87740c5
refactor(#836): remove idempotent-attribute-is-not-first lint
volodya-lombrozo May 26, 2026
0194b4d
refactor(#872): remove unused imports and simplify test assertions
volodya-lombrozo May 26, 2026
14b3d0f
chore(#872): remove outdated todo puzzle from LtByXslTest
rultor May 26, 2026
a644b6e
chore(deps): update dependency org.pitest:pitest-maven to v1.25.1 (#895)
renovate[bot] May 27, 2026
2e2b78f
chore(deps): update dependency com.yegor256:mktmp to v0.1.0 (#894)
renovate[bot] May 27, 2026
35361a5
build(#892): upgrade maybeslow to 0.1.0
volodya-lombrozo May 27, 2026
00d49d2
chore(deps): update dependency org.apache.maven.plugins:maven-surefir…
renovate[bot] May 28, 2026
7be426c
feat(#896): Add Fix interface and FxUnsortedMetas implementation
volodya-lombrozo May 28, 2026
16eafb5
feat(#896): add FxUnsortedMetas fix with YAML-driven tests
volodya-lombrozo May 28, 2026
36c3661
chore(deps): update dependency org.pitest:pitest-maven to v1.25.2
renovate[bot] May 28, 2026
b5f22e9
fix(#896): Rename sibling-text to previous-text and allow fixes dir i…
volodya-lombrozo May 28, 2026
53055e1
refactor(#902): replace partial meta comparison with exact XMIR match
volodya-lombrozo May 28, 2026
9941d1d
chore(deps): update dependency org.pitest:pitest-maven to v1.25.2
rultor May 28, 2026
4555dd7
refactor(#902): extract FixPack helper to reduce test boilerplate
volodya-lombrozo May 28, 2026
4d0674a
refactor(#902): extract FxByXsl to reuse XSL loading logic
volodya-lombrozo May 28, 2026
b31a068
feat(#902): replace partial meta comparison with full XMIR match
rultor May 28, 2026
ac8e27f
chore(deps): update crate-ci/typos action to v1.47.0 (#905)
renovate[bot] May 29, 2026
2d4b887
build(#906): bump jcabi-xml to 0.36.0 and cactoos to 0.61.0
volodya-lombrozo May 29, 2026
f6bb387
build(#906): update jcabi-xml to 0.36.0 and cactoos to 0.61.0
rultor May 29, 2026
242bffe
fix(deps): update dependency net.sf.saxon:saxon-he to v13 (#911)
renovate[bot] May 30, 2026
7afefe9
chore(deps): update dependency org.pitest:pitest-maven to v1.25.3 (#908)
renovate[bot] May 30, 2026
17db36d
feat(#896): Add `fix()` method to `Lint` interface with `FxEmpty` def…
volodya-lombrozo Jun 1, 2026
87ee928
feat(#896): auto-load fix XSL from classpath in LtByXsl
volodya-lombrozo Jun 1, 2026
5c53b96
refactor(#896): remove FxUnsortedMetas class and rename its test to F…
volodya-lombrozo Jun 1, 2026
64946c1
refactor(#896): extract FxResource class from LtByXsl.fixOf method
volodya-lombrozo Jun 1, 2026
7caf5db
docs(#896): Add TODO for unifying FxResource URL path derivation
volodya-lombrozo Jun 1, 2026
1a4114d
refactor(#896): Rename test method and update assertion message
volodya-lombrozo Jun 1, 2026
cd0dcdc
refactor(#913): Replace String.format with FormattedText in FxResource
volodya-lombrozo Jun 1, 2026
67720d3
fix(deps): update dependency com.jcabi:jcabi-xml to v0.37.0 (#909)
renovate[bot] Jun 2, 2026
940f7c7
chore(deps): update dependency com.yegor256:together to v0.2.0 (#857)
renovate[bot] Jun 2, 2026
7528be9
fix(deps): update dependency org.eolang:eo-parser to v0.61.0 (#850)
renovate[bot] Jun 2, 2026
9afd6a5
chore(deps): update dependency com.qulice:qulice-maven-plugin to v0.2…
renovate[bot] Jun 2, 2026
d592ce7
feat(#914): Add `fix()` method to `Source` with integration test
volodya-lombrozo Jun 2, 2026
658f661
style(#914): Remove extra space in MotiveFrom instantiation
volodya-lombrozo Jun 2, 2026
e4e5a57
test(#914): replace spdx meta with home meta in FixesItTest
volodya-lombrozo Jun 2, 2026
f2f572b
fix(#914): remove resolved puzzle about FxResource URL handling
rultor Jun 2, 2026
29a2092
#566: add invalid-name-notation lint
nacNAC333 Jun 2, 2026
b2d9651
#155: add too-deep-object lint
nacNAC333 Jun 2, 2026
4e5b299
#65: GHA workflow to embed lint list into README
nacNAC333 Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/lints-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
# SPDX-License-Identifier: MIT
---
name: Update Lints README
on:
push:
branches: [master]
workflow_dispatch:

permissions:
contents: write

jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Update Lints README
run: |
mvn -q -ntp -P!hone,qulice exec:java \
-Dexec.mainClass=org.eolang.lints.LintsReadmeGenerator \
-Dexec.args="./README.md"
- name: Commit README
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add README.md
git diff --cached --quiet || git commit -m "chore: update lints README [skip ci]"
git push
2 changes: 1 addition & 1 deletion .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: DavidAnson/markdownlint-cli2-action@v23.0.0
- uses: DavidAnson/markdownlint-cli2-action@v23.2.0
2 changes: 1 addition & 1 deletion .github/workflows/typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: crate-ci/typos@v1.45.1
- uses: crate-ci/typos@v1.47.0
with:
config: ./.github/typos.toml
2 changes: 1 addition & 1 deletion .github/workflows/vale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: errata-ai/vale-action@v2.1.1
- uses: errata-ai/vale-action@2.1.2
with:
files: 'src/main/resources/org/eolang/motives'
fail_on_error: 'true'
Expand Down
36 changes: 19 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-xml</artifactId>
<version>0.35.0</version>
<version>0.37.0</version>
</dependency>
<dependency>
<groupId>io.github.secretx33</groupId>
Expand All @@ -86,12 +86,12 @@
<dependency>
<groupId>org.cactoos</groupId>
<artifactId>cactoos</artifactId>
<version>0.59.0</version>
<version>0.61.0</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>12.9</version>
<version>13.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand All @@ -117,17 +117,17 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.17</version>
<version>2.0.18</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<version>2.0.17</version>
<version>2.0.18</version>
</dependency>
<dependency>
<groupId>org.eolang</groupId>
<artifactId>eo-parser</artifactId>
<version>0.60.0</version>
<version>0.61.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -179,13 +179,13 @@
<dependency>
<groupId>com.yegor256</groupId>
<artifactId>mktmp</artifactId>
<version>0.0.5</version>
<version>0.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.yegor256</groupId>
<artifactId>together</artifactId>
<version>0.1.2</version>
<version>0.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -197,7 +197,7 @@
<dependency>
<groupId>com.yegor256</groupId>
<artifactId>maybeslow</artifactId>
<version>0.0.4</version>
<version>0.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -227,7 +227,7 @@
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-matchers</artifactId>
<version>1.8.0</version>
<version>1.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -251,7 +251,7 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.9.1</version>
<version>9.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -324,7 +324,7 @@
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<version>0.27.5</version>
<version>0.27.6</version>
<configuration>
<excludes combine.children="append">
<exclude>pmd:/src/it/.*</exclude>
Expand Down Expand Up @@ -385,7 +385,7 @@
<plugin>
<groupId>org.eolang</groupId>
<artifactId>hone-maven-plugin</artifactId>
<version>0.25.0</version>
<version>0.26.2</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -438,7 +438,7 @@
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.23.0</version>
<version>1.25.3</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -483,8 +483,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.5</version>
<version>3.5.6</version>
<configuration>
<groups>deep</groups>
<excludedGroups>benchmark,reserved</excludedGroups>
<excludes>
<exclude>
Expand Down Expand Up @@ -731,9 +732,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.5</version>
<version>3.5.6</version>
<configuration>
<excludedGroups>benchmark</excludedGroups>
<groups>reserved</groups>
<excludedGroups>benchmark,deep</excludedGroups>
<excludes>
<exclude>
generated/**
Expand Down
2 changes: 1 addition & 1 deletion src/it/lints-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-xml</artifactId>
<version>0.35.0</version>
<version>0.37.0</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
Expand Down
48 changes: 48 additions & 0 deletions src/it/lints-it/src/test/java/org/eolang/lints/it/FixesItTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
* SPDX-License-Identifier: MIT
*/
package org.eolang.lints.it;

import com.jcabi.xml.XML;
import com.jcabi.xml.XMLDocument;
import java.io.IOException;
import org.eolang.lints.Source;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;

/**
* Integration tests for fix pipeline via {@link Source}.
*
* @since 0.2.1
*/
final class FixesItTest {

@Test
void fixesUnsortedMetas() throws IOException {
final XML xmir = new XMLDocument(
String.join(
"",
"<object>",
"<metas>",
"<meta line='1'><head>version</head><tail>0.0.0</tail></meta>",
"<meta line='2'><head>home</head><tail>https://www.eolang.org</tail></meta>",
"</metas>",
"</object>"
)
);
final Source source = new Source(xmir);
MatcherAssert.assertThat(
"unsorted-metas defect must be detected before fix",
source.defects().stream().anyMatch(d -> d.rule().startsWith("unsorted-metas")),
Matchers.is(true)
);
final XML fixed = source.fix();
MatcherAssert.assertThat(
"no unsorted-metas defect must remain after fix is applied",
new Source(fixed).defects().stream().noneMatch(d -> d.rule().startsWith("unsorted-metas")),
Matchers.is(true)
);
}
}
24 changes: 24 additions & 0 deletions src/main/java/org/eolang/lints/Fix.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
* SPDX-License-Identifier: MIT
*/
package org.eolang.lints;

import com.jcabi.xml.XML;
import java.io.IOException;

/**
* A fix for a lint defect.
* @since 0.2.1
*/
@FunctionalInterface
public interface Fix {

/**
* Apply the fix and return the corrected XMIR.
* @param xmir The XMIR to fix
* @return Fixed XMIR
* @throws IOException If something goes wrong
*/
XML apply(XML xmir) throws IOException;
}
68 changes: 68 additions & 0 deletions src/main/java/org/eolang/lints/FxByXsl.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
* SPDX-License-Identifier: MIT
*/
package org.eolang.lints;

import com.jcabi.xml.ClasspathSources;
import com.jcabi.xml.XML;
import com.jcabi.xml.XSL;
import com.jcabi.xml.XSLDocument;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.ArrayList;
import java.util.List;
import org.cactoos.io.ResourceOf;
import org.cactoos.text.IoCheckedText;
import org.cactoos.text.TextOf;

/**
* Fix implemented by a sequence of XSL stylesheets.
* @since 0.2.1
*/
public final class FxByXsl implements Fix {

/**
* XSL stylesheets to apply in order.
*/
private final List<XSL> sheets;

/**
* Constructor.
* @param paths Classpath resource paths to XSL stylesheets (leading slash optional)
* @checkstyle ConstructorsCodeFreeCheck (5 lines)
*/
public FxByXsl(final List<String> paths) {
this.sheets = FxByXsl.load(paths);
}

@Override
public XML apply(final XML xmir) throws IOException {
XML result = xmir;
for (final XSL sheet : this.sheets) {
result = sheet.transform(result);
}
return result;
}

private static List<XSL> load(final List<String> paths) {
final List<XSL> result = new ArrayList<>(paths.size());
for (final String path : paths) {
try {
result.add(
new XSLDocument(
new IoCheckedText(
new TextOf(new ResourceOf(path.replaceFirst("^/", "")))
).asString()
).with(new ClasspathSources())
);
} catch (final IOException ex) {
throw new UncheckedIOException(
String.format("Failed to load XSL stylesheet: %s", path),
ex
);
}
}
return result;
}
}
20 changes: 20 additions & 0 deletions src/main/java/org/eolang/lints/FxEmpty.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
* SPDX-License-Identifier: MIT
*/
package org.eolang.lints;

import com.jcabi.xml.XML;

/**
* A no-op fix that returns the XMIR unchanged.
* Used by lints that do not support auto-fixing.
* @since 0.2.1
*/
public final class FxEmpty implements Fix {

@Override
public XML apply(final XML xmir) {
return xmir;
}
}
Loading
Loading