dead.fish
04/01/2020, 11:14 PMseb
04/02/2020, 7:30 AMArtur Bosch
04/02/2020, 4:47 PMJavier
04/03/2020, 8:03 AMGopal S Akshintala
04/03/2020, 5:04 PMsonar-kotlin
plugin offered by detekt is not official and there is SonarKotlin official from SonaQube which says you can pull detekt reports), I am confused which way to go!Anthony f
04/06/2020, 12:41 PMdead.fish
04/07/2020, 11:46 AMCaused by: java.lang.NoClassDefFoundError: kotlin/io/CloseableKt
at io.gitlab.arturbosch.detekt.api.internal.YamlConfig$Companion.load(YamlConfig.kt:67)
at io.gitlab.arturbosch.detekt.api.internal.YamlConfig$Companion.load(YamlConfig.kt:56)
at io.gitlab.arturbosch.detekt.cli.ConfigurationsKt.parsePathConfig(Configurations.kt:67)
at io.gitlab.arturbosch.detekt.cli.ConfigurationsKt.loadConfiguration(Configurations.kt:29)
at io.gitlab.arturbosch.detekt.cli.runners.Runner.createSettings(Runner.kt:78)
at io.gitlab.arturbosch.detekt.cli.runners.Runner.execute(Runner.kt:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gitlab.arturbosch.detekt.invoke.DefaultCliInvoker.invokeCli(DetektInvoker.kt:51)
... 98 more
mokkun
04/08/2020, 4:19 AMGurpreetSK
04/09/2020, 6:44 AM./gradlew detekt {list of files}
)
Context: I want to write a git hook which runs detekt on all the changed files (only the changed files) and fail if the task fails.Gopal S Akshintala
04/11/2020, 12:35 PMArtur Bosch
04/11/2020, 6:48 PMArtur Bosch
04/12/2020, 10:08 PMfo2rist
04/13/2020, 6:09 PMprocessors:
active: true
exclude:
- 'DetektProgressListener'
- 'FunctionCountProcessor'
- 'PropertyCountProcessor'
- 'ClassCountProcessor'
- 'PackageCountProcessor'
- 'KtFileCountProcessor'
console-reports:
active: true
exclude:
- 'ProjectStatisticsReport'
- 'ComplexityReport'
- 'FindingsReport'
- 'NotificationReport'
- 'BuildFailureReport'
Example of output:Thiago Nerys
04/18/2020, 5:35 AMjava.sql.Date
, sometimes it can't find org.yaml.snakeyaml.nodes.Tag
.
Attached the smallest build.gradle.kts
that I was able to reproduce the problem. Just add an empty .kt file under src/main/kotlin
and you'll see the error.
Running gradle 6.3dead.fish
04/21/2020, 8:24 AMarturbosch/detekt
dead.fish
04/21/2020, 3:46 PMdetektMain
cannot run flawless with org.gradle.parallel=true
on many modules at once. I get weird class not found exceptions on runtime (with 1.8) that I don't get with the old (legacy) detekt
task. Has anybody experienced something like this?sanogueralorenzo
05/08/2020, 4:28 AMbuildUponDefaultConfig = true
recently and realised that overriden functions also show as EmptyFunctionBlock
(I know there is a flag to ignoreOverriden) I'm more curious to know what was the reasoning behind leaving it to false and what is the best approach to solve situations where you are implementing an interface from the framework or third party provider that you have no control over.Jukka Siivonen
05/13/2020, 7:49 AMJukka Siivonen
05/13/2020, 8:26 AMRajat Varyani
05/13/2020, 4:26 PMvar
in codebase. What is i could come up till now is
override fun visitDeclaration(dcl: KtDeclaration) {
super.visitDeclaration(dcl)
if (dcl is KtProperty && dcl.isVar) {
report(CodeSmell(issue, Entity.from(dcl), "Mutation in code"))
}
}
Now I am writing code to detect keywords like
val list = mutableListOf(1, 2)
. I am not sure how to go about it?zmunm
05/15/2020, 9:06 AMfun foo(bar : (String) -> Unit)
2.
fun foo(bar : (name: String) -> Unit)
Hi. I don't know how can i call name
.. Please give me a keyword
lambda property.. lambda description.. anyway
If it is interface
, I think it is better to have lambda description
. And when I use this function..
startSmsUserConsent { name ->
...
}
I think it is good to specify lambda description
.
Is there any rule or plan for this?kenkyee
05/16/2020, 12:04 PMschalkms
05/18/2020, 9:12 PMBrais Gabin
05/19/2020, 8:46 AM./gradlew detektBaseline --continue
Charles
05/21/2020, 3:20 PM@SuppressWarnings
in Kotlin code, because we're trying to track warning suppressing and normalizing would help. The problem with this particular annotation is that there is no associated import to filter on at a file level.gammax
05/22/2020, 8:48 AMseb
05/22/2020, 9:00 AMSourabh Rawat
05/22/2020, 10:17 AMCaused by: java.lang.NoSuchMethodError: '<http://org.jetbrains.kotlin.com|org.jetbrains.kotlin.com>.intellij.openapi.extensions.ExtensionsArea <http://org.jetbrains.kotlin.com|org.jetbrains.kotlin.com>.intellij.openapi.project.Project.getExtensionArea()'
please help.dead.fish
05/22/2020, 11:01 AMbuildSrc
instead of a separate Gradle module and let the Gradle plugin pick them up or is this eventually already built-in and I have some configuration error because my custom rules don't seem to execute?dead.fish
05/22/2020, 11:03 AMdetektPlugins(project("..."))
configuration would no longer work anyways...dead.fish
05/22/2020, 11:03 AMdetektPlugins(project("..."))
configuration would no longer work anyways...Javier
05/22/2020, 11:21 AMimplementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detekt")
dead.fish
05/22/2020, 11:27 AMdetekt-api
there, applying the plugin there should work?! Nice!Javier
05/22/2020, 11:52 AMimplementation
let you use detektPlugins
in precompiled pluginsdead.fish
05/22/2020, 12:14 PMPlugin<Project>
derived class) at all, but if this works for you, well.dependencies {
val detektPlugins by configurations
detektPlugins(files("$rootDir/buildSrc/build/libs/buildSrc.jar"))
}
Javier
05/22/2020, 12:25 PMArtur Bosch
05/26/2020, 10:51 AMdetektPlugins
:
https://github.com/detekt/detekt/blob/master/buildSrc/src/main/kotlin/detekt.gradle.kts#L45Javier
05/26/2020, 12:04 PMdead.fish
06/09/2020, 10:26 AMbuildSrc
as build configuration source. I see however that Gradle provides no clean way to access the buildSrc
module itself for this configuration, probably because of https://github.com/gradle/gradle/issues/2531