https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
detekt
  • r

    robstoll

    10/11/2018, 12:13 PM
    I think I found a bug (or a missing feature, depending on how you want to call it 😉) - how is one able to exclude only certain rules for tests but not a whole rule-set? When I define the following:
    exclude-rule-sets:
    exclude-rules:
    - 'StringLiteralDuplication'
    Then the default applies for
    exclude-rule-sets
    which is uggly because I did not want the default (same applies when I remove all exclude-rules and only add exclude-rule-sets) The workaround I use is:
    exclude-rule-sets:
    - 'ignoreDefaultBehaviour'
    Is there another way to achieve this?
    m
    • 2
    • 7
  • r

    robstoll

    10/16/2018, 7:30 AM
    @Eugen Martynov There is
    sonar.kotlin.detekt.reportPaths
    which should point to
    detekt-checkstyle.xml
    e
    • 2
    • 2
  • a

    Artur Bosch

    10/18/2018, 7:11 PM
    Also @heyitsmohit gave a talk on static code analysis and detekt on droidcon NYC, if you haven't seen it ->

    https://www.youtube.com/watch?v=LT6m5_LO2DQ▾

    The talk is quite entertaining and it motivates me to work further on detekt, thanks! 🙂
    👍 4
    s
    • 2
    • 1
  • t

    tapchicoma

    10/19/2018, 12:08 PM
    Is it possible to not fail build if baseline file is missing?
    a
    • 2
    • 6
  • a

    Artur Bosch

    10/28/2018, 11:38 AM
    Nope, https://github.com/arturbosch/detekt/pull/1221 is still blocked
    m
    • 2
    • 1
  • t

    tapchicoma

    10/31/2018, 2:34 PM
    hi, is there any rule in detekt that disables usages of
    !!
    ?
    m
    a
    • 3
    • 4
  • s

    Scott Dillender

    10/31/2018, 5:22 PM
    Any thoughts on whether or not this would be possible without resolving types? (Summary: If function has an argument of type X, make sure any child call expressions for a function that has parameter of type X provide a value. ) https://github.com/arturbosch/detekt/issues/1300 For example, can I force a visitKtClass before hand to get the necessary metadata for a subsequent rule? ( Something like this processor: https://github.com/arturbosch/detekt/blob/master/detekt-sample-extensions/src/main/kotlin/io/gitlab/arturbosch/detekt/sample/extensions/processors/QualifiedNameProcessor.kt)
    s
    a
    • 3
    • 4
  • s

    skennedy

    11/03/2018, 12:15 AM
    i'm seeing some behavior with
    UnnecessaryApply
    that i'm not sure about.
    val view = FrameLayout(context).apply {
        background = ColorDrawable(ContextCompat.getColor(context, R.color.white))
    }
    This is saying it's unnecessary. But I'm not sure how I'd both set the background and return the
    FrameLayout
    without an
    apply
    .
    m
    • 2
    • 4
  • s

    sanogueralorenzo

    11/04/2018, 5:46 PM
    Hey everyone, I wrote this short medium to explain how to integrate detekt in case someone can give it a read and approve I'm not doing anything too wrong 😄 it is quite short. https://proandroiddev.com/detecting-kotlin-code-smells-with-detekt-e79c52a35faf
    s
    a
    • 3
    • 4
  • a

    Artur Bosch

    11/06/2018, 4:14 AM
    hey guys, we need to rename
    detekt-intellij-plugin
    to something else. No plugin and no intellij in the name ... 🙂 How about: detekt4idea? Maybe I need to ask if idea is allowed than 😄
    s
    • 2
    • 2
  • v

    vanniktech

    11/06/2018, 9:53 AM
    How come we need to rename it?
    ☝️ 2
    a
    • 2
    • 1
  • j

    Jukka Siivonen

    11/07/2018, 8:34 AM
    is the approval of new version of IDEA plugin pending because it needs to be renamed? Would be nice to be able to test soon..
    s
    • 2
    • 3
  • a

    Artur Bosch

    11/08/2018, 4:14 PM
    its now just called detekt and is up ^^
    j
    • 2
    • 1
  • t

    themishkun

    11/09/2018, 11:26 AM
    I fixed that! All that needed is to rename
    NoInternalImportRule
    in the yml to
    NoInternalImport
    . @Artur Bosch, @mauin Can we report warnings about unknown rules in the yml configs? I spent 2 days finding this bug
    a
    • 2
    • 1
  • s

    skennedy

    11/12/2018, 6:52 PM
    did RC10 change something related to test-pattern / patterns? i have stuff showing up now that was previously excluded
    m
    • 2
    • 8
  • k

    kevinherron

    11/13/2018, 4:42 PM
    anybody else think the defaults for ObjectPropertyNaming rule should match the Kotlin style guide?
    m
    s
    • 3
    • 5
  • s

    skennedy

    11/16/2018, 9:21 PM
    did anything change with
    EndOfSentenceFormat
    ?
    s
    • 2
    • 1
  • m

    mauin

    12/06/2018, 9:47 AM
    We have a tracking issue to validate all inputs in the config and all Regexes to make these errors easier to spot.
    a
    • 2
    • 1
  • j

    Jacks0n23

    12/13/2018, 9:15 AM
    Hey 👋 can anyone help me? https://github.com/arturbosch/detekt/issues/1395
    m
    t
    • 3
    • 24
  • x

    xenoterracide

    12/18/2018, 4:24 AM
    Failed to apply plugin [id 'com.xenoterracide.gradle.bundle.kotlin-lib-defaults']
    > Extension of type 'JavaPluginConvention' does not exist. Currently registered extension types: [ExtraPropertiesExtension, XenoExtension, IdeaModel, DefaultArtifactPublicationSet, ReportingExtension, SourceSetContainer, JavaPluginExtension, KotlinJvmProjectExtension] any way to get my plugin to wait on that extension?
    m
    • 2
    • 1
  • s

    schalkms

    12/21/2018, 8:09 PM
    Hi Ivan! That's actually a nice idea for a detekt rule! Without the source code it's very hard to help you. Can you post a link to your source code please?
    a
    • 2
    • 9
  • m

    Mike

    01/07/2019, 11:16 AM
    At the moment either you have it enabled, in which case it automatically runs on all KT files, or you have it disabled, and it does nothing.
    👍 1
    t
    • 2
    • 3
  • x

    xenoterracide

    01/08/2019, 5:22 AM
    buildscript {
        repositories {
            jcenter()
        }
    }
    
    plugins {
        id("io.gitlab.arturbosch.detekt").version("[version]")
    }
    when will things work without the buildscript? (jcenter()) and/or does anyone know how to add jcenter like this in a plugin via java
    c
    • 2
    • 3
  • j

    Jukka Siivonen

    01/11/2019, 9:16 AM
    but there's no RC12 which is mentioned here https://plugins.gradle.org/plugin/io.gitlab.arturbosch.detekt
    m
    • 2
    • 14
  • j

    Jukka Siivonen

    01/11/2019, 9:17 AM
    also version syntax varies, first it was .RC8 and now -RC10 and -RC12?
    a
    • 2
    • 1
  • t

    thuytrinh

    01/18/2019, 10:29 PM
    Anyone knows any Danger plugin https://danger.systems/js/ that works with detekt (especially for multi-module project)?
    s
    a
    • 3
    • 6
  • t

    thuytrinh

    01/24/2019, 10:31 AM
    Anyone knows whether there’s an IntelliJ plugin for detekt which can run check on a specific Kotlin file from the IDE? For example, right click on the file > run detekt. Then we got a report which is only for that file.
    s
    m
    • 3
    • 6
  • b

    BorzdeG

    01/25/2019, 11:40 AM
    I think parameter
    formatting.MaximumLineLength
    is redundant: https://github.com/arturbosch/detekt/blob/master/detekt-cli/src/main/resources/default-detekt-config.yml#L222 He can use the parameter `style.MaxLineLength`: https://github.com/arturbosch/detekt/blob/master/detekt-cli/src/main/resources/default-detekt-config.yml#L445? Or at least have the same name ...
    s
    • 2
    • 1
  • s

    seb

    02/11/2019, 10:56 AM
    just a heads up, keep up the great work! it’s especially important now that ktlint is on hyatus
    ❤️ 3
    a
    • 2
    • 1
  • v

    vanniktech

    02/16/2019, 6:46 PM
    Please state your opinion in the issue to have one centralized place
    m
    • 2
    • 2
Powered by Linen
Title
v

vanniktech

02/16/2019, 6:46 PM
Please state your opinion in the issue to have one centralized place
m

Mike

02/16/2019, 7:08 PM
Link please or at least #
v

vanniktech

02/16/2019, 8:44 PM
https://github.com/arturbosch/detekt/issues/1478
View count: 2