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
Run custom rules on Android #2285
Comments
Is your project on Github? Can you share it so we can check the whole configuration? |
Unfortunately It is not on Github |
Can you provide more context? |
I've created a custom config file. When I'm adding a detekt rule (like empty constructor), it works, but with my custom rule it is not able to find a problem |
Please take a look at how mozilla configured their custom detekt rules inside an Android project: https://github.com/mozilla-mobile/fenix/blob/master/build.gradle |
Hi! I have similar issue. In my case when I try to add my custom ruleset block inside
I used mozilla example and it does not works in my project. My detekt version was 1.4.0. After several hours I tried to downgrade detekt version like in mozilla repo (1.0.0-RC16) and it works!! No other changes was made. I suppose something is broken in new detekt versions. Or maybe there are undocumented changes for detekt custom rules integration. I've tried several different detekt versions: 1.0.0-RC16 - works |
@SergJ4 The config validation was introduced to "protect" users from misspelling property names. We could automatically add a generic |
@arturbosch, thanks a lot! It works now. I saw this paragpraph, but I misunderstood it. I thought that if it uses |
Hi. I am trying to run my custom rules on Android project, but it seems not working.
Here is my project build.gradle file
Here is the app level build.gradle file
My custom config is:
My custom rule provider is:
TooManyFunctions() I took from your example.
The text was updated successfully, but these errors were encountered: