Skip to content

Commit

Permalink
Revert "Build: Updated configs"
Browse files Browse the repository at this point in the history
This reverts commit cc061ee.
  • Loading branch information
jyemin committed Nov 11, 2021
1 parent c142cec commit 7399618
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 51 deletions.
12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ buildscript {
}
dependencies {
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3'
classpath "com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.9"
classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.5.0"
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:5.1.2'

// Scala plugins
Expand Down Expand Up @@ -151,7 +151,7 @@ configure(scalaProjects) {

spotless {
scala {
scalafmt('2.0.0').configFile("$configDir/scala/scalafmt.conf")
scalafmt('2.0.0').configFile("$configDir/scalafmt.conf")
}
}
compileScala.dependsOn('spotlessApply')
Expand Down Expand Up @@ -253,7 +253,7 @@ configure(javaCodeCheckedProjects) {
testImplementation('org.junit.jupiter:junit-jupiter-params')
testImplementation('org.junit.vintage:junit-vintage-engine')

testImplementation platform('org.spockframework:spock-bom:2.0-groovy-3.0')
testImplementation platform('org.spockframework:spock-bom:2.0-groovy-2.5')
testImplementation 'org.spockframework:spock-core'
testImplementation 'org.spockframework:spock-junit4'
testImplementation("org.mockito:mockito-core:3.8.0")
Expand Down Expand Up @@ -328,11 +328,13 @@ configure(javaCodeCheckedProjects) {
}

checkstyle {
toolVersion = "9.1"
toolVersion = "7.4"
configFile = new File(configDir, 'checkstyle.xml')
configProperties.checkstyleConfigDir = configDir
}

spotbugs {
excludeFilter = new File(configDir, 'spotbugs/exclude.xml')
excludeFilter = new File(configDir, 'findbugs-exclude.xml')
}

codenarc {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">

<suppressions>
<!-- vendored code -->
<suppress checks="[a-zA-Z0-9]*" files="com[\\/]mongodb[\\/]internal[\\/]connection[\\/]tlschannel[\\/]"/>

<!-- MongoDriverVersion (generated code) -->
<suppress checks="[a-zA-Z0-9]*" files="com[\\/]mongodb[\\/]internal[\\/]build[\\/]MongoDriverVersion.java" />
<suppress checks="[a-zA-Z0-9]*" files="com[\\/]mongodb[\\/]internal[\\/]connection[\\/]tlschannel[\\/]"/>

<suppress checks="MethodLength" files="QuickTour"/>
<suppress checks="Regexp" files="Tour"/>
Expand Down Expand Up @@ -62,10 +60,6 @@
<!--Do not check test classes -->
<suppress checks="Javadoc*" files=".*test.*"/>

<!--Do not check tour / helpers classes -->
<suppress checks="Javadoc*" files=".*tour.*"/>
<suppress checks="Javadoc*" files=".*helpers.*"/>

<!--Do not check The GridFSTour -->
<suppress checks="Regexp" files="GridFSTour"/>
<suppress checks="MethodLength" files="GridFSTour"/>
Expand Down
38 changes: 20 additions & 18 deletions config/checkstyle/checkstyle.xml → config/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,27 +78,21 @@
<!-- <property name="fileExtensions" value="java"/> -->
<!-- </module> -->

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="140"/>
<property name="ignorePattern" value="^.*[(http://|https://)|{@see|{@link].*$"/>
</module>

<module name="TreeWalker">

<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocType">
<property name="scope" value="public"/>
</module>
<module name="JavadocStyle">
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="checkFirstSentence" value="false"/>
<property name="allowUndeclaredRTE" value="true"/>
</module>
<!--<module name="JavadocVariable"/>-->
<!--<module name="JavadocStyle"/>-->


<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="ConstantName"/>
Expand All @@ -120,6 +114,14 @@
<module name="RedundantImport"/>
<module name="UnusedImports"/>


<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="140"/>
<property name="ignorePattern" value="^.*[(http://|https://)|{@see|{@link].*$"/>
</module>

<module name="MethodLength"/>
<module name="ParameterNumber">
<property name="max" value="12"/>
Expand Down Expand Up @@ -197,6 +199,8 @@
<!--<module name="TodoComment"/>-->
<module name="UpperEll"/>

<module name="FileContentsHolder"/>

<!--System.out.println not allowed-->
<module name="Regexp">
<property name="format" value="System\.out\.println"/>
Expand All @@ -217,18 +221,16 @@
<property name="illegalPattern" value="true"/>
<property name="ignoreComments" value="true"/>
</module>

<module name="SuppressionCommentFilter"/>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>

</module>
<module name="SuppressionCommentFilter"/>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>

<module name="SuppressionFilter">
<property name="file" value="${config_loc}/suppressions.xml"/>
<property name="file" value="${checkstyleConfigDir}/checkstyle-exclude.xml"/>
</module>

</module>
20 changes: 0 additions & 20 deletions config/spotbugs/exclude.xml → config/findbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,6 @@
<Bug code="EI,EI2"/>
</Match>

<Match>
<Class name="org.bson.types.ObjectId"/>
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE"/>
</Match>

<Match>
<Class name="com.mongodb.internal.connection.AwsAuthenticator$AwsSaslClient"/>
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE"/>
</Match>

<Match>
<Class name="com.mongodb.internal.connection.ScramShaAuthenticator$DefaultRandomStringGenerator"/>
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE"/>
</Match>

<Match>
<Class name="org.bson.codecs.BsonValueCodecProvider"/>
<Method name="getBsonTypeClassMap"/>
<Bug pattern="MS_EXPOSE_REP"/>
</Match>

<!-- these specific issues are deliberate design decisions -->

Expand Down
File renamed without changes.

0 comments on commit 7399618

Please sign in to comment.