I have a config file that I add using `setFrom`: ...
# detekt
e
I have a config file that I add using `setFrom`:
Copy code
MyRules:
  Rule1:
    active: false # true by default
  Rule2:
    active: true
and then another config file that I add using
setFrom
after the first one:
Copy code
MyRules:
  Rule2:
    active: false
I'm seeing violations for Rule1 even though I disabled it. I thought that the configs are merged sequentially, so shouldn't it stay disabled, or am I missing something?
e
setFrom()
removes all previous files, did you want
from()
which adds?
e
Probably 😬
Still seeing the issue after switching to
from
🤔
Are the configs merged FIFO or LIFO?
e
actually come to think of it. I'm not sure if `FileCollection`s are inherently ordered or not
e
In that case, how is the order determined for merging config files?
e
as far as I can tell, the detekt gradle plugin passes the config files to the detekt cli entry point in whatever order the filecollection iterates in
e
I'm using
Project.files()
so I'll have to check it out. I'd imagine that detekt would have some form of merging them in a stable order though, and I'd assume that was in insertion order.