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
Add config generator for custom rules #5080
Add config generator for custom rules #5080
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5080 +/- ##
============================
============================
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thanks for doing this.
|
I agree with @cortinico but should we include it in our current gradle plugin? Or should we create a different one? 99.9% of our users will not use this action. |
Yes it should be inside the plugin, but as a separate Task. Ideally we should not register the task by default, but let users do so if they wish |
Hello everyone! What I'm trying to do is to call a function in
|
Hey @VitalyVPinchuk 👋 Happy to follow up.
I would suggest against doing this ☝️ Which function specifically are you looking into copying? The reason you can't depend on |
Hi @cortinico
Okay, I got it, I won't!
How do I pass through the
Okay, we'll leave it as it is :) No dependencies. |
I'm on mobile now, but essentially what the |
f12bb7f
to
fca968b
Compare
OMG! |
fca968b
to
21e49b6
Compare
I like the idea. If we have a cli in the future we can iterate and wrap it inside a gradle plugin or whatever we want. It will not be the more published solution but it's a tool that solves the problem. |
991d229
to
088ebb7
Compare
Hi! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :) Thanks for this work :)
It seems that the fails on Windows are "legit". Could you take a look? |
I've tried to fix it but Windows still can't find file |
detekt-generator/src/main/kotlin/io/gitlab/arturbosch/detekt/generator/Generator.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Brais Gabín <braisgabin@gmail.com>
@BraisGabin thanks, it works! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review, I think we're fine with this and we can merge it 🎉 Sorry for the back and forth but it was also a bit unclear for us how we wanted this feature to look like.
Last thing to do (as a follow-up) would be to write a short paragraph on the website about this.
Work in progress
For #4457
This is just a draft to understand if I'm doing it the right way.
Please, share your thoughts.
Created gradle task
generateCustomConfig
by copyinggenerateDocumentation
which accepts source path for rules and creates config.yml in the path indicated in config parameter.