i'm trying to enforce using named parameters in ce...
# ktlint
j
i'm trying to enforce using named parameters in certain scenarios but you can't use those if the function is defined in java so it ends up producing a false positive sometimes. i currently just have a whitelist (for mostly android library code) but wasn't sure if there was a better way
a
Let me know if you find a solution! I recently posted in #detekt about the same concept but I haven't carved out time to try writing a rule for it yet.
Ideally you could suppress wherever it calls java, which may be a small price to pay but just depends on how much interrop you have, right?
j
Yeah, it was mostly getting annoying in android platform calls. like everywhere you inflate a layout you have
attachToRoot
but thats java so every fragment inflation would need to be surpressed
the whitelist seems to be an...okay solution ha
a
Any chance you can whitelist method names? Like could you do an app wide ignore for
inflate
and any other common ones? 🤔
j
yep, thats exactly what i'm doing
383 Views