Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detekt: Add Custom detekt rule #83

Open
igorwojda opened this issue Apr 19, 2020 · 0 comments
Open

Detekt: Add Custom detekt rule #83

igorwojda opened this issue Apr 19, 2020 · 0 comments
Labels
enhancement New feature or request ✍️ready to grab You can start working on this issue

Comments

@igorwojda
Copy link
Owner

igorwojda commented Apr 19, 2020

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 has ViewModel suffix

Also 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

@igorwojda igorwojda added enhancement New feature or request ✍️ready to grab You can start working on this issue labels Apr 19, 2020
@igorwojda igorwojda changed the title Detekt: Add Custom detekt rule Detekt: Add Custom detekt rule Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ✍️ready to grab You can start working on this issue
Projects
None yet
Development

No branches or pull requests

1 participant