Skip to content

Commit

Permalink
#1097 checkstyle works
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Sep 30, 2021
1 parent e296098 commit 135d33c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 94 deletions.
7 changes: 0 additions & 7 deletions README.md
@@ -1,7 +1,5 @@
<img src="http://img.qulice.com/logo.svg" width="200px" height="55px"/>

[![Donate via Zerocracy](https://www.0crat.com/contrib-badge/C3T49A35L.svg)](https://www.0crat.com/contrib/C3T49A35L)

[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)
[![Managed by Zerocracy](https://www.0crat.com/badge/C3T49A35L.svg)](https://www.0crat.com/p/C3T49A35L)
[![DevOps By Rultor.com](http://www.rultor.com/b/teamed/qulice)](http://www.rultor.com/p/teamed/qulice)
Expand Down Expand Up @@ -84,8 +82,3 @@ sending us your pull request please run full Maven build:
> mvn clean install -Pqulice
Keep in mind that JDK7 and Maven 3.1.0 are the lowest versions you may use.

## Got questions?

If you have questions or general suggestions, don't hesitate to submit
a new [Github issue](https://github.com/tpc2/qulice/issues/new).
78 changes: 11 additions & 67 deletions pom.xml
Expand Up @@ -33,7 +33,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.49.5</version>
<version>0.54.1</version>
</parent>
<groupId>com.qulice</groupId>
<artifactId>qulice</artifactId>
Expand All @@ -50,43 +50,27 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<module>qulice-spotbugs</module>
<module>qulice-gradle-plugin</module>
</modules>
<description><![CDATA[
Quality control library, integrating together other static
analysis and validation tools and instruments.
]]></description>
<description>Quality control library, integrating together other static analysis and validation tools and instruments.</description>
<url>http://www.qulice.com</url>
<inceptionYear>2011</inceptionYear>
<organization>
<name>Qulice.com</name>
<url>http://www.qulice.com</url>
<url>https://www.qulice.com</url>
</organization>
<licenses>
<license>
<name>BSD</name>
<url>http://www.qulice.com/LICENSE.txt</url>
<url>https://www.qulice.com/LICENSE.txt</url>
<distribution>repo</distribution>
<comments><![CDATA[
This is free open source project, feel free to redistribute it,
always providing a link to qulice.com website.
]]></comments>
</license>
</licenses>
<mailingLists>
<mailingList>
<name>Qulice Discussions</name>
<subscribe>qulice@googlegroups.com</subscribe>
<unsubscribe>qulice@googlegroups.com</unsubscribe>
<post>qulice@googlegroups.com</post>
<archive>http://groups.google.com/group/qulice</archive>
</mailingList>
</mailingLists>
<developers>
<developer>
<id>1</id>
<name>Yegor Bugayenko</name>
<email>yegor@tpc2.com</email>
<organization>tpc2.com</organization>
<organizationUrl>http://www.tpc2.com</organizationUrl>
<email>yegor256@gmail.com.com</email>
<organization>Zerocracy</organization>
<organizationUrl>https://www.zerocracy.com</organizationUrl>
<roles>
<role>Architect</role>
<role>Developer</role>
Expand All @@ -110,27 +94,15 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<distributionManagement>
<site>
<id>github-pages</id>
<url>http://www.qulice.com</url>
<url>https://www.qulice.com</url>
</site>
</distributionManagement>
<dependencyManagement>
<dependencies>
<!-- Manual jcabi-xml version override until parent POM declares
version 0.17.1 or higher -->
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-xml</artifactId>
<version>0.17.1</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.0-alpha5</version>
</dependency>
<dependency>
<groupId>org.cactoos</groupId>
Expand Down Expand Up @@ -160,13 +132,6 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
Expand All @@ -178,27 +143,8 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<tags>
<tag>
<name>todo</name>
<placement>a</placement>
<head>todo:</head>
</tag>
<tag>
<name>checkstyle</name>
<placement>a</placement>
<head>checkstyle:</head>
</tag>
</tags>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<useFile>false</useFile>
<runOrder>random</runOrder>
Expand All @@ -214,7 +160,6 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
Expand Down Expand Up @@ -286,7 +231,6 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<version>0.17.4</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
Expand Up @@ -46,7 +46,7 @@
import org.hamcrest.Matchers;
import org.hamcrest.TypeSafeMatcher;
import org.hamcrest.collection.IsIterableContainingInOrder;
import org.junit.Rule;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -82,11 +82,14 @@ public final class CheckstyleValidatorTest {
private static final String LICENSE = "Hello.";

/**
* License rule.
* @checkstyle VisibilityModifierCheck (5 lines)
* Rule for testing.
*/
@Rule
public final LicenseRule rule = new LicenseRule();
private License rule;

@BeforeEach
public void setRule() {
this.rule = new License();
}

/**
* CheckstyleValidator can catch checkstyle violations.
Expand Down
Expand Up @@ -35,15 +35,12 @@
import java.nio.charset.StandardCharsets;
import org.apache.commons.io.FileUtils;
import org.cactoos.text.Joined;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;

/**
* Builder of {@code LICENSE.txt} content.
* @since 0.4
*/
public final class LicenseRule implements TestRule {
public final class License {

/**
* The text.
Expand All @@ -65,18 +62,12 @@ public final class LicenseRule implements TestRule {
*/
private File directory;

@Override
public Statement apply(final Statement statement,
final Description description) {
return statement;
}

/**
* Use this EOL.
* @param txt What to use as end-of-line character
* @return This object
*/
public LicenseRule withEol(final String txt) {
public License withEol(final String txt) {
this.eol = txt;
return this;
}
Expand All @@ -86,7 +77,7 @@ public LicenseRule withEol(final String txt) {
* @param lns The lines to use
* @return This object
*/
public LicenseRule withLines(final String... lns) {
public License withLines(final String... lns) {
this.lines = new String[lns.length];
System.arraycopy(lns, 0, this.lines, 0, lns.length);
return this;
Expand All @@ -97,7 +88,7 @@ public LicenseRule withLines(final String... lns) {
* @param name The name of package
* @return This object
*/
public LicenseRule withPackage(final String name) {
public License withPackage(final String name) {
this.pkg = name;
return this;
}
Expand All @@ -107,7 +98,7 @@ public LicenseRule withPackage(final String name) {
* @param dir The folder to save to
* @return This object
*/
public LicenseRule savePackageInfo(final File dir) {
public License savePackageInfo(final File dir) {
this.directory = dir;
return this;
}
Expand Down
Expand Up @@ -54,7 +54,7 @@ public void validate(final MavenEnvironment env)
rules.put("requireJavaVersion", java);
java.put("version", "1.7");
env.executor().execute(
"org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1",
"org.apache.maven.plugins:maven-enforcer-plugin:3.0.0",
"enforce",
props
);
Expand Down

0 comments on commit 135d33c

Please sign in to comment.