Cannot get custom rules to work #5216
-
Hi, I try to integrate the custom rule into my work project, but I can not do it because the project can not find my rule. So I was trying first to create a clean project to try to integrate the custom rule. What I did, I've found a working project in gitHub and found this one https://github.com/ChoChoHtet/detekt-custom-rules , I cloned it and tried to run detekt and the custom rules work fine there, so I created my new project and tried to do the same things as in project I've cloned. But I still can not to make the project find the custom rule. It just ignores it. Help me please to solve the problem. Here is my project: https://github.com/AlexxChanov/TestCustomRules The project i've cloned show following:
So we can see that rules are working here
But in my project it doesn't show my custom rules:
I tried to copy all configurations, gradle version, detekt version, and so on, but it doesn't work in my project. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I'm moving this to the Discussions area, since this doesn't appear to be a bug at this stage. |
Beta Was this translation helpful? Give feedback.
-
The error seems like a dependency problem. As a side note, usually, we suggest to go with the official GitHub template to have a basic scaffolding for developing 3rd party rules. Another option is to clone the provided detekt/detekt-sample-extensions project. |
Beta Was this translation helpful? Give feedback.
The error seems like a dependency problem.
https://stackoverflow.com/questions/7421612/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder
As a side note, usually, we suggest to go with the official GitHub template to have a basic scaffolding for developing 3rd party rules. Another option is to clone the provided detekt/detekt-sample-extensions project.