Skip to content

Commit

Permalink
cleanup(checkstyle): Remove unrelated configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
guicamest committed Nov 16, 2023
1 parent 627ab57 commit e06de34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 64 deletions.
47 changes: 0 additions & 47 deletions .checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,6 @@
http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-141855.html#1852 -->
<module name="DeclarationOrder"/>

<!--&lt;!&ndash; Overloaded methods and constructors must be defined together. &ndash;&gt;-->
<!--<module name="OverloadMethodsDeclarationOrder">-->
<!--<property name="severity" value="warning"/> &lt;!&ndash; TODO: Make error. &ndash;&gt;-->
<!--</module>-->

<!-- Variables must be declared near where they are used. -->
<module name="VariableDeclarationUsageDistance">
<property name="allowedDistance" value="10"/>
Expand Down Expand Up @@ -331,23 +326,6 @@
<property name="ignoreComments" value="true"/>
</module>

<module name="Regexp">
<property name="format" value="SystemSetting\s*(\.|::)\s*getStringValueFromEnvironmentVariable"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Are you being naughty and not creating a SystemSetting? Don't you know that
your customers want both system properties AND environment variables? Are you REALLY sure you want to use
this and not support a system property?"/>
<property name="ignoreComments" value="true"/>
</module>

<!-- Checks that we don't implement AutoCloseable/Closeable -->
<module name="Regexp">
<property name="format" value="(class|interface).*(implements|extends).*[^\w](Closeable|AutoCloseable)[^\w]"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Use SdkAutoCloseable instead of Closeable/AutoCloseable"/>
<property name="ignoreComments" value="true"/>
</module>

<!-- Checks that we don't use Objects.hash. Objects.hashCode is preferred-->
<module name="Regexp">
<property name="format" value="\bObjects.hash\b"/>
Expand All @@ -356,31 +334,6 @@
<property name="ignoreComments" value="true"/>
</module>

<!-- Checks that we don't use sslContext.newHandler directly -->
<module name="Regexp">
<property name="format" value="\sslContext.newHandler\b"/>
<property name="illegalPattern" value="true"/>
<property name="message"
value="Don't use sslContext.newHandler directly, use NettyUtils.newSslHandler instead"/>
<property name="ignoreComments" value="true"/>
</module>

<!-- Checks that we don't use AttributeKey.newInstance directly -->
<module name="Regexp">
<property name="format" value="AttributeKey\.newInstance"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Use NettyUtils.getOrCreateAttributeKey to safely declare AttributeKeys"/>
<property name="ignoreComments" value="true"/>
</module>

<!-- Checks that we don't use Thread.currentThread().getContextClassLoader() directly -->
<module name="Regexp">
<property name="format" value="Thread\s*\.\s*currentThread\s*\(\s*\)\s*(\.|::)\s*getContextClassLoader"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Use software.amazon.awssdk.core.internal.util.ClassLoaderHelper Class to load the class."/>
<property name="ignoreComments" value="true"/>
</module>

<!-- Checks for redundant public modifier on interfaces and other redundant modifiers -->
<module name="RedundantModifier" />

Expand Down
19 changes: 2 additions & 17 deletions .checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,11 @@
"-//Puppy Crawl//DTD Suppressions 1.2//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_2.dtd">
<suppressions>
<!-- ignore all checks for test classes except for the NoIgnoreAnnotationsCheck -->
<suppress checks="^((?!NoIgnoreAnnotationsCheck).)*$"
<!-- ignore all checks for test classes -->
<suppress checks="^.*$"
files=".*[\\/](test|integrationTest)[\\/]java[\\/].+\.java$"/>

<suppress checks="HideUtilityClassConstructor"
files=".*[\\/](examples)[\\/]java[\\/].+\.java$"/>

<!-- ignore missing annotation checks under test/codegen directory -->
<suppress checks="MissingSdkAnnotationCheck"
files=".(codegen|test|release)[\\/].+\.java$"/>

<!-- Ignore usage of Thread.currentThread().getContextClassLoader for ClassLoaderHelper.!-->
<suppress checks="Regexp"
files=".*ClassLoaderHelper\.java$"/>

<!-- Ignore usage of sslContext.newHandler for NettyUtils.!-->
<suppress checks="Regexp"
files=".*NettyUtils\.java$"/>

<!-- Allow private field declaration before public, to have correct initialization order -->
<suppress checks="DeclarationOrder"
files=".*SdkAdvancedClientOption\.java$"/>
</suppressions>

0 comments on commit e06de34

Please sign in to comment.