Skip to content

Commit

Permalink
chore(lint): Switch to name.remal.sonarlint plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseLion committed Sep 13, 2023
1 parent 00f489e commit 5e423a5
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 29 deletions.
44 changes: 25 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ buildscript {
}

plugins {
id 'checkstyle'
id 'jacoco'
id 'java-library'
id 'maven-publish'
id 'signing'
id('checkstyle')
id('jacoco')
id('java-library')
id('maven-publish')
id('signing')

id 'io.github.joselion.pretty-jupiter' version '3.0.1'
id 'io.github.joselion.strict-null-check' version '3.0.0'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0-rc-1'
id 'se.solrike.sonarlint' version '1.0.0-beta.15'
id('io.github.joselion.pretty-jupiter') version '3.0.1'
id('io.github.joselion.strict-null-check') version '3.0.0'
id('io.github.gradle-nexus.publish-plugin') version '2.0.0-rc-1'
id('name.remal.sonarlint') version '3.3.8'
}

group = 'io.github.joselion'
Expand Down Expand Up @@ -54,15 +54,21 @@ jar {
}
}

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 {
Expand All @@ -89,7 +95,7 @@ repositories {
}

dependencies {
sonarlintPlugins('org.sonarsource.java:sonar-java-plugin:7.20.0.31692')
sonarlintCorePlugins('org.sonarsource.java:sonar-java-plugin:7.24.0.32100')

testImplementation('org.assertj:assertj-core:3.24.2')
testImplementation('org.mockito:mockito-core:5.5.0')
Expand Down
9 changes: 2 additions & 7 deletions buildscript-gradle.lockfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
# 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.
io.github.furstenheim:copy_down:1.1=classpath
io.github.gradle-nexus.publish-plugin:io.github.gradle-nexus.publish-plugin.gradle.plugin:2.0.0-rc-1=classpath
io.github.gradle-nexus:publish-plugin:2.0.0-rc-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
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
name.remal.gradle-plugins.sonarlint:sonarlint:3.3.8=classpath
name.remal.sonarlint:name.remal.sonarlint.gradle.plugin:3.3.8=classpath
empty=
54 changes: 51 additions & 3 deletions gradle.lockfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -12,11 +15,14 @@ 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
net.bytebuddy:byte-buddy-agent:1.14.6=testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.14.6=testCompileClasspath,testRuntimeClasspath
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
Expand All @@ -28,6 +34,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.75=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.75=sonarlintCoreClasspath
org.apache.xbean:xbean-reflect:3.7=checkstyle
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.assertj:assertj-core:3.24.2=testCompileClasspath,testRuntimeClasspath
Expand All @@ -36,7 +46,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
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.jacoco:org.jacoco.agent:0.8.10=jacocoAgent,jacocoAnt
org.jacoco:org.jacoco.ant:0.8.10=jacocoAnt
org.jacoco:org.jacoco.core:0.8.10=jacocoAnt
Expand All @@ -53,10 +75,36 @@ org.junit:junit-bom:5.10.0=testCompileClasspath,testRuntimeClasspath
org.mockito:mockito-core:5.5.0=testCompileClasspath,testRuntimeClasspath
org.objenesis:objenesis:3.3=testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
org.osgi:org.osgi.service.prefs:1.1.2=sonarlintCoreClasspath
org.osgi:osgi.annotation:8.0.1=sonarlintCoreClasspath
org.ow2.asm:asm-commons:9.5=jacocoAnt
org.ow2.asm:asm-tree:9.5=jacocoAnt
org.ow2.asm:asm:9.0=sonarlintCoreClasspath
org.ow2.asm:asm:9.5=jacocoAnt
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.5.1.22382=sonarlintCoreClasspath
org.sonarsource.javascript:javascript-checks:10.5.1.22382=sonarlintCoreClasspath
org.sonarsource.javascript:sonar-javascript-plugin:10.5.1.22382=sonarlintCoreClasspath
org.sonarsource.kotlin:sonar-kotlin-plugin:2.17.0.2902=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=annotationProcessor,runtimeClasspath,signatures,sonarlint,testAnnotationProcessor
xerces:xercesImpl:2.12.2=sonarlintCoreClasspath
xml-apis:xml-apis:1.4.01=sonarlintCoreClasspath
empty=annotationProcessor,runtimeClasspath,testAnnotationProcessor

0 comments on commit 5e423a5

Please sign in to comment.