Integrating detekt in the Workflow | raywenderlich.com

Learn how to integrate the powerful detekt tool in Android app development to help detect and prevent code smells during the development process.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/24470020-integrating-detekt-in-the-workflow

hi,
Integrate detekt tool in android i face one issue. i added custom rule then generate baseline file then i got = Property ‘synthetic-import-rule’ is misspelled or does not exist.
if i not custom rule then baseline working fine.

Hi,

Have you followed all the steps outlined in the tutorial, especially the part where you’re supposed to include your custom ruleset module in your main app module? Failing to do this can result in that error.

Also note: You need to add your CustomRuleSetProvider to let detekt know about your new rule set.

Let me know if you’ve done all the above.

Hi sir,

Thanks for your response. Yes sir i correctly configured but i use android terminal for checking purpose. i face the problem when android terminal i run this commands (gradlew detektBaseline). now i use gradle task to check detekt and detektbaseline. so that is working fine.

Thank you

Hi,

Now I get where your issue is. With detekt baseline there’s really a lot you’ll need to cross-check in terms of paths and so on. If it’s that of a problem, you can disable the custom rule set them setup your baseline first.

Regards,

Harun