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

Commit

Permalink
Update checkstyle plugin and licenses (#194)
Browse files Browse the repository at this point in the history
* Update checkstyle and license

* Revert license to Hazelcast Community

* Revert license to Hazelcast Community
  • Loading branch information
Rafał Leszko authored Aug 5, 2020
1 parent 965c60b commit 155fb76
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 25 deletions.
2 changes: 1 addition & 1 deletion checkstyle/ClassHeader.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
*/
23 changes: 14 additions & 9 deletions checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
</module>

<!-- Enable suppression of file contents using //CHECKSTYLE:[ON|OFF] comments -->
<!--
<module name="SuppressionCommentFilter"/>
-->

<!-- Enable the suppression annotation @SuppressWarnings("checkstyle:lowercasecheckname"} -->
<module name="SuppressWarningsFilter"/>
Expand Down Expand Up @@ -103,10 +105,11 @@
<property name="fileExtensions" value="java"/>
</module>

<module name="TreeWalker">
<!-- Activate comment suppression filters -->
<module name="FileContentsHolder"/>
<module name="LineLength">
<property name="max" value="130"/>
</module>

<module name="TreeWalker">
<!-- Needed for SuppressWarningsFilter to work -->
<module name="SuppressWarningsHolder"/>

Expand Down Expand Up @@ -158,9 +161,6 @@

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="130"/>
</module>
<module name="MethodLength">
<property name="tokens" value="METHOD_DEF"/>
<property name="max" value="60"/>
Expand Down Expand Up @@ -224,7 +224,6 @@

<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<module name="ArrayTrailingComma"/>
<module name="CovariantEquals"/>
<module name="DeclarationOrder"/>
<module name="ExplicitInitialization"/>
Expand All @@ -250,6 +249,7 @@
<module name="InnerAssignment"/>
<module name="ReturnCount">
<property name="max" value="8"/>
<property name="maxForVoid" value="8"/>
</module>
<module name="NestedIfDepth">
<property name="max" value="2"/>
Expand Down Expand Up @@ -297,7 +297,12 @@
<property name="max" value="12"/>
</module>
<module name="NPathComplexity">
<property name="max" value="50"/>
<!-- TODO Agree on the value
Checkstyle 7.7 improved the NPath algorithm further that leads to higher NPath counts.
7.6 passes with max 50, 7.7 needs it to be set to at least 216
the default threshold is 200
-->
<property name="max" value="250"/>
</module>

<!-- Miscellaneous other checks. -->
Expand All @@ -313,4 +318,4 @@
value="Please use UuidUtil.newUnsecureUUID() or UuidUtil.newSecureUUID() instead of UUID.randomUUID()"/>
</module>
</module>
</module>
</module>
14 changes: 0 additions & 14 deletions checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,4 @@

<suppressions>

<!-- Suppress strict duplicate code checking -->
<suppress checks="StrictDuplicateCode" files="\.java" lines="1-15"/>

<!-- Exclude implementation packages from JavaDoc checks -->
<suppress checks="JavadocPackage" files="/impl/"/>
<suppress checks="JavadocType" files="/impl/"/>
<suppress checks="JavadocVariable" files="/impl/"/>

<!-- AWS -->
<suppress checks="JavadocType" files="com/hazelcast/aws/"/>

<!-- Exclude Clover instrumented sources -->
<suppress checks="" files="/src-instrumented/"/>

</suppressions>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<maven.javadoc.plugin.version>3.2.0</maven.javadoc.plugin.version>

<maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
<maven.checkstyle.plugin.version>2.15</maven.checkstyle.plugin.version>
<maven.checkstyle.plugin.version>3.1.1</maven.checkstyle.plugin.version>
<maven.findbugs.plugin.version>3.0.5</maven.findbugs.plugin.version>
<maven.sonar.plugin.version>3.3.0.603</maven.sonar.plugin.version>
<maven.jacoco.plugin.version>0.8.5</maven.jacoco.plugin.version>
Expand Down
15 changes: 15 additions & 0 deletions src/test/java/com/hazelcast/aws/AwsClientConfiguratorTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2020 Hazelcast Inc.
*
* Licensed under the Hazelcast Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://hazelcast.com/hazelcast-community-license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.hazelcast.aws;

import com.hazelcast.aws.AwsMetadataApi.EcsMetadata;
Expand Down
15 changes: 15 additions & 0 deletions src/test/java/com/hazelcast/aws/AwsCredentialsProviderTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2020 Hazelcast Inc.
*
* Licensed under the Hazelcast Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://hazelcast.com/hazelcast-community-license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.hazelcast.aws;

import com.hazelcast.config.InvalidConfigurationException;
Expand Down
15 changes: 15 additions & 0 deletions src/test/java/com/hazelcast/aws/AwsEcsApiTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2020 Hazelcast Inc.
*
* Licensed under the Hazelcast Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://hazelcast.com/hazelcast-community-license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.hazelcast.aws;

import com.github.tomakehurst.wiremock.junit.WireMockRule;
Expand Down
15 changes: 15 additions & 0 deletions src/test/java/com/hazelcast/aws/AwsEcsClientTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2020 Hazelcast Inc.
*
* Licensed under the Hazelcast Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://hazelcast.com/hazelcast-community-license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.hazelcast.aws;

import com.hazelcast.aws.AwsEcsApi.Task;
Expand Down
15 changes: 15 additions & 0 deletions src/test/java/com/hazelcast/aws/AwsMetadataApiTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2020 Hazelcast Inc.
*
* Licensed under the Hazelcast Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://hazelcast.com/hazelcast-community-license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.hazelcast.aws;

import com.github.tomakehurst.wiremock.junit.WireMockRule;
Expand Down
15 changes: 15 additions & 0 deletions src/test/java/com/hazelcast/aws/RegionValidatorTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2020 Hazelcast Inc.
*
* Licensed under the Hazelcast Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://hazelcast.com/hazelcast-community-license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.hazelcast.aws;

import com.hazelcast.config.InvalidConfigurationException;
Expand Down
15 changes: 15 additions & 0 deletions src/test/java/com/hazelcast/aws/StringUtilsTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2020 Hazelcast Inc.
*
* Licensed under the Hazelcast Community License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://hazelcast.com/hazelcast-community-license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.hazelcast.aws;

import org.junit.Test;
Expand Down

0 comments on commit 155fb76

Please # to comment.