diff --git a/build.gradle b/build.gradle index 1737212..88d99fd 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ plugins { id('com.gradle.plugin-publish') version '1.2.1' id('io.github.joselion.pretty-jupiter') version '3.0.1' id('io.github.joselion.strict-null-check') version '3.0.0' - id('se.solrike.sonarlint') version '1.0.0-beta.15' + id('name.remal.sonarlint') version '3.3.9' } group = 'io.github.joselion' @@ -40,15 +40,21 @@ checkstyle { setToolVersion('10.12.3') } -sonarlint { - excludeRules = [ - 'java:S107', // Allow constructors with more than 7 parameters - 'java:S3776', // Allow methods with more than 15 lines - 'java:S4032', // Allow packages only containing `package-info.java` - ] - includeRules = [ - 'java:S4266', // "Stream.collect()" calls should not be redundant - ] +sonarLint { + setToolVersion('9.2.0.74516') + languages { + include('java') + } + rules { + enable( + 'java:S4266', // "Stream.collect()" calls should not be redundant + ) + disable( + 'java:S107', // Allow constructors with more than 7 parameters + 'java:S3776', // Allow methods with more than 15 lines + 'java:S4032', // Allow packages only containing `package-info.java` + ) + } } strictNullCheck { @@ -63,7 +69,12 @@ repositories { dependencies { annotationProcessor('org.projectlombok:lombok:1.18.28') compileOnly('org.projectlombok:lombok:1.18.28') - sonarlintPlugins('org.sonarsource.java:sonar-java-plugin:7.20.0.31692') + sonarlintCorePlugins('org.sonarsource.java:sonar-java-plugin:7.24.0.32100') + constraints { + sonarlintCore('org.apache.tomcat.embed:tomcat-embed-core:9.0.80') { + because('version 9.0.75 has a security vulnerability') + } + } implementation(localGroovy()) implementation('io.github.joselion:maybe:3.2.0') @@ -89,7 +100,7 @@ testing { } targets { - all { + configureEach { testTask.configure { shouldRunAfter(test) } diff --git a/buildscript-gradle.lockfile b/buildscript-gradle.lockfile index 4adfbe4..7135b85 100644 --- a/buildscript-gradle.lockfile +++ b/buildscript-gradle.lockfile @@ -3,17 +3,12 @@ # This file is expected to be part of source control. com.gradle.plugin-publish:com.gradle.plugin-publish.gradle.plugin:1.2.1=classpath com.gradle.publish:plugin-publish-plugin:1.2.1=classpath -io.github.furstenheim:copy_down:1.1=classpath io.github.joselion.pretty-jupiter:io.github.joselion.pretty-jupiter.gradle.plugin:3.0.1=classpath io.github.joselion.strict-null-check:io.github.joselion.strict-null-check.gradle.plugin:3.0.0=classpath io.github.joselion:maybe:3.2.0=classpath io.github.joselion:pretty-jupiter:3.0.1=classpath io.github.joselion:strict-null-check:3.0.0=classpath -org.apache.commons:commons-lang3:3.11=classpath -org.apache.commons:commons-text:1.9=classpath +name.remal.gradle-plugins.sonarlint:sonarlint:3.3.9=classpath +name.remal.sonarlint:name.remal.sonarlint.gradle.plugin:3.3.9=classpath org.apache.maven:maven-model:3.6.3=classpath -org.jsoup:jsoup:1.15.2=classpath -org.sonarsource.sonarlint.core:sonarlint-core:8.0.2.42487=classpath -se.solrike.sonarlint:se.solrike.sonarlint.gradle.plugin:1.0.0-beta.15=classpath -se.solrike.sonarlint:sonarlint-gradle-plugin:1.0.0-beta.15=classpath empty= diff --git a/gradle.lockfile b/gradle.lockfile index bea8a42..67944ce 100644 --- a/gradle.lockfile +++ b/gradle.lockfile @@ -1,7 +1,10 @@ # This is a Gradle generated file for dependency locking. # Manual edits can break the build and are not advised. # This file is expected to be part of source control. -com.google.code.findbugs:jsr305:3.0.2=checkstyle +com.fasterxml.staxmate:staxmate:2.4.0=sonarlintCoreClasspath +com.fasterxml.woodstox:woodstox-core:6.4.0=sonarlintCoreClasspath +com.google.code.findbugs:jsr305:3.0.2=checkstyle,sonarlintCoreClasspath +com.google.code.gson:gson:2.8.9=sonarlintCoreClasspath com.google.collections:google-collections:1.0=checkstyle com.google.errorprone:error_prone_annotations:2.18.0=checkstyle com.google.guava:failureaccess:1.0.1=checkstyle @@ -12,12 +15,15 @@ com.puppycrawl.tools:checkstyle:10.12.3=checkstyle commons-beanutils:commons-beanutils:1.9.4=checkstyle commons-codec:commons-codec:1.15=checkstyle commons-collections:commons-collections:3.2.2=checkstyle +commons-io:commons-io:2.11.0=sonarlintCoreClasspath info.picocli:picocli:4.7.4=checkstyle io.github.joselion:maybe:3.2.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath net.bytebuddy:byte-buddy-agent:1.14.6=testCompileClasspath,testRuntimeClasspath,testkitCompileClasspath,testkitRuntimeClasspath net.bytebuddy:byte-buddy:1.14.6=testCompileClasspath,testRuntimeClasspath,testkitCompileClasspath,testkitRuntimeClasspath net.sf.saxon:Saxon-HE:12.3=checkstyle org.antlr:antlr4-runtime:4.11.1=checkstyle +org.apache.commons:commons-compress:1.21=sonarlintCoreClasspath +org.apache.commons:commons-lang3:3.12.0=sonarlintCoreClasspath org.apache.commons:commons-lang3:3.8.1=checkstyle org.apache.commons:commons-text:1.3=checkstyle org.apache.httpcomponents.client5:httpclient5:5.1.3=checkstyle @@ -29,6 +35,10 @@ org.apache.maven.doxia:doxia-core:1.12.0=checkstyle org.apache.maven.doxia:doxia-logging-api:1.12.0=checkstyle org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle +org.apache.tomcat.embed:tomcat-embed-core:9.0.80=sonarlintCoreClasspath +org.apache.tomcat.embed:tomcat-embed-el:9.0.75=sonarlintCoreClasspath +org.apache.tomcat.embed:tomcat-embed-jasper:9.0.75=sonarlintCoreClasspath +org.apache.tomcat:tomcat-annotations-api:9.0.80=sonarlintCoreClasspath org.apache.xbean:xbean-reflect:3.7=checkstyle org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testkitCompileClasspath org.assertj:assertj-core:3.24.2=testCompileClasspath,testRuntimeClasspath,testkitCompileClasspath,testkitRuntimeClasspath @@ -37,7 +47,19 @@ org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle org.codehaus.plexus:plexus-utils:3.3.0=checkstyle +org.codehaus.woodstox:stax2-api:4.2.1=sonarlintCoreClasspath +org.eclipse.jdt:ecj:3.33.0=sonarlintCoreClasspath org.eclipse.jdt:org.eclipse.jdt.annotation:2.2.700=compileClasspath,testCompileClasspath,testkitCompileClasspath +org.eclipse.jdt:org.eclipse.jdt.core:3.33.0=sonarlintCoreClasspath +org.eclipse.platform:org.eclipse.core.commands:3.10.300=sonarlintCoreClasspath +org.eclipse.platform:org.eclipse.core.contenttype:3.8.100=sonarlintCoreClasspath +org.eclipse.platform:org.eclipse.core.jobs:3.13.200=sonarlintCoreClasspath +org.eclipse.platform:org.eclipse.core.resources:3.18.200=sonarlintCoreClasspath +org.eclipse.platform:org.eclipse.core.runtime:3.26.100=sonarlintCoreClasspath +org.eclipse.platform:org.eclipse.equinox.common:3.17.100=sonarlintCoreClasspath +org.eclipse.platform:org.eclipse.equinox.preferences:3.10.200=sonarlintCoreClasspath +org.eclipse.platform:org.eclipse.osgi:3.18.300=sonarlintCoreClasspath +org.eclipse.platform:org.eclipse.text:3.12.300=sonarlintCoreClasspath org.javassist:javassist:3.28.0-GA=checkstyle org.junit.jupiter:junit-jupiter-api:5.10.0=testCompileClasspath,testRuntimeClasspath,testkitCompileClasspath,testkitRuntimeClasspath org.junit.jupiter:junit-jupiter-engine:5.10.0=testRuntimeClasspath,testkitRuntimeClasspath @@ -50,8 +72,34 @@ org.junit:junit-bom:5.10.0=testCompileClasspath,testRuntimeClasspath,testkitComp org.mockito:mockito-core:5.5.0=testCompileClasspath,testRuntimeClasspath,testkitCompileClasspath,testkitRuntimeClasspath org.objenesis:objenesis:3.3=testRuntimeClasspath,testkitRuntimeClasspath org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath,testkitCompileClasspath,testkitRuntimeClasspath +org.osgi:org.osgi.service.prefs:1.1.2=sonarlintCoreClasspath +org.osgi:osgi.annotation:8.0.1=sonarlintCoreClasspath +org.ow2.asm:asm:9.0=sonarlintCoreClasspath org.projectlombok:lombok:1.18.28=annotationProcessor,compileClasspath,testAnnotationProcessor,testCompileClasspath,testkitAnnotationProcessor,testkitCompileClasspath org.reflections:reflections:0.10.2=checkstyle -org.sonarsource.java:sonar-java-plugin:7.20.0.31692=sonarlintPlugins +org.sonarsource.analyzer-commons:sonar-analyzer-commons:2.7.0.1482=sonarlintCoreClasspath +org.sonarsource.analyzer-commons:sonar-analyzer-recognizers:2.7.0.1482=sonarlintCoreClasspath +org.sonarsource.analyzer-commons:sonar-performance-measure:2.7.0.1482=sonarlintCoreClasspath +org.sonarsource.analyzer-commons:sonar-regex-parsing:2.7.0.1482=sonarlintCoreClasspath +org.sonarsource.analyzer-commons:sonar-xml-parsing:2.7.0.1482=sonarlintCoreClasspath +org.sonarsource.java:external-reports:7.24.0.32100=sonarlintCoreClasspath +org.sonarsource.java:java-checks:7.24.0.32100=sonarlintCoreClasspath +org.sonarsource.java:java-frontend:7.24.0.32100=sonarlintCoreClasspath +org.sonarsource.java:java-jsp:7.24.0.32100=sonarlintCoreClasspath +org.sonarsource.java:java-surefire:7.24.0.32100=sonarlintCoreClasspath +org.sonarsource.java:java-symbolic-execution:7.24.0.32100=sonarlintCoreClasspath +org.sonarsource.java:jdt:7.24.0.32100=sonarlintCoreClasspath +org.sonarsource.java:sonar-java-plugin:7.24.0.32100=sonarlintCoreClasspath +org.sonarsource.javascript:css:10.6.0.22520=sonarlintCoreClasspath +org.sonarsource.javascript:javascript-checks:10.6.0.22520=sonarlintCoreClasspath +org.sonarsource.javascript:sonar-javascript-plugin:10.6.0.22520=sonarlintCoreClasspath +org.sonarsource.kotlin:sonar-kotlin-plugin:2.18.0.2938=sonarlintCoreClasspath +org.sonarsource.slang:sonar-ruby-plugin:1.14.0.4481=sonarlintCoreClasspath +org.sonarsource.slang:sonar-scala-plugin:1.14.0.4481=sonarlintCoreClasspath +org.sonarsource.sonarlint.core:sonarlint-core:9.2.0.74516=sonarlintCore,sonarlintCoreClasspath +org.sonarsource.sslr:sslr-core:1.24.0.633=sonarlintCoreClasspath +org.sonarsource.xml:sonar-xml-plugin:2.10.0.4108=sonarlintCoreClasspath org.xmlresolver:xmlresolver:5.2.0=checkstyle -empty=sonarlint +xerces:xercesImpl:2.12.2=sonarlintCoreClasspath +xml-apis:xml-apis:1.4.01=sonarlintCoreClasspath +empty=