Skip to content

Commit

Permalink
refactor: Operator wrapping on end of line
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek and TeamModerne committed Sep 21, 2024
1 parent c1fea73 commit 047fca9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public void execute() throws MojoExecutionException, MojoFailureException {
// If the plugin is configured to run over all projects (at the end of the build) only proceed if the plugin
// is being run on the last project.
if (!runPerSubmodule && !allProjectsMarked()) {
getLog().info("REWRITE: Delaying execution to the end of multi-module project for "
+ project.getGroupId() + ":"
+ project.getArtifactId()+ ":"
+ project.getVersion());
getLog().info("REWRITE: Delaying execution to the end of multi-module project for " +
project.getGroupId() + ":" +
project.getArtifactId()+ ":" +
project.getVersion());
return;
}

Expand Down
14 changes: 7 additions & 7 deletions src/main/java/org/openrewrite/maven/AbstractRewriteRunMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ public void execute() throws MojoExecutionException, MojoFailureException {
// If the plugin is configured to run over all projects (at the end of the build) only proceed if the plugin
// is being run on the last project.
if (!runPerSubmodule && !allProjectsMarked()) {
getLog().info("REWRITE: Delaying execution to the end of multi-module project for "
+ project.getGroupId() + ":"
+ project.getArtifactId()+ ":"
+ project.getVersion());
getLog().info("REWRITE: Delaying execution to the end of multi-module project for " +
project.getGroupId() + ":" +
project.getArtifactId()+ ":" +
project.getVersion());
return;
}

Expand Down Expand Up @@ -131,9 +131,9 @@ public void execute() throws MojoExecutionException, MojoFailureException {
Path afterLocation = results.getProjectRoot().resolve(result.getAfter().getSourcePath());
File afterParentDir = afterLocation.toFile().getParentFile();
// Rename the directory if its name case has been changed, e.g. camel case to lower case.
if (afterParentDir.exists()
&& afterParentDir.getAbsolutePath().equalsIgnoreCase((originalParentDir.getAbsolutePath()))
&& !afterParentDir.getAbsolutePath().equals(originalParentDir.getAbsolutePath())) {
if (afterParentDir.exists() &&
afterParentDir.getAbsolutePath().equalsIgnoreCase((originalParentDir.getAbsolutePath())) &&
!afterParentDir.getAbsolutePath().equals(originalParentDir.getAbsolutePath())) {
if (!originalParentDir.renameTo(afterParentDir)) {
throw new RuntimeException("Unable to rename directory from " + originalParentDir.getAbsolutePath() + " To: " + afterParentDir.getAbsolutePath());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
@SuppressWarnings("FieldMayBeFinal")
public abstract class ConfigurableRewriteMojo extends AbstractMojo {

private static final String CHECKSTYLE_DOCTYPE = "module PUBLIC "
+ "\"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN\" "
+ "\"https://checkstyle.org/dtds/configuration_1_3.dtd\"";
private static final String CHECKSTYLE_DOCTYPE = "module PUBLIC " +
"\"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN\" " +
"\"https://checkstyle.org/dtds/configuration_1_3.dtd\"";

@Parameter(property = "rewrite.configLocation", alias = "configLocation", defaultValue = "${maven.multiModuleProjectDirectory}/rewrite.yml")
protected String configLocation;
Expand Down

0 comments on commit 047fca9

Please sign in to comment.