Hello! Is it possible to have a rule (e.g. Forbidd...
# detekt
e
Hello! Is it possible to have a rule (e.g. ForbiddenMethodCall) multiple times but with different rule properties? In my case, I want to forbid different methods but in different sourceset, so ideally I could do something like
Copy code
ForbiddenMethodCall:
    active: true
    excludes: ['**/main/**'
    methods:
      - value: 'kotlin.assert'
  ForbiddenMethodCall:
    active: true
    excludes: ['**/test/**']
    methods:
      - value: 'kotlin.io.print'
n
Not currently no but it's on the roadmap for detekt 2.0 https://github.com/detekt/detekt/issues/6738
đź‘Ť 3
thank you color 2
g
Nope this is not possible tody