Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Nov 20, 2019
2 parents 1d59fc4 + 22023ab commit a239998
Show file tree
Hide file tree
Showing 69 changed files with 159 additions and 77 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ SOFTWARE.
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<version>0.18.17</version>
<configuration>
<excludes combine.children="append">
<exclude>checkstyle:/src/site/resources/.*</exclude>
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/org/jpeek/App.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -67,6 +67,7 @@
* @checkstyle CyclomaticComplexityCheck (500 lines)
* @checkstyle MethodLengthCheck (500 lines)
* @checkstyle JavaNCSSCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*
* @todo #118:30min LCC metric has impediments (see puzzles in LCC.xml
* and in `MetricsTest`).
Expand Down Expand Up @@ -143,7 +144,10 @@ public App(final Path source, final Path target,
* Analyze sources.
* @throws IOException If fails
*/
@SuppressWarnings("PMD.ExcessiveMethodLength")
@SuppressWarnings({
"PMD.ExcessiveMethodLength",
"PMD.NcssCount"
})
public void analyze() throws IOException {
final Base base = new DefaultBase(this.input);
final XML skeleton = new Skeleton(base).xml();
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/Base.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -34,6 +34,7 @@
* @author Yegor Bugayenko ([email protected])
* @version $Id$
* @since 0.1
* @checkstyle JavadocTagsCheck (500 lines)
*/
public interface Base {

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/DefaultBase.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -37,6 +37,7 @@
* @author Yegor Bugayenko ([email protected])
* @version $Id$
* @since 0.1
* @checkstyle JavadocTagsCheck (500 lines)
*/
public final class DefaultBase implements Base {

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/FileTarget.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -36,6 +36,7 @@
* @author Felipe Moreno ([email protected])
* @version $Id$
* @since 0.26.4
* @checkstyle JavadocTagsCheck (500 lines)
*/
public final class FileTarget implements Target {

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/Header.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -39,6 +39,7 @@
* @version $Id$
* @since 0.8
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
public final class Header implements Iterable<Directive> {

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/Index.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -46,6 +46,7 @@
* @version $Id$
* @since 0.6
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
final class Index implements Iterable<Directive> {

Expand Down
7 changes: 6 additions & 1 deletion src/main/java/org/jpeek/Main.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -42,7 +42,12 @@
* @author Yegor Bugayenko ([email protected])
* @version $Id$
* @since 0.1
* @todo #308:30min Due to introduce new version of qulice 0.18.17 there were
* many 'JavadocTagsCheck' suppression, so we need to fix that by remove
* author, version and since tags in all javadoc. After that remove
* 'JavadocTagsCheck' suppression.
* @checkstyle JavadocVariableCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
public final class Main {

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/Matrix.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -47,6 +47,7 @@
* @version $Id$
* @since 0.6
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
final class Matrix implements Iterable<Directive> {

Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/jpeek/Report.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -56,12 +56,14 @@
* @version $Id$
* @since 0.1
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
final class Report {
/**
* Default mean.
*/
private static final double DEFAULT_MEAN = 0.5d;

/**
* Default sigma.
*/
Expand Down Expand Up @@ -172,6 +174,7 @@ final class Report {
* @param target Target dir
* @throws IOException If fails
*/
@SuppressWarnings("PMD.GuardLogStatement")
public void save(final Path target) throws IOException {
final long start = System.currentTimeMillis();
final XML xml = new StrictXML(
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/ReportWithStatistics.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -44,6 +44,7 @@
* @version $Id$
* @since 0.16
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
final class ReportWithStatistics implements XML {

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/Target.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -32,6 +32,7 @@
* @author Felipe Moreno ([email protected])
* @version $Id$
* @since 0.26.4
* @checkstyle JavadocTagsCheck (500 lines)
*/
public interface Target {

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/Version.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -37,6 +37,7 @@
* @version $Id$
* @since 0.11
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
public final class Version implements Scalar<String> {

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jpeek/package-info.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/org/jpeek/skeleton/Classes.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand All @@ -24,7 +24,6 @@
package org.jpeek.skeleton;

import com.jcabi.log.Logger;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
Expand All @@ -51,6 +50,7 @@
* @since 0.27
* @checkstyle AbbreviationAsWordInNameCheck (5 lines)
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
final class Classes implements Iterable<CtClass> {

Expand All @@ -74,7 +74,10 @@ final class Classes implements Iterable<CtClass> {
}

@Override
@SuppressWarnings("PMD.PrematureDeclaration")
@SuppressWarnings({
"PMD.PrematureDeclaration",
"PMD.GuardLogStatement"
})
public Iterator<CtClass> iterator() {
final Collection<CtClass> classes;
final long start = System.currentTimeMillis();
Expand All @@ -88,8 +91,7 @@ public Iterator<CtClass> iterator() {
&& !ctClass.getName().matches("^.+\\$AjcClosure[0-9]+$"),
new Mapped<>(
path -> {
try (InputStream stream =
new FileInputStream(path.toFile())) {
try (InputStream stream = Files.newInputStream(path)) {
return this.pool.makeClassIfNew(stream);
}
},
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/skeleton/OpsOf.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -41,6 +41,7 @@
* @checkstyle AbbreviationAsWordInNameCheck (5 lines)
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle ParameterNumberCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
final class OpsOf extends MethodVisitor {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/skeleton/QualifiedName.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -34,6 +34,7 @@
* @author Ilya Kharlamov ([email protected])
* @version $Id$
* @since 0.29
* @checkstyle JavadocTagsCheck (500 lines)
*/
public final class QualifiedName extends TextEnvelope {
/**
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/org/jpeek/skeleton/Skeleton.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -59,6 +59,7 @@
* @since 0.23
* @checkstyle AbbreviationAsWordInNameCheck (5 lines)
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
public final class Skeleton {

Expand Down Expand Up @@ -139,7 +140,10 @@ public XML xml() {
* Calculate Xembly for all packages.
* @return XML for all packages (one by one)
*/
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
@SuppressWarnings({
"PMD.AvoidInstantiatingObjectsInLoops",
"PMD.GuardLogStatement"
})
private Iterable<Map.Entry<String, Directives>> packages() {
final long start = System.currentTimeMillis();
final Collection<Map.Entry<String, Directives>> all =
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/skeleton/TypesOf.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -45,6 +45,7 @@
* @since 0.27
* @checkstyle AbbreviationAsWordInNameCheck (5 lines)
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
final class TypesOf extends SignatureVisitor implements Iterable<Directive> {

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/skeleton/XmlClass.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -51,6 +51,7 @@
* @checkstyle AbbreviationAsWordInNameCheck (5 lines)
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle ParameterNumberCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
final class XmlClass extends ClassVisitor implements Iterable<Directive> {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jpeek/skeleton/package-info.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/web/AsyncReports.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -46,6 +46,7 @@
* @version $Id$
* @since 0.8
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
final class AsyncReports implements
BiFunc<String, String, Func<String, Response>> {
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/jpeek/web/DyNum.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -38,13 +38,14 @@
* @version $Id$
* @since 0.17
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
final class DyNum extends Number {

/**
* Score multiplier.
*/
private static final Double MULTIPLIER = 100000.0d;
private static final Double MULTIPLIER = 100_000.0d;

/**
* Serialization marker.
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jpeek/web/Dynamo.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2019 Yegor Bugayenko
Expand Down Expand Up @@ -43,6 +43,7 @@
* @version $Id$
* @since 0.14
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @checkstyle JavadocTagsCheck (500 lines)
*/
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
final class Dynamo implements Region {
Expand Down
Loading

5 comments on commit a239998

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on a239998 Nov 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 118-aa952a15 disappeared from src/test/java/org/jpeek/MetricsTest.java, that's why I closed #252. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on a239998 Nov 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 156-4fb50d79 disappeared from src/test/java/org/jpeek/skeleton/SkeletonTest.java, that's why I closed #261. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on a239998 Nov 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 118-560e90f9 discovered in src/test/java/org/jpeek/MetricsTest.java and submitted as #356. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on a239998 Nov 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 308-016448ee discovered in src/main/java/org/jpeek/Main.java and submitted as #357. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on a239998 Nov 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 156-7b4862fe discovered in src/test/java/org/jpeek/skeleton/SkeletonTest.java and submitted as #358. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.