https://kotlinlang.org logo
#detekt
Title
# detekt
j

Janusz Chorko

11/02/2021, 4:32 PM
I'm trying out detekt 1.19.0-RC1 and can't get
ignoreAnnotated
working on
FunctionNaming
rule with
Composable
annotation. I've tried config:
Copy code
FunctionNaming:
    active: true
    excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
    functionPattern: '([a-z][a-zA-Z0-9]*)|(`.*`)'
    excludeClassPattern: '$^'
    ignoreOverridden: true
    ignoreAnnotated:
      - 'Composable'
Also tried setting it to full
androidx.compose.runtime.Composable
, but I'm still getting reports on all Composable functions Am I configuring it wrong?
g

gammax

11/02/2021, 4:33 PM
cc @Brais Gabin ☝️
Could very much be a bug, don’t you mind opening an issue?
j

Janusz Chorko

11/02/2021, 4:47 PM
Seems to be working fine on
LongParameterList
rule. I'll try with minimal config first to see if something in my configuration breaks it
b

Brais Gabin

11/03/2021, 8:54 AM
I'm updating to the new version to test it in my project but I'm having other issue right now: https://github.com/detekt/detekt/issues/4228
j

Janusz Chorko

11/03/2021, 10:33 AM
Figured out why it's not working (NamingRules are run as one MultiRule which is not ConfigAware so no suppressors are used): https://github.com/detekt/detekt/issues/4230
👍 2
b

Brais Gabin

11/03/2021, 3:00 PM
Thank you for the research!
g

gammax

11/03/2021, 4:24 PM
Shouldn’t be a hard fix right?
b

Brais Gabin

11/03/2021, 5:27 PM
No, I think that it shouldn't be a difficult one.
30 Views