mirror of https://github.com/apache/jclouds.git
JCLOUDS-1497: Fix checkstyle-suppressions for jcloud-labs (#27)
* Fix NoWhitespaceBefore Checkstyle Violation * checkstyle updates: remove suppressionsfilter from checkstyle.xml * suppressions now done in maven-checkstyle-plugin
This commit is contained in:
parent
f1d4f900bf
commit
92a3c68838
|
@ -54,7 +54,7 @@ public class LimitApiTest extends BaseCloudStackApiTest<LimitApi> {
|
||||||
|
|
||||||
public void testListResourceLimitsOptions() throws SecurityException, NoSuchMethodException, IOException {
|
public void testListResourceLimitsOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Invokable<?, ?> method = method(LimitApi.class, "listResourceLimits", ListResourceLimitsOptions[].class);
|
Invokable<?, ?> method = method(LimitApi.class, "listResourceLimits", ListResourceLimitsOptions[].class);
|
||||||
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(ListResourceLimitsOptions.Builder.account("jclouds" , "23")));
|
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(ListResourceLimitsOptions.Builder.account("jclouds", "23")));
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
assertRequestLineEquals(httpRequest,
|
||||||
"GET http://localhost:8080/client/api?response=json&command=listResourceLimits&listAll=true&account=jclouds&domainid=23 HTTP/1.1");
|
"GET http://localhost:8080/client/api?response=json&command=listResourceLimits&listAll=true&account=jclouds&domainid=23 HTTP/1.1");
|
||||||
|
|
|
@ -209,7 +209,7 @@ public class SecurityGroupApiTest extends BaseCloudStackApiTest<SecurityGroupApi
|
||||||
.addQueryParam("cidrlist", "1.1.1.1/24,1.2.2.2/16").build();
|
.addQueryParam("cidrlist", "1.1.1.1/24,1.2.2.2/16").build();
|
||||||
|
|
||||||
public void testAuthorizeIngressICMPToCIDRs() throws SecurityException, NoSuchMethodException, IOException {
|
public void testAuthorizeIngressICMPToCIDRs() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Invokable<?, ?> method = method(SecurityGroupApi.class, "authorizeIngressICMPToCIDRs", String.class , int.class,
|
Invokable<?, ?> method = method(SecurityGroupApi.class, "authorizeIngressICMPToCIDRs", String.class, int.class,
|
||||||
int.class, Iterable.class, AccountInDomainOptions[].class);
|
int.class, Iterable.class, AccountInDomainOptions[].class);
|
||||||
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(2, 22, 22, ImmutableSet.of("1.1.1.1/24", "1.2.2.2/16")));
|
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(2, 22, 22, ImmutableSet.of("1.1.1.1/24", "1.2.2.2/16")));
|
||||||
|
|
||||||
|
|
|
@ -72,9 +72,8 @@ public class RunInstancesResponseHandlerTest extends BaseEC2HandlerTest {
|
||||||
.imageId("ami-60a54009").instanceId("i-2be64332").instanceState(InstanceState.PENDING).rawState(
|
.imageId("ami-60a54009").instanceId("i-2be64332").instanceState(InstanceState.PENDING).rawState(
|
||||||
"pending").instanceType(InstanceType.M1_SMALL).keyName("example-key-name").launchTime(
|
"pending").instanceType(InstanceType.M1_SMALL).keyName("example-key-name").launchTime(
|
||||||
dateService.iso8601DateParse("2007-08-07T11:51:50.000Z"))// MonitoringState.ENABLED,
|
dateService.iso8601DateParse("2007-08-07T11:51:50.000Z"))// MonitoringState.ENABLED,
|
||||||
.availabilityZone("us-east-1b").build())
|
.availabilityZone("us-east-1b").build()),
|
||||||
|
"AIDADH4IGTRXXKCD", null, "r-47a5402e");
|
||||||
, "AIDADH4IGTRXXKCD", null, "r-47a5402e");
|
|
||||||
|
|
||||||
RunInstancesResponseHandler handler = injector.getInstance(RunInstancesResponseHandler.class);
|
RunInstancesResponseHandler handler = injector.getInstance(RunInstancesResponseHandler.class);
|
||||||
addDefaultRegionToHandler(handler);
|
addDefaultRegionToHandler(handler);
|
||||||
|
@ -93,8 +92,8 @@ public class RunInstancesResponseHandlerTest extends BaseEC2HandlerTest {
|
||||||
.imageId("qmi-9ac92558").instanceId("i-01b0dac3").instanceState(InstanceState.PENDING).rawState(
|
.imageId("qmi-9ac92558").instanceId("i-01b0dac3").instanceState(InstanceState.PENDING).rawState(
|
||||||
"pending").instanceType(InstanceType.M1_SMALL).keyName("jclouds#greenqloud-computeblock#35")
|
"pending").instanceType(InstanceType.M1_SMALL).keyName("jclouds#greenqloud-computeblock#35")
|
||||||
.launchTime(dateService.iso8601DateParse("2012-06-15T19:06:35.000+00:00"))
|
.launchTime(dateService.iso8601DateParse("2012-06-15T19:06:35.000+00:00"))
|
||||||
.rootDeviceType(RootDeviceType.EBS).availabilityZone("is-1a").build())
|
.rootDeviceType(RootDeviceType.EBS).availabilityZone("is-1a").build()),
|
||||||
, "56eeacd9-c790-45c3-85f3-e4380b55e1d8<", null, "r-f847a6ca");
|
"56eeacd9-c790-45c3-85f3-e4380b55e1d8<", null, "r-f847a6ca");
|
||||||
|
|
||||||
RunInstancesResponseHandler handler = injector.getInstance(RunInstancesResponseHandler.class);
|
RunInstancesResponseHandler handler = injector.getInstance(RunInstancesResponseHandler.class);
|
||||||
addDefaultRegionToHandler(handler);
|
addDefaultRegionToHandler(handler);
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class AvailabilityZone {
|
||||||
private final String name;
|
private final String name;
|
||||||
private final ZoneState state;
|
private final ZoneState state;
|
||||||
|
|
||||||
@ConstructorProperties({"zoneName" , "zoneState"})
|
@ConstructorProperties({"zoneName", "zoneState"})
|
||||||
protected AvailabilityZone(String name, ZoneState state) {
|
protected AvailabilityZone(String name, ZoneState state) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.state = state;
|
this.state = state;
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class AvailabilityZoneDetails {
|
||||||
private final ZoneState state;
|
private final ZoneState state;
|
||||||
private final Map<String, Map<String, HostService>> hosts;
|
private final Map<String, Map<String, HostService>> hosts;
|
||||||
|
|
||||||
@ConstructorProperties({"zoneName" , "zoneState", "hosts"})
|
@ConstructorProperties({"zoneName", "zoneState", "hosts"})
|
||||||
protected AvailabilityZoneDetails(String name, ZoneState state, Map<String, Map<String, HostService>> hosts) {
|
protected AvailabilityZoneDetails(String name, ZoneState state, Map<String, Map<String, HostService>> hosts) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.state = state;
|
this.state = state;
|
||||||
|
|
|
@ -31,7 +31,7 @@ public abstract class Hypervisor {
|
||||||
@Nullable
|
@Nullable
|
||||||
public abstract String getName();
|
public abstract String getName();
|
||||||
|
|
||||||
@SerializedNames({"id" , "hypervisor_hostname"})
|
@SerializedNames({"id", "hypervisor_hostname"})
|
||||||
private static Hypervisor create(String id, String name) {
|
private static Hypervisor create(String id, String name) {
|
||||||
return new AutoValue_Hypervisor(id, name);
|
return new AutoValue_Hypervisor(id, name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class AvailabilityZone {
|
||||||
private final String name;
|
private final String name;
|
||||||
private final ZoneState state;
|
private final ZoneState state;
|
||||||
|
|
||||||
@ConstructorProperties({"zoneName" , "zoneState"})
|
@ConstructorProperties({"zoneName", "zoneState"})
|
||||||
protected AvailabilityZone(String name, ZoneState state) {
|
protected AvailabilityZone(String name, ZoneState state) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.state = state;
|
this.state = state;
|
||||||
|
|
|
@ -48,8 +48,8 @@ public class TempAuthMockTest {
|
||||||
final String headerName = "X-Auth-User";
|
final String headerName = "X-Auth-User";
|
||||||
final String headerPass = "X-Auth-Pass";
|
final String headerPass = "X-Auth-Pass";
|
||||||
Properties overrides = new Properties();
|
Properties overrides = new Properties();
|
||||||
overrides.setProperty(TempAuthHeaders.TEMP_AUTH_HEADER_USER , headerName);
|
overrides.setProperty(TempAuthHeaders.TEMP_AUTH_HEADER_USER, headerName);
|
||||||
overrides.setProperty(TempAuthHeaders.TEMP_AUTH_HEADER_PASS , headerPass);
|
overrides.setProperty(TempAuthHeaders.TEMP_AUTH_HEADER_PASS, headerPass);
|
||||||
// with specific Header Name values
|
// with specific Header Name values
|
||||||
test(overrides, headerName, headerPass);
|
test(overrides, headerName, headerPass);
|
||||||
}
|
}
|
||||||
|
|
|
@ -785,7 +785,7 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
<version>2.15</version>
|
<version>3.0.0</version>
|
||||||
<!-- configuration and dependencies set via profiles -->
|
<!-- configuration and dependencies set via profiles -->
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
@ -1142,6 +1142,8 @@
|
||||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<configLocation>../resources/checkstyle.xml</configLocation>
|
<configLocation>../resources/checkstyle.xml</configLocation>
|
||||||
|
<suppressionsLocation>../resources/checkstyle-suppressions.xml</suppressionsLocation>
|
||||||
|
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
|
||||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||||
<failOnViolation>true</failOnViolation>
|
<failOnViolation>true</failOnViolation>
|
||||||
<failsOnError>true</failsOnError>
|
<failsOnError>true</failsOnError>
|
||||||
|
@ -1328,6 +1330,8 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- jclouds-resources has the checkstyle config in the classpath -->
|
<!-- jclouds-resources has the checkstyle config in the classpath -->
|
||||||
<configLocation>resources/checkstyle.xml</configLocation>
|
<configLocation>resources/checkstyle.xml</configLocation>
|
||||||
|
<suppressionsLocation>resources/checkstyle-suppressions.xml</suppressionsLocation>
|
||||||
|
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
|
||||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||||
<failOnViolation>true</failOnViolation>
|
<failOnViolation>true</failOnViolation>
|
||||||
<failsOnError>true</failsOnError>
|
<failsOnError>true</failsOnError>
|
||||||
|
|
|
@ -67,7 +67,7 @@ public abstract class DeploymentTemplate {
|
||||||
@Nullable
|
@Nullable
|
||||||
public abstract List<?> outputs();
|
public abstract List<?> outputs();
|
||||||
|
|
||||||
@SerializedNames({"$schema", "contentVersion", "parameters", "variables", "resources" , "outputs"})
|
@SerializedNames({"$schema", "contentVersion", "parameters", "variables", "resources", "outputs"})
|
||||||
public static DeploymentTemplate create(final String schema,
|
public static DeploymentTemplate create(final String schema,
|
||||||
final String contentVersion,
|
final String contentVersion,
|
||||||
final TemplateParameters parameters,
|
final TemplateParameters parameters,
|
||||||
|
|
|
@ -44,8 +44,8 @@ public class CloudBlockStorageUKProviderMetadataExpectTest extends BaseCinderApi
|
||||||
.endpoint("https://lon.identity.api.rackspacecloud.com/v2.0/tokens")
|
.endpoint("https://lon.identity.api.rackspacecloud.com/v2.0/tokens")
|
||||||
.addHeader("Accept", "application/json")
|
.addHeader("Accept", "application/json")
|
||||||
.payload(payloadFromStringWithContentType(
|
.payload(payloadFromStringWithContentType(
|
||||||
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}"
|
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}",
|
||||||
, "application/json")).build();
|
"application/json")).build();
|
||||||
|
|
||||||
|
|
||||||
HttpResponse authenticationResponse = HttpResponse.builder()
|
HttpResponse authenticationResponse = HttpResponse.builder()
|
||||||
|
|
|
@ -44,8 +44,8 @@ public class CloudBlockStorageUSProviderMetadataExpectTest extends BaseCinderApi
|
||||||
.endpoint("https://identity.api.rackspacecloud.com/v2.0/tokens")
|
.endpoint("https://identity.api.rackspacecloud.com/v2.0/tokens")
|
||||||
.addHeader("Accept", "application/json")
|
.addHeader("Accept", "application/json")
|
||||||
.payload(payloadFromStringWithContentType(
|
.payload(payloadFromStringWithContentType(
|
||||||
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}"
|
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}",
|
||||||
, "application/json")).build();
|
"application/json")).build();
|
||||||
|
|
||||||
|
|
||||||
HttpResponse authenticationResponse = HttpResponse.builder()
|
HttpResponse authenticationResponse = HttpResponse.builder()
|
||||||
|
|
|
@ -44,8 +44,8 @@ public class CloudDatabasesUKProviderMetadataExpectTest extends BaseTroveApiExpe
|
||||||
.endpoint("https://lon.identity.api.rackspacecloud.com/v2.0/tokens")
|
.endpoint("https://lon.identity.api.rackspacecloud.com/v2.0/tokens")
|
||||||
.addHeader("Accept", "application/json")
|
.addHeader("Accept", "application/json")
|
||||||
.payload(payloadFromStringWithContentType(
|
.payload(payloadFromStringWithContentType(
|
||||||
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}"
|
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}",
|
||||||
, "application/json")).build();
|
"application/json")).build();
|
||||||
|
|
||||||
|
|
||||||
HttpResponse authenticationResponse = HttpResponse.builder()
|
HttpResponse authenticationResponse = HttpResponse.builder()
|
||||||
|
|
|
@ -44,8 +44,8 @@ public class CloudDatabasesUSProviderMetadataExpectTest extends BaseTroveApiExpe
|
||||||
.endpoint("https://identity.api.rackspacecloud.com/v2.0/tokens")
|
.endpoint("https://identity.api.rackspacecloud.com/v2.0/tokens")
|
||||||
.addHeader("Accept", "application/json")
|
.addHeader("Accept", "application/json")
|
||||||
.payload(payloadFromStringWithContentType(
|
.payload(payloadFromStringWithContentType(
|
||||||
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}"
|
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}",
|
||||||
, "application/json")).build();
|
"application/json")).build();
|
||||||
|
|
||||||
|
|
||||||
HttpResponse authenticationResponse = HttpResponse.builder()
|
HttpResponse authenticationResponse = HttpResponse.builder()
|
||||||
|
|
|
@ -44,8 +44,8 @@ public class CloudServersUKProviderMetadataExpectTest extends BaseNovaApiExpectT
|
||||||
.endpoint("https://lon.identity.api.rackspacecloud.com/v2.0/tokens")
|
.endpoint("https://lon.identity.api.rackspacecloud.com/v2.0/tokens")
|
||||||
.addHeader("Accept", "application/json")
|
.addHeader("Accept", "application/json")
|
||||||
.payload(payloadFromStringWithContentType(
|
.payload(payloadFromStringWithContentType(
|
||||||
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}"
|
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}",
|
||||||
, "application/json")).build();
|
"application/json")).build();
|
||||||
|
|
||||||
|
|
||||||
HttpResponse authenticationResponse = HttpResponse.builder().statusCode(200)
|
HttpResponse authenticationResponse = HttpResponse.builder().statusCode(200)
|
||||||
|
|
|
@ -44,8 +44,8 @@ public class CloudServersUSProviderMetadataExpectTest extends BaseNovaApiExpectT
|
||||||
.endpoint("https://identity.api.rackspacecloud.com/v2.0/tokens")
|
.endpoint("https://identity.api.rackspacecloud.com/v2.0/tokens")
|
||||||
.addHeader("Accept", "application/json")
|
.addHeader("Accept", "application/json")
|
||||||
.payload(payloadFromStringWithContentType(
|
.payload(payloadFromStringWithContentType(
|
||||||
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}"
|
"{\"auth\":{\"RAX-KSKEY:apiKeyCredentials\":{\"username\":\"myUsername\",\"apiKey\":\"myApiKey\"}}}",
|
||||||
, "application/json")).build();
|
"application/json")).build();
|
||||||
|
|
||||||
|
|
||||||
HttpResponse authenticationResponse = HttpResponse.builder().statusCode(200)
|
HttpResponse authenticationResponse = HttpResponse.builder().statusCode(200)
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
</module>
|
</module>
|
||||||
<module name="NoWhitespaceBefore"/>
|
<module name="NoWhitespaceBefore"/>
|
||||||
<module name="RedundantImport"/>
|
<module name="RedundantImport"/>
|
||||||
<module name="RedundantModifier"/>
|
<!-- <module name="RedundantModifier"/> -->
|
||||||
<module name="SimplifyBooleanExpression"/>
|
<module name="SimplifyBooleanExpression"/>
|
||||||
<module name="TypeName"/>
|
<module name="TypeName"/>
|
||||||
<module name="UnnecessaryParentheses"/>
|
<module name="UnnecessaryParentheses"/>
|
||||||
|
@ -97,8 +97,4 @@
|
||||||
<property name="message" value="Do not use Windows line endings"/>
|
<property name="message" value="Do not use Windows line endings"/>
|
||||||
<property name="fileExtensions" value="java,xml,json"/>
|
<property name="fileExtensions" value="java,xml,json"/>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
<module name="SuppressionFilter">
|
|
||||||
<property name="file" value="resources/checkstyle-suppressions.xml"/>
|
|
||||||
</module>
|
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
<directory>${project.basedir}</directory>
|
<directory>${project.basedir}</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>checkstyle.xml</include>
|
<include>checkstyle.xml</include>
|
||||||
|
<include>checkstyle-suppressions.xml</include>
|
||||||
<include>modernizer_exclusions.txt</include>
|
<include>modernizer_exclusions.txt</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
|
|
Loading…
Reference in New Issue