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 Rules Marketplace #5191
Detekt Rules Marketplace #5191
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5191 +/- ##
============================
============================
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This is very cool. This will incentivise creating new rules and will reduce the number of times we decline adding a new first party rule. One more thought: Should this be a general detekt plugin market place that also allows users to share other extensions such as processors and reports? I do not know if users actually use those extensions. |
Yup we could add a 'tag' to distinguish projects that include just rules or processors/reports. |
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.
Looks good!
One thought, maybe we can also move the 3rd party rules from the readme to the website.
Custom rules and reports from 3rd parties:
- detekt-verify-implementation by cph-cachet
- detekt-hint by mkohm is a plugin to detekt that provides detection of design principle violations through integration with Danger
- GitLab report format
- There are more third-party plugins out there. You can find some of them in this list.
This looks great! I just wonder about pros/cons of listing the specific rule name and whether the rules use type resolution or not... it puts extra effort on third party rule maintainers, contributors or us to keep this up to date. Perhaps that should be optional (if it's not already)? |
|
I can make this optional. I'm more worried of things getting out of sync (like rule authors would have to keep on updating the doc with new rules). Maybe that's not a problem at the moment given the low traffic 🤔 |
Yeah definitely that too. It's not the end of the world if it's not kept up to date though. And the nice thing is that the rule list gives a really good idea of what sort of things the rule set is going to check without having to click through to the project site. And as you mentioned they'll be included in the search index which is a really nice feature. Separately, again probably pros outweigh cons and I know why it was done, but having the dynamic If the dependency coordinates are left in it might also be good to list the actual repository that users will need in their list, e.g. say |
We could use something similar to #5080. My idea:
Pros:
Given the low traffic I think that the second is not a big deal and we can always remove the repo from the list. |
I'm a bit against this approach for a number of reason:
I would rather ask rule authors to add a |
You are completely right. I didn't think about the security concerns. But I still think that we shouldn't be the gate keepers for changes in the marketplace. I assume that for a rule author it would be easier to push something in its repo than forking ours, pushing, create a PR and wait for an approval. So I would vote for the Metadata file. |
I think we should be gatekeepers, since the content appears on the detekt site which we're ultimately responsible for. I think it's rare to have marketplaces that don't have moderation of some kind. For the initial version we can start with manual updates and perhaps pulling and parsing metadata from 3rd party repos can be considered later. |
c7b7d82
to
4e95dc7
Compare
I've added the tags now. The 4 available tags are
Made them optional 👍
I removed the whole Maven Coordinates/Maven Repo thing. I wasn't happy with how it would render. Plus I think users that want to use a rule will ultimately end up in their readme where the proper version can be displayed. A lot of rule were hosted on Github Packages which made the setup more complicated. Let me know if you folks are fine with this approach 👍 This is good to merge on my end 👍 |
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.
Yeah that's true 👍 I've added it. You can find in the next preview |
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 :)
I've added https://github.com/twitter/compose-rules/ |
LGTM |
This is an early draft of my idea of a 'Rules Marketplace' which is hosted on our website. Users will just have to edit the array on
rulesmarketplace.js
via the button I added on the header.I've already added 5 rulesets which I found online.
I'm looking into collecting some feedbacks on which fields we believe might be more useful for users to share. I've added a list of Rules as they will be indexed by Algolia so they will end up in the search results.
I haven't implemented a search bar as I was looking for a feedback on this proposal before developing more features.
Here a preview link: https://detekt-3usyfqpdp-detekt.vercel.app/marketplace
Fixes #4878