Skip to content

Commit b10aaa7

Browse files
Added checkstyle
1 parent c954a3b commit b10aaa7

File tree

52 files changed

+805
-596
lines changed

Some content is hidden

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

52 files changed

+805
-596
lines changed

.editorconfig

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = tab
8+
indent_size = 4
9+
end_of_line = lf
10+
insert_final_newline = true
11+
12+
[*.yml]
13+
indent_style = space
14+
indent_size = 2

.settings.xml

+65-63
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,68 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<settings>
3-
<servers>
4-
<server>
5-
<id>repo.spring.io</id>
6-
<username>${env.CI_DEPLOY_USERNAME}</username>
7-
<password>${env.CI_DEPLOY_PASSWORD}</password>
8-
</server>
9-
</servers>
10-
<profiles>
11-
<profile>
12-
<!--
13-
N.B. this profile is only here to support users and IDEs that do not use Maven 3.3.
14-
It isn't needed on the command line if you use the wrapper script (mvnw) or if you use
15-
a native Maven with the right version. Eclipse users should points their Maven tooling to
16-
this settings file, or copy the profile into their ~/.m2/settings.xml.
17-
-->
18-
<id>spring</id>
19-
<activation><activeByDefault>true</activeByDefault></activation>
20-
<repositories>
21-
<repository>
22-
<id>spring-snapshots</id>
23-
<name>Spring Snapshots</name>
24-
<url>http://repo.spring.io/libs-snapshot-local</url>
25-
<snapshots>
26-
<enabled>true</enabled>
27-
</snapshots>
28-
</repository>
29-
<repository>
30-
<id>spring-milestones</id>
31-
<name>Spring Milestones</name>
32-
<url>http://repo.spring.io/libs-milestone-local</url>
33-
<snapshots>
34-
<enabled>false</enabled>
35-
</snapshots>
36-
</repository>
37-
<repository>
38-
<id>spring-releases</id>
39-
<name>Spring Releases</name>
40-
<url>http://repo.spring.io/release</url>
41-
<snapshots>
42-
<enabled>false</enabled>
43-
</snapshots>
44-
</repository>
45-
</repositories>
46-
<pluginRepositories>
47-
<pluginRepository>
48-
<id>spring-snapshots</id>
49-
<name>Spring Snapshots</name>
50-
<url>http://repo.spring.io/libs-snapshot-local</url>
51-
<snapshots>
52-
<enabled>true</enabled>
53-
</snapshots>
54-
</pluginRepository>
55-
<pluginRepository>
56-
<id>spring-milestones</id>
57-
<name>Spring Milestones</name>
58-
<url>http://repo.spring.io/libs-milestone-local</url>
59-
<snapshots>
60-
<enabled>false</enabled>
61-
</snapshots>
62-
</pluginRepository>
63-
</pluginRepositories>
64-
</profile>
65-
</profiles>
3+
<servers>
4+
<server>
5+
<id>repo.spring.io</id>
6+
<username>${env.CI_DEPLOY_USERNAME}</username>
7+
<password>${env.CI_DEPLOY_PASSWORD}</password>
8+
</server>
9+
</servers>
10+
<profiles>
11+
<profile>
12+
<!--
13+
N.B. this profile is only here to support users and IDEs that do not use Maven 3.3.
14+
It isn't needed on the command line if you use the wrapper script (mvnw) or if you use
15+
a native Maven with the right version. Eclipse users should points their Maven tooling to
16+
this settings file, or copy the profile into their ~/.m2/settings.xml.
17+
-->
18+
<id>spring</id>
19+
<activation>
20+
<activeByDefault>true</activeByDefault>
21+
</activation>
22+
<repositories>
23+
<repository>
24+
<id>spring-snapshots</id>
25+
<name>Spring Snapshots</name>
26+
<url>http://repo.spring.io/libs-snapshot-local</url>
27+
<snapshots>
28+
<enabled>true</enabled>
29+
</snapshots>
30+
</repository>
31+
<repository>
32+
<id>spring-milestones</id>
33+
<name>Spring Milestones</name>
34+
<url>http://repo.spring.io/libs-milestone-local</url>
35+
<snapshots>
36+
<enabled>false</enabled>
37+
</snapshots>
38+
</repository>
39+
<repository>
40+
<id>spring-releases</id>
41+
<name>Spring Releases</name>
42+
<url>http://repo.spring.io/release</url>
43+
<snapshots>
44+
<enabled>false</enabled>
45+
</snapshots>
46+
</repository>
47+
</repositories>
48+
<pluginRepositories>
49+
<pluginRepository>
50+
<id>spring-snapshots</id>
51+
<name>Spring Snapshots</name>
52+
<url>http://repo.spring.io/libs-snapshot-local</url>
53+
<snapshots>
54+
<enabled>true</enabled>
55+
</snapshots>
56+
</pluginRepository>
57+
<pluginRepository>
58+
<id>spring-milestones</id>
59+
<name>Spring Milestones</name>
60+
<url>http://repo.spring.io/libs-milestone-local</url>
61+
<snapshots>
62+
<enabled>false</enabled>
63+
</snapshots>
64+
</pluginRepository>
65+
</pluginRepositories>
66+
</profile>
67+
</profiles>
6668
</settings>

.springformat

Whitespace-only changes.

Guardfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ require './src/main/ruby/readme.rb'
55
options = {:mkdirs => true, :safe => :unsafe, :attributes => ['linkcss', 'allow-uri-read']}
66

77
guard 'shell' do
8-
watch(/^src\/[A-Z-a-z][^#]*\.adoc$/) {|m|
9-
SpringCloud::Build.render_file('src/main/asciidoc/README.adoc', :to_file => './README.adoc')
10-
Asciidoctor.render_file('src/main/asciidoc/spring-cloud-bus.adoc', options.merge(:to_dir => 'target/generated-docs'))
11-
}
8+
watch(/^src\/[A-Z-a-z][^#]*\.adoc$/) {|m|
9+
SpringCloud::Build.render_file('src/main/asciidoc/README.adoc', :to_file => './README.adoc')
10+
Asciidoctor.render_file('src/main/asciidoc/spring-cloud-bus.adoc', options.merge(:to_dir => 'target/generated-docs'))
11+
}
1212
end

docs/pom.xml

+34-32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35
<modelVersion>4.0.0</modelVersion>
46
<groupId>org.springframework.cloud</groupId>
57
<artifactId>spring-cloud-bus-docs</artifactId>
@@ -16,46 +18,46 @@
1618
<main.basedir>${basedir}/..</main.basedir>
1719
<docs.whitelisted.branches>1.1.x,1.2.x,1.3.x</docs.whitelisted.branches>
1820
</properties>
19-
<build>
21+
<build>
2022
<plugins>
2123
<plugin>
22-
<!--skip deploy (this is just a test module) -->
23-
<artifactId>maven-deploy-plugin</artifactId>
24-
<configuration>
25-
<skip>true</skip>
26-
</configuration>
24+
<!--skip deploy (this is just a test module) -->
25+
<artifactId>maven-deploy-plugin</artifactId>
26+
<configuration>
27+
<skip>true</skip>
28+
</configuration>
2729
</plugin>
2830
</plugins>
2931
</build>
3032
<profiles>
3133
<profile>
3234
<id>docs</id>
3335
<build>
34-
<plugins>
35-
<plugin>
36-
<groupId>org.apache.maven.plugins</groupId>
37-
<artifactId>maven-dependency-plugin</artifactId>
38-
</plugin>
39-
<plugin>
40-
<groupId>org.asciidoctor</groupId>
41-
<artifactId>asciidoctor-maven-plugin</artifactId>
42-
<inherited>false</inherited>
43-
</plugin>
44-
<plugin>
45-
<groupId>com.agilejava.docbkx</groupId>
46-
<artifactId>docbkx-maven-plugin</artifactId>
47-
</plugin>
48-
<plugin>
49-
<groupId>org.apache.maven.plugins</groupId>
50-
<artifactId>maven-antrun-plugin</artifactId>
51-
<inherited>false</inherited>
52-
</plugin>
53-
<plugin>
54-
<groupId>org.codehaus.mojo</groupId>
55-
<artifactId>build-helper-maven-plugin</artifactId>
56-
<inherited>false</inherited>
57-
</plugin>
58-
</plugins>
36+
<plugins>
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-dependency-plugin</artifactId>
40+
</plugin>
41+
<plugin>
42+
<groupId>org.asciidoctor</groupId>
43+
<artifactId>asciidoctor-maven-plugin</artifactId>
44+
<inherited>false</inherited>
45+
</plugin>
46+
<plugin>
47+
<groupId>com.agilejava.docbkx</groupId>
48+
<artifactId>docbkx-maven-plugin</artifactId>
49+
</plugin>
50+
<plugin>
51+
<groupId>org.apache.maven.plugins</groupId>
52+
<artifactId>maven-antrun-plugin</artifactId>
53+
<inherited>false</inherited>
54+
</plugin>
55+
<plugin>
56+
<groupId>org.codehaus.mojo</groupId>
57+
<artifactId>build-helper-maven-plugin</artifactId>
58+
<inherited>false</inherited>
59+
</plugin>
60+
</plugins>
5961
</build>
6062
</profile>
6163
</profiles>

pom.xml

+27-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
34
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
45
<modelVersion>4.0.0</modelVersion>
56

@@ -30,6 +31,9 @@
3031
<spring-cloud-commons.version>2.1.1.BUILD-SNAPSHOT</spring-cloud-commons.version>
3132
<spring-cloud-stream.version>Fishtown.BUILD-SNAPSHOT</spring-cloud-stream.version>
3233
<bintray.package>bus</bintray.package>
34+
<maven-checkstyle-plugin.failsOnError>true</maven-checkstyle-plugin.failsOnError>
35+
<maven-checkstyle-plugin.failsOnViolation>true
36+
</maven-checkstyle-plugin.failsOnViolation>
3337
</properties>
3438

3539
<build>
@@ -43,9 +47,26 @@
4347
<target>1.8</target>
4448
</configuration>
4549
</plugin>
50+
<plugin>
51+
<groupId>org.apache.maven.plugins</groupId>
52+
<artifactId>maven-checkstyle-plugin</artifactId>
53+
</plugin>
54+
<plugin>
55+
<groupId>io.spring.javaformat</groupId>
56+
<artifactId>spring-javaformat-maven-plugin</artifactId>
57+
</plugin>
4658
</plugins>
4759
</build>
4860

61+
<reporting>
62+
<plugins>
63+
<plugin>
64+
<groupId>org.apache.maven.plugins</groupId>
65+
<artifactId>maven-checkstyle-plugin</artifactId>
66+
</plugin>
67+
</plugins>
68+
</reporting>
69+
4970
<profiles>
5071
<profile>
5172
<id>spring</id>
@@ -142,8 +163,11 @@
142163

143164
<scm>
144165
<url>https://github.com/spring-cloud/spring-cloud-bus</url>
145-
<connection>scm:git:git://github.com/spring-cloud/spring-cloud-bus.git</connection>
146-
<developerConnection>scm:git:ssh://[email protected]/spring-cloud/spring-cloud-bus.git</developerConnection>
166+
<connection>scm:git:git://github.com/spring-cloud/spring-cloud-bus.git
167+
</connection>
168+
<developerConnection>
169+
scm:git:ssh://[email protected]/spring-cloud/spring-cloud-bus.git
170+
</developerConnection>
147171
<tag>HEAD</tag>
148172
</scm>
149173

spring-cloud-bus-dependencies/pom.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
34
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
45
<modelVersion>4.0.0</modelVersion>
56
<parent>
67
<artifactId>spring-cloud-dependencies-parent</artifactId>
78
<groupId>org.springframework.cloud</groupId>
89
<version>2.1.3.BUILD-SNAPSHOT</version>
9-
<relativePath/>
10+
<relativePath/>
1011
</parent>
1112
<artifactId>spring-cloud-bus-dependencies</artifactId>
1213
<version>2.1.1.BUILD-SNAPSHOT</version>

spring-cloud-bus-tests/pom.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
45
<modelVersion>4.0.0</modelVersion>
56

67
<artifactId>spring-cloud-bus-tests</artifactId>

spring-cloud-bus-tests/src/test/java/org/springframework/cloud/bus/BusJmxEndpointTests.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import org.junit.Test;
44
import org.junit.runner.RunWith;
5+
56
import org.springframework.beans.factory.annotation.Autowired;
67
import org.springframework.boot.SpringBootConfiguration;
78
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@@ -13,7 +14,8 @@
1314
import static org.assertj.core.api.Assertions.assertThat;
1415

1516
@RunWith(SpringRunner.class)
16-
@SpringBootTest(properties = { "spring.jmx.enabled=true", "endpoints.default.jmx.enabled=true" })
17+
@SpringBootTest(properties = { "spring.jmx.enabled=true",
18+
"endpoints.default.jmx.enabled=true" })
1719
public class BusJmxEndpointTests {
1820

1921
@Autowired(required = false)
@@ -30,5 +32,8 @@ public void contextLoads() {
3032

3133
@SpringBootConfiguration
3234
@EnableAutoConfiguration
33-
protected static class TestConfig {}
35+
protected static class TestConfig {
36+
37+
}
38+
3439
}

0 commit comments

Comments
 (0)