You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It can be any rule, but one example that comes to my head is rule that verifies clean architecture layers (verify dependency rule correctness) - make sure that class defined in ...domain layer does not uses any classes from other layers (have imports from other layers).
Another idea would be the rule to Verify that every class that extends androidx.lifecycle.ViewModel class has ViewModel suffix
Also maybe we could also add tests for this rules 🤔
We could write custom detekt rule.
It can be any rule, but one example that comes to my head is rule that verifies clean architecture layers (verify
dependency rule
correctness) - make sure that class defined in...domain
layer does not uses any classes from other layers (have imports from other layers).Another idea would be the rule to Verify that every class that extends
androidx.lifecycle.ViewModel
class hasViewModel
suffixAlso maybe we could also add tests for this rules 🤔
More:
https://arturbosch.github.io/detekt/extensions.html
https://proandroiddev.com/writing-custom-lint-rules-for-your-kotlin-project-with-detekt-653e4dbbe8b9
https://medium.com/@vanniktech/writing-your-first-detekt-rule-ee940e56428d
The text was updated successfully, but these errors were encountered: