Skip to content

Commit 893dd4d

Browse files
build(deps): bump net.sourceforge.pmd:pmd-java from 7.4.0 to 7.15.0 (via #1166)
1 parent 5dc185e commit 893dd4d

File tree

50 files changed

+112
-168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+112
-168
lines changed

allure-attachments/src/main/java/io/qameta/allure/attachment/AttachmentData.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*
2121
* @author charlie (Dmitry Baev).
2222
*/
23+
@FunctionalInterface
2324
public interface AttachmentData {
2425

2526
String getName();

allure-attachments/src/main/java/io/qameta/allure/attachment/AttachmentProcessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @param <T> the type of attachment data.
2020
* @author charlie (Dmitry Baev).
2121
*/
22+
@FunctionalInterface
2223
public interface AttachmentProcessor<T extends AttachmentData> {
2324

2425
void addAttachment(T attachmentData, AttachmentRenderer<T> renderer);

allure-attachments/src/main/java/io/qameta/allure/attachment/AttachmentRenderer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* @author charlie (Dmitry Baev).
2121
*/
2222
@SuppressWarnings("PMD.AvoidUncheckedExceptionsInSignatures")
23+
@FunctionalInterface
2324
public interface AttachmentRenderer<T extends AttachmentData> {
2425

2526
AttachmentContent render(T attachmentData) throws AttachmentRenderException;

allure-attachments/src/main/java/io/qameta/allure/attachment/http/HttpRequestAttachment.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ public String toString() {
112112
/**
113113
* Builder for HttpRequestAttachment.
114114
*/
115-
@SuppressWarnings("PMD.AvoidFieldNameMatchingMethodName")
116115
public static final class Builder {
117116

118117
private final String name;

allure-attachments/src/main/java/io/qameta/allure/attachment/http/HttpResponseAttachment.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public String toString() {
9090
/**
9191
* Builder for HttpRequestAttachment.
9292
*/
93-
@SuppressWarnings("PMD.AvoidFieldNameMatchingMethodName")
9493
public static final class Builder {
9594

9695
private final String name;

allure-cucumber4-jvm/src/main/java/io/qameta/allure/cucumber4jvm/AllureCucumber4Jvm.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
"ClassDataAbstractionCoupling",
8383
"ClassFanOutComplexity",
8484
"MultipleStringLiterals",
85-
"PMD.ExcessiveImports",
8685
})
8786
public class AllureCucumber4Jvm implements ConcurrentEventListener {
8887

allure-cucumber4-jvm/src/main/java/io/qameta/allure/cucumber4jvm/LabelBuilder.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
/**
5050
* Scenario labels and links builder.
5151
*/
52-
@SuppressWarnings({"CyclomaticComplexity", "PMD.CyclomaticComplexity", "PMD.NcssCount", "MultipleStringLiterals"})
53-
class LabelBuilder {
52+
@SuppressWarnings({"CyclomaticComplexity", "MultipleStringLiterals"})
53+
final class LabelBuilder {
5454
private static final Logger LOGGER = LoggerFactory.getLogger(LabelBuilder.class);
5555
private static final String COMPOSITE_TAG_DELIMITER = "=";
5656

@@ -89,34 +89,34 @@ class LabelBuilder {
8989

9090
switch (tagKey) {
9191
case SEVERITY:
92-
getScenarioLabels().add(ResultsUtils.createSeverityLabel(tagValue.toLowerCase()));
92+
scenarioLabels.add(ResultsUtils.createSeverityLabel(tagValue.toLowerCase()));
9393
break;
9494
case TMS_LINK:
95-
getScenarioLinks().add(ResultsUtils.createTmsLink(tagValue));
95+
scenarioLinks.add(ResultsUtils.createTmsLink(tagValue));
9696
break;
9797
case ISSUE_LINK:
98-
getScenarioLinks().add(ResultsUtils.createIssueLink(tagValue));
98+
scenarioLinks.add(ResultsUtils.createIssueLink(tagValue));
9999
break;
100100
case PLAIN_LINK:
101-
getScenarioLinks().add(ResultsUtils.createLink(null, tagValue, tagValue, null));
101+
scenarioLinks.add(ResultsUtils.createLink(null, tagValue, tagValue, null));
102102
break;
103103
default:
104104
LOGGER.warn("Composite tag {} is not supported. adding it as RAW", tagKey);
105-
getScenarioLabels().add(getTagLabel(tag));
105+
scenarioLabels.add(getTagLabel(tag));
106106
break;
107107
}
108108
} else if (tagParser.isPureSeverityTag(tag)) {
109-
getScenarioLabels().add(ResultsUtils.createSeverityLabel(tagString.substring(1)));
109+
scenarioLabels.add(ResultsUtils.createSeverityLabel(tagString.substring(1)));
110110
} else if (!tagParser.isResultTag(tag)) {
111-
getScenarioLabels().add(getTagLabel(tag));
111+
scenarioLabels.add(getTagLabel(tag));
112112
}
113113
}
114114

115115
final String featureName = feature.getName();
116116
final String uri = scenario.getUri();
117117

118-
getScenarioLabels().addAll(ResultsUtils.getProvidedLabels());
119-
getScenarioLabels().addAll(Arrays.asList(
118+
scenarioLabels.addAll(ResultsUtils.getProvidedLabels());
119+
scenarioLabels.addAll(Arrays.asList(
120120
createHostLabel(),
121121
createThreadLabel(),
122122
createFeatureLabel(featureName),
@@ -130,7 +130,7 @@ class LabelBuilder {
130130

131131
featurePackage(uri, featureName)
132132
.map(ResultsUtils::createPackageLabel)
133-
.ifPresent(getScenarioLabels()::add);
133+
.ifPresent(scenarioLabels::add);
134134
}
135135

136136
public List<Label> getScenarioLabels() {
@@ -151,13 +151,13 @@ private Label getTagLabel(final PickleTag tag) {
151151
* @param tagString Full tag name and value
152152
*/
153153
private void tryHandleNamedLink(final String tagString) {
154-
final String namedLinkPatternString = PLAIN_LINK + "\\.(\\w+-?)+=(\\w+(-|_)?)+";
154+
final String namedLinkPatternString = PLAIN_LINK + "\\.(\\w+-?)+=(\\w+([-_])?)+";
155155
final Pattern namedLinkPattern = Pattern.compile(namedLinkPatternString, Pattern.CASE_INSENSITIVE);
156156

157157
if (namedLinkPattern.matcher(tagString).matches()) {
158158
final String type = tagString.split(COMPOSITE_TAG_DELIMITER)[0].split("[.]")[1];
159159
final String name = tagString.split(COMPOSITE_TAG_DELIMITER)[1];
160-
getScenarioLinks().add(ResultsUtils.createLink(null, name, null, type));
160+
scenarioLinks.add(ResultsUtils.createLink(null, name, null, type));
161161
} else {
162162
LOGGER.warn("Composite named tag {} does not match regex {}. Skipping", tagString,
163163
namedLinkPatternString);

allure-cucumber5-jvm/src/main/java/io/qameta/allure/cucumber5jvm/AllureCucumber5Jvm.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"ClassDataAbstractionCoupling",
7979
"ClassFanOutComplexity",
8080
"MultipleStringLiterals",
81-
"PMD.ExcessiveImports",
8281
})
8382
public class AllureCucumber5Jvm implements ConcurrentEventListener {
8483

allure-cucumber5-jvm/src/main/java/io/qameta/allure/cucumber5jvm/LabelBuilder.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
/**
4949
* Scenario labels and links builder.
5050
*/
51-
@SuppressWarnings({"CyclomaticComplexity", "PMD.CyclomaticComplexity", "PMD.NcssCount", "MultipleStringLiterals"})
51+
@SuppressWarnings({"CyclomaticComplexity", "MultipleStringLiterals"})
5252
class LabelBuilder {
5353
private static final Logger LOGGER = LoggerFactory.getLogger(LabelBuilder.class);
5454
private static final String COMPOSITE_TAG_DELIMITER = "=";
@@ -86,34 +86,34 @@ class LabelBuilder {
8686

8787
switch (tagKey) {
8888
case SEVERITY:
89-
getScenarioLabels().add(ResultsUtils.createSeverityLabel(tagValue.toLowerCase()));
89+
scenarioLabels.add(ResultsUtils.createSeverityLabel(tagValue.toLowerCase()));
9090
break;
9191
case TMS_LINK:
92-
getScenarioLinks().add(ResultsUtils.createTmsLink(tagValue));
92+
scenarioLinks.add(ResultsUtils.createTmsLink(tagValue));
9393
break;
9494
case ISSUE_LINK:
95-
getScenarioLinks().add(ResultsUtils.createIssueLink(tagValue));
95+
scenarioLinks.add(ResultsUtils.createIssueLink(tagValue));
9696
break;
9797
case PLAIN_LINK:
98-
getScenarioLinks().add(ResultsUtils.createLink(null, tagValue, tagValue, null));
98+
scenarioLinks.add(ResultsUtils.createLink(null, tagValue, tagValue, null));
9999
break;
100100
default:
101101
LOGGER.warn("Composite tag {} is not supported. adding it as RAW", tagKey);
102-
getScenarioLabels().add(getTagLabel(tag));
102+
scenarioLabels.add(getTagLabel(tag));
103103
break;
104104
}
105105
} else if (tagParser.isPureSeverityTag(tag)) {
106-
getScenarioLabels().add(ResultsUtils.createSeverityLabel(tag.substring(1)));
106+
scenarioLabels.add(ResultsUtils.createSeverityLabel(tag.substring(1)));
107107
} else if (!tagParser.isResultTag(tag)) {
108-
getScenarioLabels().add(getTagLabel(tag));
108+
scenarioLabels.add(getTagLabel(tag));
109109
}
110110
}
111111

112112
final String featureName = feature.getName();
113113
final URI uri = scenario.getUri();
114114

115-
getScenarioLabels().addAll(ResultsUtils.getProvidedLabels());
116-
getScenarioLabels().addAll(Arrays.asList(
115+
scenarioLabels.addAll(ResultsUtils.getProvidedLabels());
116+
scenarioLabels.addAll(Arrays.asList(
117117
createHostLabel(),
118118
createThreadLabel(),
119119
createFeatureLabel(featureName),
@@ -127,7 +127,7 @@ class LabelBuilder {
127127

128128
featurePackage(uri.toString(), featureName)
129129
.map(ResultsUtils::createPackageLabel)
130-
.ifPresent(getScenarioLabels()::add);
130+
.ifPresent(scenarioLabels::add);
131131
}
132132

133133
public List<Label> getScenarioLabels() {
@@ -148,13 +148,13 @@ private Label getTagLabel(final String tag) {
148148
* @param tagString Full tag name and value
149149
*/
150150
private void tryHandleNamedLink(final String tagString) {
151-
final String namedLinkPatternString = PLAIN_LINK + "\\.(\\w+-?)+=(\\w+(-|_)?)+";
151+
final String namedLinkPatternString = PLAIN_LINK + "\\.(\\w+-?)+=(\\w+([-_])?)+";
152152
final Pattern namedLinkPattern = Pattern.compile(namedLinkPatternString, Pattern.CASE_INSENSITIVE);
153153

154154
if (namedLinkPattern.matcher(tagString).matches()) {
155155
final String type = tagString.split(COMPOSITE_TAG_DELIMITER)[0].split("[.]")[1];
156156
final String name = tagString.split(COMPOSITE_TAG_DELIMITER)[1];
157-
getScenarioLinks().add(ResultsUtils.createLink(null, name, null, type));
157+
scenarioLinks.add(ResultsUtils.createLink(null, name, null, type));
158158
} else {
159159
LOGGER.warn("Composite named tag {} does not match regex {}. Skipping", tagString,
160160
namedLinkPatternString);

allure-cucumber6-jvm/src/main/java/io/qameta/allure/cucumber6jvm/AllureCucumber6Jvm.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
@SuppressWarnings({
7676
"ClassDataAbstractionCoupling",
7777
"ClassFanOutComplexity",
78-
"PMD.ExcessiveImports",
7978
})
8079
public class AllureCucumber6Jvm implements ConcurrentEventListener {
8180

0 commit comments

Comments
 (0)