Skip to content

Commit 135d33c

Browse files
committedSep 30, 2021
#1097 checkstyle works
1 parent e296098 commit 135d33c

File tree

5 files changed

+25
-94
lines changed

5 files changed

+25
-94
lines changed
 

‎README.md

-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<img src="http://img.qulice.com/logo.svg" width="200px" height="55px"/>
22

3-
[![Donate via Zerocracy](https://www.0crat.com/contrib-badge/C3T49A35L.svg)](https://www.0crat.com/contrib/C3T49A35L)
4-
53
[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)
64
[![Managed by Zerocracy](https://www.0crat.com/badge/C3T49A35L.svg)](https://www.0crat.com/p/C3T49A35L)
75
[![DevOps By Rultor.com](http://www.rultor.com/b/teamed/qulice)](http://www.rultor.com/p/teamed/qulice)
@@ -84,8 +82,3 @@ sending us your pull request please run full Maven build:
8482
> mvn clean install -Pqulice
8583
8684
Keep in mind that JDK7 and Maven 3.1.0 are the lowest versions you may use.
87-
88-
## Got questions?
89-
90-
If you have questions or general suggestions, don't hesitate to submit
91-
a new [Github issue](https://github.com/tpc2/qulice/issues/new).

‎pom.xml

+11-67
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
3333
<parent>
3434
<groupId>com.jcabi</groupId>
3535
<artifactId>parent</artifactId>
36-
<version>0.49.5</version>
36+
<version>0.54.1</version>
3737
</parent>
3838
<groupId>com.qulice</groupId>
3939
<artifactId>qulice</artifactId>
@@ -50,43 +50,27 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
5050
<module>qulice-spotbugs</module>
5151
<module>qulice-gradle-plugin</module>
5252
</modules>
53-
<description><![CDATA[
54-
Quality control library, integrating together other static
55-
analysis and validation tools and instruments.
56-
]]></description>
53+
<description>Quality control library, integrating together other static analysis and validation tools and instruments.</description>
5754
<url>http://www.qulice.com</url>
5855
<inceptionYear>2011</inceptionYear>
5956
<organization>
6057
<name>Qulice.com</name>
61-
<url>http://www.qulice.com</url>
58+
<url>https://www.qulice.com</url>
6259
</organization>
6360
<licenses>
6461
<license>
6562
<name>BSD</name>
66-
<url>http://www.qulice.com/LICENSE.txt</url>
63+
<url>https://www.qulice.com/LICENSE.txt</url>
6764
<distribution>repo</distribution>
68-
<comments><![CDATA[
69-
This is free open source project, feel free to redistribute it,
70-
always providing a link to qulice.com website.
71-
]]></comments>
7265
</license>
7366
</licenses>
74-
<mailingLists>
75-
<mailingList>
76-
<name>Qulice Discussions</name>
77-
<subscribe>qulice@googlegroups.com</subscribe>
78-
<unsubscribe>qulice@googlegroups.com</unsubscribe>
79-
<post>qulice@googlegroups.com</post>
80-
<archive>http://groups.google.com/group/qulice</archive>
81-
</mailingList>
82-
</mailingLists>
8367
<developers>
8468
<developer>
8569
<id>1</id>
8670
<name>Yegor Bugayenko</name>
87-
<email>yegor@tpc2.com</email>
88-
<organization>tpc2.com</organization>
89-
<organizationUrl>http://www.tpc2.com</organizationUrl>
71+
<email>yegor256@gmail.com.com</email>
72+
<organization>Zerocracy</organization>
73+
<organizationUrl>https://www.zerocracy.com</organizationUrl>
9074
<roles>
9175
<role>Architect</role>
9276
<role>Developer</role>
@@ -110,27 +94,15 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
11094
<distributionManagement>
11195
<site>
11296
<id>github-pages</id>
113-
<url>http://www.qulice.com</url>
97+
<url>https://www.qulice.com</url>
11498
</site>
11599
</distributionManagement>
116100
<dependencyManagement>
117101
<dependencies>
118-
<!-- Manual jcabi-xml version override until parent POM declares
119-
version 0.17.1 or higher -->
120102
<dependency>
121-
<groupId>com.jcabi</groupId>
122-
<artifactId>jcabi-xml</artifactId>
123-
<version>0.17.1</version>
124-
</dependency>
125-
<dependency>
126-
<groupId>org.antlr</groupId>
127-
<artifactId>antlr4-runtime</artifactId>
128-
<version>4.7.1</version>
129-
</dependency>
130-
<dependency>
131-
<groupId>org.apache.commons</groupId>
132-
<artifactId>commons-lang3</artifactId>
133-
<version>3.7</version>
103+
<groupId>org.slf4j</groupId>
104+
<artifactId>slf4j-api</artifactId>
105+
<version>2.0.0-alpha5</version>
134106
</dependency>
135107
<dependency>
136108
<groupId>org.cactoos</groupId>
@@ -160,13 +132,6 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
160132
<build>
161133
<pluginManagement>
162134
<plugins>
163-
<plugin>
164-
<artifactId>maven-compiler-plugin</artifactId>
165-
<configuration>
166-
<source>8</source>
167-
<target>8</target>
168-
</configuration>
169-
</plugin>
170135
<plugin>
171136
<artifactId>maven-jar-plugin</artifactId>
172137
<configuration>
@@ -178,27 +143,8 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
178143
</archive>
179144
</configuration>
180145
</plugin>
181-
<plugin>
182-
<artifactId>maven-javadoc-plugin</artifactId>
183-
<version>3.0.0</version>
184-
<configuration>
185-
<tags>
186-
<tag>
187-
<name>todo</name>
188-
<placement>a</placement>
189-
<head>todo:</head>
190-
</tag>
191-
<tag>
192-
<name>checkstyle</name>
193-
<placement>a</placement>
194-
<head>checkstyle:</head>
195-
</tag>
196-
</tags>
197-
</configuration>
198-
</plugin>
199146
<plugin>
200147
<artifactId>maven-surefire-plugin</artifactId>
201-
<version>3.0.0-M3</version>
202148
<configuration>
203149
<useFile>false</useFile>
204150
<runOrder>random</runOrder>
@@ -214,7 +160,6 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
214160
</plugin>
215161
<plugin>
216162
<artifactId>maven-failsafe-plugin</artifactId>
217-
<version>3.0.0-M3</version>
218163
<configuration>
219164
<encoding>${project.build.sourceEncoding}</encoding>
220165
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
@@ -286,7 +231,6 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
286231
<plugin>
287232
<groupId>com.qulice</groupId>
288233
<artifactId>qulice-maven-plugin</artifactId>
289-
<version>0.17.4</version>
290234
</plugin>
291235
</plugins>
292236
</pluginManagement>

‎qulice-checkstyle/src/test/java/com/qulice/checkstyle/CheckstyleValidatorTest.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
import org.hamcrest.Matchers;
4747
import org.hamcrest.TypeSafeMatcher;
4848
import org.hamcrest.collection.IsIterableContainingInOrder;
49-
import org.junit.Rule;
49+
import org.junit.jupiter.api.BeforeEach;
5050
import org.junit.jupiter.api.Disabled;
5151
import org.junit.jupiter.api.Test;
5252

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

8484
/**
85-
* License rule.
86-
* @checkstyle VisibilityModifierCheck (5 lines)
85+
* Rule for testing.
8786
*/
88-
@Rule
89-
public final LicenseRule rule = new LicenseRule();
87+
private License rule;
88+
89+
@BeforeEach
90+
public void setRule() {
91+
this.rule = new License();
92+
}
9093

9194
/**
9295
* CheckstyleValidator can catch checkstyle violations.

‎qulice-checkstyle/src/test/java/com/qulice/checkstyle/LicenseRule.java ‎qulice-checkstyle/src/test/java/com/qulice/checkstyle/License.java

+5-14
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,12 @@
3535
import java.nio.charset.StandardCharsets;
3636
import org.apache.commons.io.FileUtils;
3737
import org.cactoos.text.Joined;
38-
import org.junit.rules.TestRule;
39-
import org.junit.runner.Description;
40-
import org.junit.runners.model.Statement;
4138

4239
/**
4340
* Builder of {@code LICENSE.txt} content.
4441
* @since 0.4
4542
*/
46-
public final class LicenseRule implements TestRule {
43+
public final class License {
4744

4845
/**
4946
* The text.
@@ -65,18 +62,12 @@ public final class LicenseRule implements TestRule {
6562
*/
6663
private File directory;
6764

68-
@Override
69-
public Statement apply(final Statement statement,
70-
final Description description) {
71-
return statement;
72-
}
73-
7465
/**
7566
* Use this EOL.
7667
* @param txt What to use as end-of-line character
7768
* @return This object
7869
*/
79-
public LicenseRule withEol(final String txt) {
70+
public License withEol(final String txt) {
8071
this.eol = txt;
8172
return this;
8273
}
@@ -86,7 +77,7 @@ public LicenseRule withEol(final String txt) {
8677
* @param lns The lines to use
8778
* @return This object
8879
*/
89-
public LicenseRule withLines(final String... lns) {
80+
public License withLines(final String... lns) {
9081
this.lines = new String[lns.length];
9182
System.arraycopy(lns, 0, this.lines, 0, lns.length);
9283
return this;
@@ -97,7 +88,7 @@ public LicenseRule withLines(final String... lns) {
9788
* @param name The name of package
9889
* @return This object
9990
*/
100-
public LicenseRule withPackage(final String name) {
91+
public License withPackage(final String name) {
10192
this.pkg = name;
10293
return this;
10394
}
@@ -107,7 +98,7 @@ public LicenseRule withPackage(final String name) {
10798
* @param dir The folder to save to
10899
* @return This object
109100
*/
110-
public LicenseRule savePackageInfo(final File dir) {
101+
public License savePackageInfo(final File dir) {
111102
this.directory = dir;
112103
return this;
113104
}

‎qulice-maven-plugin/src/main/java/com/qulice/maven/EnforcerValidator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void validate(final MavenEnvironment env)
5454
rules.put("requireJavaVersion", java);
5555
java.put("version", "1.7");
5656
env.executor().execute(
57-
"org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1",
57+
"org.apache.maven.plugins:maven-enforcer-plugin:3.0.0",
5858
"enforce",
5959
props
6060
);

0 commit comments

Comments
 (0)
Please sign in to comment.