Custom Detekt Rule Question #4582
Unanswered
th-jtullgren
asked this question in
Q&A
Replies: 1 comment
-
I'm failing to understand this rule. Could you please provide more examples + some real-world use case for this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am looking to create a rule to check for duplicate uses of integers for subtypes of a specific interface. Example:
In the above example I want to log a code smell saying that MyEnumB duplicates the anInt value by using 1 again.
I am not very familiar with Psi and could not readily figure out which visitor method(s) could provide me the data I need to check. I have written this rule using the Android API Lint but I want to stick with just Detekt if possible.
Example of the Android Api Lint Rule:
Any help would be appreciated on which methods in the Rule api I need to use.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions