mjthornton
02/11/2021, 1:37 AMigor.wojda
02/13/2021, 2:11 PMtest
folder (Android). How cna I enable this?Petros Paraskevopoulos
02/15/2021, 10:27 AM1.14.2
version. I am also seeing this PR being open by @chao. Do we know if we are going to have an update to the intellij plugin soonish? As far as I understand this intellij plugin is not working with Detekt’s latest, non-rc, 1.15.0
version, is that right?mkrussel
03/01/2021, 3:39 PMgabrielfv
03/01/2021, 4:17 PMJavier
03/06/2021, 10:27 AMgammax
03/06/2021, 10:29 AMJavier
03/07/2021, 12:57 AMPreview unavailable
Sorry, we couldn't find this file in the repository.
I am using it in a multiplatform project, can be related?Andrew
03/10/2021, 12:24 PMkotlinx-html-jvm-0.6.12.pom
Could not resolve all files for configuration ':detekt'.
> Could not find org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.12.
Searched in the following locations:
- <https://dl.google.com/dl/android/maven2/org/jetbrains/kotlinx/kotlinx-html-jvm/0.6.12/kotlinx-html-jvm-0.6.12.pom>
- <https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-html-jvm/0.6.12/kotlinx-html-jvm-0.6.12.pom>
- <https://jitpack.io/org/jetbrains/kotlinx/kotlinx-html-jvm/0.6.12/kotlinx-html-jvm-0.6.12.pom>
Required by:
project : > io.gitlab.arturbosch.detekt:detekt-cli:1.2.1
seb
03/10/2021, 5:05 PMSebastian Schuberth
03/10/2021, 11:02 PM"results" : [ ]
although on the CLI I see issues. Any idea why that could be? Who wants to try, use the detekt-action
branch from https://github.com/oss-review-toolkit/ort.alexfu
03/13/2021, 1:35 PMformatting:
active: true
android: false
what does the android: false
setting mean? i couldn’t find any documentation on it.alorma
03/15/2021, 5:29 PMinterface
or class
?
I want to check if a method is anotated with @Deprecated
but only need to check interfaces, not implementations
Current code on threadspand
03/18/2021, 10:31 AMNullableToStringCall
rule to work. This is a new setup but I have done the following steps:
1. Setup detekt in gradle
2. Run generateDetektConfig task and edited the config to:
3. Set all rulesets to active false except potentialbugs
4. Set all rules to active: false in the ruleset except IteratorNotThrowingNoSuchElementException
and NullableToStringCall
. Both are true
5. In the same file I have the example noncompliant code for NullableToStringCall
and a noncompliant code for IteratorNotThrowingNoSuchElementException
.
6. Only the IteratorNotThrowingNoSuchElementException
code will fail the task.
Any ideas of what I am doing wrong ? The only difference between the rules I can see is that NullableToStringCall
is off by default.chao
03/18/2021, 4:26 PMdetekt-intelllij-plugin
version 1.15.0
stable:
This will align with the detekt:1.15.0
. Please help us by playing around with the plugin and reporting bugs and features.
If it looks good, we will continue to release detekt-intellij-plugin
version 1.16.0
to catch up with the main detekt
release.Joe
03/19/2021, 8:01 PMMemberNameEqualsClassName
rule. Is inline factory functions a known issue with this rule (or am I perhaps doing something else wrong that's making it trigger)?chao
03/21/2021, 6:46 PMgit branch -m master main
git fetch origin
git branch -u origin/main main
If you encounter any problems, please feel free to reply to this thread or open a Github issueJavier
03/22/2021, 8:28 AM@Suppress
annotations I have, is it a known issue or I have to configure something to get it working?chao
03/24/2021, 4:06 PMchao
03/25/2021, 3:11 PMdetekt-intelllij-plugin
version 1.16.0
stable is now available with the latest detekt:1.16.0
https://plugins.jetbrains.com/plugin/10761-detektHenning B
03/25/2021, 4:27 PMHenning B
03/29/2021, 7:55 PMdetektIdeaInspect
and detektIdeaFormat
which are mentioned here: https://detekt.github.io/detekt/gradle.html#available-plugin-tasks
Also I am also not able to include an idea { }
configuration into my detekt block. It cannot be resolved. What am I missing? I would like to check if my code is formatted according to the android studio code style via gradle.Ihar S
03/30/2021, 11:12 AMCoen
04/01/2021, 1:19 PMvineethraj49
04/04/2021, 5:52 AMKtLambdaExpression
is suspending in nature?vineethraj49
04/04/2021, 11:18 AM@RequiresTypeResolution
, still uses kdoc @requiresTypeResolution
), but it doesn't seem to pick up/enable type inference for a rule
how to check if kdoc annotation had been added?vineethraj49
04/05/2021, 3:56 AM((descriptor.source as JavaSourceElement).javaElement as BinaryJavaMethod).containingClass
at runtimeAlex
04/14/2021, 10:02 AMwhen
branches are not exhaustive?yahyabayramoglu
04/15/2021, 8:24 AMVivek Krishnan
04/15/2021, 9:40 AMid("io.gitlab.arturbosch.detekt") version "1.16.0" apply true
in my plugins section
2. added jcenter()
into my repositories section
3. In the subproject section, I’ve added a task to register detekAll
* What went wrong:
Script compilation errors:
Line 58: def autoFix = project.hasProperty('detektAutoFix')
^ Expecting an element
Line 58: def autoFix = project.hasProperty('detektAutoFix')
^ Expecting an element
Line 55: tasks.register()
^ None of the following functions can be called with the arguments supplied:
public abstract fun register(p0: String!): TaskProvider<Task!>! defined in org.gradle.api.tasks.TaskContainer
public abstract fun <T : Task!> register(p0: String!, p1: Class<TypeVariable(T)!>!): TaskProvider<TypeVariable(T)!>! defined in org.gradle.api.tasks.TaskContainer
public abstract fun <T : Task!> register(p0: String!, p1: Class<TypeVariable(T)!>!, vararg p2: Any!): TaskProvider<TypeVariable(T)!>! defined in org.gradle.api.tasks.TaskContainer
public abstract fun <T : Task!> register(p0: String!, p1: Class<TypeVariable(T)!>!, p2: Action<in TypeVariable(T)!>!): TaskProvider<TypeVariable(T)!>! defined in org.gradle.api.tasks.TaskContainer
public abstract fun register(p0: String!, p1: Action<in Task!>!): TaskProvider<Task!>! defined in org.gradle.api.tasks.TaskContainer
Line 57: tasks.register("detektAll", io.gitlab.arturbosch.detekt.Detekt) {
^ Not enough information to infer type variable T
Line 57: tasks.register("detektAll", io.gitlab.arturbosch.detekt.Detekt) {
^ Classifier 'Detekt' does not have a companion object, and thus must be initialized here
Line 58: def autoFix = project.hasProperty('detektAutoFix')
^ Too many characters in a character literal ''detektAutoFix''
Line 60: description = "Custom DETEKT build for all modules"
^ Variable expected
Line 61: parallel = true
^ Variable expected
Line 62: ignoreFailures = false
^ Variable expected
Line 63: autoCorrect = autoFix
^ Variable expected
Line 64: buildUponDefaultConfig = true
^ Variable expected
Line 71: html.enabled = true
^ Variable expected
Line 72: xml.enabled = false
^ Variable expected
Line 73: txt.enabled = false
^ Variable expected
Vivek Krishnan
04/15/2021, 9:40 AMid("io.gitlab.arturbosch.detekt") version "1.16.0" apply true
in my plugins section
2. added jcenter()
into my repositories section
3. In the subproject section, I’ve added a task to register detekAll
* What went wrong:
Script compilation errors:
Line 58: def autoFix = project.hasProperty('detektAutoFix')
^ Expecting an element
Line 58: def autoFix = project.hasProperty('detektAutoFix')
^ Expecting an element
Line 55: tasks.register()
^ None of the following functions can be called with the arguments supplied:
public abstract fun register(p0: String!): TaskProvider<Task!>! defined in org.gradle.api.tasks.TaskContainer
public abstract fun <T : Task!> register(p0: String!, p1: Class<TypeVariable(T)!>!): TaskProvider<TypeVariable(T)!>! defined in org.gradle.api.tasks.TaskContainer
public abstract fun <T : Task!> register(p0: String!, p1: Class<TypeVariable(T)!>!, vararg p2: Any!): TaskProvider<TypeVariable(T)!>! defined in org.gradle.api.tasks.TaskContainer
public abstract fun <T : Task!> register(p0: String!, p1: Class<TypeVariable(T)!>!, p2: Action<in TypeVariable(T)!>!): TaskProvider<TypeVariable(T)!>! defined in org.gradle.api.tasks.TaskContainer
public abstract fun register(p0: String!, p1: Action<in Task!>!): TaskProvider<Task!>! defined in org.gradle.api.tasks.TaskContainer
Line 57: tasks.register("detektAll", io.gitlab.arturbosch.detekt.Detekt) {
^ Not enough information to infer type variable T
Line 57: tasks.register("detektAll", io.gitlab.arturbosch.detekt.Detekt) {
^ Classifier 'Detekt' does not have a companion object, and thus must be initialized here
Line 58: def autoFix = project.hasProperty('detektAutoFix')
^ Too many characters in a character literal ''detektAutoFix''
Line 60: description = "Custom DETEKT build for all modules"
^ Variable expected
Line 61: parallel = true
^ Variable expected
Line 62: ignoreFailures = false
^ Variable expected
Line 63: autoCorrect = autoFix
^ Variable expected
Line 64: buildUponDefaultConfig = true
^ Variable expected
Line 71: html.enabled = true
^ Variable expected
Line 72: xml.enabled = false
^ Variable expected
Line 73: txt.enabled = false
^ Variable expected
gammax
04/15/2021, 9:43 AMVivek Krishnan
04/15/2021, 9:46 AMimport org.gradle.plugins.ide.idea.model.IdeaLanguageLevel
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.springframework.boot.gradle.plugin.SpringBootPlugin
import org.springframework.boot.gradle.tasks.run.BootRun
plugins {
base
id("com.dorongold.task-tree") version "1.4"
id("org.springframework.boot") version "2.4.1" apply false
kotlin("jvm") version "1.4.21"
kotlin("plugin.spring") version "1.4.21" apply false
id("org.sonarqube") version "3.1.1"
idea
jacoco
id("io.gitlab.arturbosch.detekt") version "1.16.0" apply true
}
group = "com.abc.engine"
allprojects {
val runningOnGitlabCI = System.getenv("GITLAB_CI")?.toBoolean() == true
version = when {
runningOnGitlabCI -> System.getenv("CI_COMMIT_TAG") ?: System.getenv("CI_PIPELINE_ID") ?: "ci_undefined"
else -> "undefined"
}
repositories {
mavenCentral()
maven(url = "<https://oss.jfrog.org/artifactory/oss-snapshot-local/>")
jcenter()
}
}
val SRC_ENCODING = "UTF-8"
val SRC_VERSION = 11
idea {
project {
jdkName = "$SRC_VERSION"
languageLevel = IdeaLanguageLevel("$SRC_VERSION")
vcs = "Git"
}
module {
excludeDirs = excludeDirs + file(".gradle/")
}
}
subprojects {
apply(plugin = "kotlin")
apply(plugin = "jacoco")
apply(plugin = "detek")
// tasks.register()
// tasks.register("detektAll", io.gitlab.arturbosch.detekt.Detekt) {
// def autoFix = project.hasProperty('detektAutoFix')
//
// description = "Custom DETEKT build for all modules"
// parallel = true
// ignoreFailures = false
// autoCorrect = autoFix
// buildUponDefaultConfig = true
// setSource(projectSource)
// baseline.set(baselineFile)
// config.setFrom(configFile)
// include(kotlinFiles)
// exclude(resourceFiles, buildFiles)
// reports {
// html.enabled = true
// xml.enabled = false
// txt.enabled = false
// }
// }
// tasks.register("detektGenerateBaseline", io.gitlab.arturbosch.detekt.DetektCreateBaselineTask) {
// description = "Custom DETEKT build to build baseline for all modules"
// parallel = true
// ignoreFailures = false
// buildUponDefaultConfig = true
// setSource(projectSource)
// baseline.set(baselineFile)
// config.setFrom(configFile)
// include(kotlinFiles)
// exclude(resourceFiles, buildFiles)
// }
tasks.withType<Test>().configureEach {
useJUnitPlatform()
testLogging {
events("failed")
}
maxParallelForks = Runtime.getRuntime().availableProcessors()
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "11"
kotlinOptions.useIR = true
}
}
tasks.withType<BootRun>().configureEach {
val profiles = System.getenv("SPRING_PROFILES_ACTIVE")
if (profiles == null || profiles.trim() == "") {
val springProfilesActive = project.gradle.startParameter.systemPropertiesArgs["spring.profiles.active"]
?: "localdev"
args = ((args ?: emptyList()) + "--spring.profiles.active=$springProfilesActive")
}
jvmArgs = listOf("-Xmx512m")
}
tasks.check {
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.isEnabled = true
csv.isEnabled = false
html.isEnabled = false
}
}
// global dependencies configuration
dependencies {
"annotationProcessor"(platform(SpringBootPlugin.BOM_COORDINATES))
"implementation"(platform(SpringBootPlugin.BOM_COORDINATES))
"implementation"(enforcedPlatform("com.amazonaws:aws-java-sdk-bom:1.11.862")) // amazon v1 bom
"implementation"(enforcedPlatform("software.amazon.awssdk:bom:2.14.19")) // amazon v2 bom
"implementation"(kotlin("stdlib"))
"implementation"(kotlin("reflect"))
"compileOnly"(platform(SpringBootPlugin.BOM_COORDINATES))
"compileOnly"("org.springframework.boot:spring-boot-configuration-processor")
"testImplementation"(platform(SpringBootPlugin.BOM_COORDINATES))
"testImplementation"("org.junit.jupiter:junit-jupiter-api")
"testImplementation"("org.junit.jupiter:junit-jupiter-params")
"testRuntimeOnly"(platform(SpringBootPlugin.BOM_COORDINATES))
"testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine")
// "detektPlugins"("io.gitlab.arturbosch.detekt:detekt-formatting:1.16.0")
}
}