Skip to content

Commit

Permalink
feat(objectionary#324): JavaDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Feb 12, 2025
1 parent e697ad3 commit 1263efc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
18 changes: 8 additions & 10 deletions src/main/java/org/eolang/lints/Programs.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/
package org.eolang.lints;

import com.jcabi.manifests.Manifests;
import com.jcabi.xml.XML;
import com.jcabi.xml.XMLDocument;
import java.io.FileNotFoundException;
Expand All @@ -45,7 +44,15 @@

/**
* A collection of XMIR programs to analyze.
* To get the current version of `lints`, you should read it from
* MANIFEST.MF file, packaged with library. You can do it like this:
* <pre>
* {@code
* import com.jcabi.manifests.Manifests;
*
* final String version = Manifests.read("Lints-Version");
* }
* </pre>
* @see <a href="https://news.eolang.org/2022-11-25-xmir-guide.html">XMIR</a>
* @since 0.1.0
*/
Expand Down Expand Up @@ -157,15 +164,6 @@ public Collection<Defect> defects() {
return messages;
}

/**
* Lints version.
* @return Version
* @checkstyle NonStaticMethodCheck (3 lines)
*/
public String version() {
return Manifests.read("Lints-Version");
}

/**
* Discover all XMIR files in the directory.
* @param dirs The directories to search for XMIR files in (recursively)
Expand Down
9 changes: 0 additions & 9 deletions src/test/java/org/eolang/lints/ProgramsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,6 @@ void createsProgramsWithoutMultipleLints(@Mktmp final Path dir) throws IOExcepti
);
}

@Test
void returnsVersion() throws IOException {
MatcherAssert.assertThat(
"Version doesn't match with expected",
new Programs(new ListOf<>()).version(),
Matchers.equalTo("1.2.3")
);
}

private Path withProgram(final Path dir, final String name,
final String text) throws IOException {
final Path path = dir.resolve(name);
Expand Down

0 comments on commit 1263efc

Please sign in to comment.