Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Commit

Permalink
Removing final from attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Dec 24, 2017
1 parent fb50ecd commit 352216f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 16 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
## Unreleased
### No issue

**Doc**


[fb50ecdd8867308](https://github.com/tomasbjerre/violation-comments-to-gitlab-maven-plugin/commit/fb50ecdd8867308) Tomas Bjerre *2017-12-22 20:05:59*


## violation-comments-to-gitlab-maven-plugin-1.8
### No issue

**Bumping version to fix faulty release**


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import static org.gitlab.api.TokenType.PRIVATE_TOKEN;
import static se.bjurr.violations.comments.gitlab.lib.ViolationCommentsToGitLabApi.violationCommentsToGitLabApi;
import static se.bjurr.violations.lib.ViolationsReporterApi.violationsReporterApi;
import static se.bjurr.violations.lib.model.SEVERITY.INFO;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -27,13 +26,17 @@
public class ViolationCommentsMojo extends AbstractMojo {

@Parameter(property = "violations", required = false)
private final List<ViolationConfig> violations = new ArrayList<ViolationConfig>();
private List<ViolationConfig> violations;

@Parameter(property = "commentOnlyChangedContent", required = false)
private final boolean commentOnlyChangedContent = true;
@Parameter(property = "commentOnlyChangedContent", required = false, defaultValue = "true")
private boolean commentOnlyChangedContent;

@Parameter(property = "createCommentWithAllSingleFileComments", required = false)
private final boolean createCommentWithAllSingleFileComments = true;
@Parameter(
property = "createCommentWithAllSingleFileComments",
required = false,
defaultValue = "true"
)
private boolean createCommentWithAllSingleFileComments;

@Parameter(property = "gitLabUrl", required = false)
private String gitLabUrl;
Expand All @@ -47,23 +50,23 @@ public class ViolationCommentsMojo extends AbstractMojo {
@Parameter(property = "mergeRequestId", required = false)
private String mergeRequestId;

@Parameter(property = "ignoreCertificateErrors", required = false)
private final Boolean ignoreCertificateErrors = true;
@Parameter(property = "ignoreCertificateErrors", required = false, defaultValue = "true")
private Boolean ignoreCertificateErrors;

@Parameter(property = "apiTokenPrivate", required = false)
private final Boolean apiTokenPrivate = true;
@Parameter(property = "apiTokenPrivate", required = false, defaultValue = "true")
private Boolean apiTokenPrivate;

@Parameter(property = "authMethodHeader", required = false)
private final Boolean authMethodHeader = true;
@Parameter(property = "authMethodHeader", required = false, defaultValue = "true")
private Boolean authMethodHeader;

@Parameter(property = "minSeverity", required = false)
private final SEVERITY minSeverity = INFO;
@Parameter(property = "minSeverity", required = false, defaultValue = "INFO")
private SEVERITY minSeverity;

@Parameter(property = "keepOldComments", required = false)
private final Boolean keepOldComments = false;
private Boolean keepOldComments;

@Parameter(property = "shouldSetWip", required = false)
private final Boolean shouldSetWip = false;
private Boolean shouldSetWip;

@Override
public void execute() throws MojoExecutionException {
Expand All @@ -72,6 +75,11 @@ public void execute() throws MojoExecutionException {
return;
}

if (violations == null || violations.isEmpty()) {
getLog().info("No violations configured.");
return;
}

getLog()
.info(
"Will comment project " + projectId + " and MR " + mergeRequestId + " on " + gitLabUrl);
Expand Down

0 comments on commit 352216f

Please sign in to comment.