Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Spotless plugin - automatic code formatting #845

Merged
merged 2 commits into from
Dec 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down Expand Up @@ -108,8 +107,8 @@
<scm>
<connection>scm:git:https://github.com/mojohaus/versions.git</connection>
<developerConnection>scm:git:ssh://[email protected]/mojohaus/versions.git</developerConnection>
<url>https://github.com/mojohaus/versions/tree/master</url>
<tag>HEAD</tag>
<url>https://github.com/mojohaus/versions/tree/master</url>
</scm>

<issueManagement>
Expand All @@ -133,7 +132,8 @@
<sitePluginVersion>3.7</sitePluginVersion>
<modelloNamespaceRuleVersion>2.1.0</modelloNamespaceRuleVersion>
<modelloNamespaceReportVersion>2.0.0</modelloNamespaceReportVersion>
<scmpublish.content>${project.build.directory}/staging</scmpublish.content><!-- mono-module doesn't require site:stage for scm-publish -->
<scmpublish.content>${project.build.directory}/staging</scmpublish.content>
<!-- mono-module doesn't require site:stage for scm-publish -->
<project.build.outputTimestamp>2022-10-23T15:41:47Z</project.build.outputTimestamp>
<sisu-maven-plugin-version>0.9.0.M1</sisu-maven-plugin-version>
</properties>
Expand Down Expand Up @@ -213,20 +213,27 @@
<build>

<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${checkstyle.spotless.config}</configLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<executions>
<execution>
<id>check-java18</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
<phase>test</phase>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
Expand All @@ -244,11 +251,11 @@
<executions>
<execution>
<id>default-site</id>
<phase>site</phase>
<goals>
<goal>site</goal>
<goal>stage</goal>
</goals>
<phase>site</phase>
</execution>
</executions>
</plugin>
Expand All @@ -263,7 +270,7 @@
<artifactId>maven-plugin-report-plugin</artifactId>
<reportSets>
<reportSet>
<reports/>
<reports />
</reportSet>
</reportSets>
</plugin>
Expand Down
4 changes: 1 addition & 3 deletions versions-api/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
* @author Slawomir Jaranowski
* @since 2.14.0
*/
public interface VersionChange
{
public interface VersionChange {
/**
* @return a groupId of changed item
* @since 2.14.0
Expand All @@ -48,5 +47,4 @@ public interface VersionChange
* @since 2.14.0
*/
String getNewVersion();

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,25 @@
* @author Slawomir Jaranowski
* @since 2.14.0
*/
public interface ChangeRecord
{
public interface ChangeRecord {
/**
* Describe where version item is updated.
*/
enum ChangeKind
{
DEPENDENCY( "dependency-update" ),
DEPENDENCY_MANAGEMENT( "dependency-management-update" ),
PARENT( "parent-update" ),
PLUGIN( "plugin-update" ),
PLUGIN_MANAGEMENT( "plugin-management-update" ),
PROPERTY( "property-update" );
enum ChangeKind {
DEPENDENCY("dependency-update"),
DEPENDENCY_MANAGEMENT("dependency-management-update"),
PARENT("parent-update"),
PLUGIN("plugin-update"),
PLUGIN_MANAGEMENT("plugin-management-update"),
PROPERTY("property-update");

private final String label;

ChangeKind( String label )
{
ChangeKind(String label) {
this.label = label;
}

public String getLabel()
{
public String getLabel() {
return label;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@
* @author Slawomir Jaranowski
* @since 2.14.0
*/
public interface ChangeRecorder
{
public interface ChangeRecorder {
/**
* Record that a dependency was updated.
*
* @param changeRecord a record described change
* @since 2.14.0
*/
void recordChange( ChangeRecord changeRecord );
void recordChange(ChangeRecord changeRecord);

/**
* Write the current set of changes to the given output path.
Expand All @@ -48,5 +47,5 @@ public interface ChangeRecorder
* @throws IOException On write and/or I/O errors
* @since 2.14.0
*/
void writeReport( Path outputPath ) throws IOException;
void writeReport(Path outputPath) throws IOException;
}
Loading