Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/detekt/detekt-custom-rule-template
A template to create custom rules for detekt
https://github.com/detekt/detekt-custom-rule-template
custom-rules detekt detekt-plugin detekt-rules static-analysis
Last synced: 8 days ago
JSON representation
A template to create custom rules for detekt
- Host: GitHub
- URL: https://github.com/detekt/detekt-custom-rule-template
- Owner: detekt
- License: apache-2.0
- Created: 2021-07-22T18:43:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-25T08:10:27.000Z (8 months ago)
- Last Synced: 2024-04-14T06:47:16.059Z (7 months ago)
- Topics: custom-rules, detekt, detekt-plugin, detekt-rules, static-analysis
- Language: Kotlin
- Homepage:
- Size: 253 KB
- Stars: 24
- Watchers: 2
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: change_package_name.sh
- License: LICENSE
Awesome Lists containing this project
README
# detekt custom rule template
This repository is a template. You can use it to generate your own repository to write and share your custom rules.
## How to use it
1. Create a new repository using this one as a template. [Click here][create_template]
2. Edit MyRule to fit your use case
3. Share your rule! You can upload your rule to [Maven Central][maven_central] if you want. If you don't want to do all
the steps that Maven Central requires you can just share your rule using [jitpack][jitpack].
4. Extra: you can remove all this README and explain what your rule does and how to configure it.## Documentation
You can find the documentation about how to write [custom rules here][custom_rule_documentation].
## Note
- Remember that, by default, all rules are disabled. To configure your rules edit the file in
`src/main/resources/config/config.yml`.
- Once you have your rules ready you can publish them on the [detekt's marketplace][detekt_marketplace] to improve the discoverability. To do so create a PR editing [this file][detekt_marketplace_edit].[create_template]: https://github.com/detekt/detekt-custom-rule-template/generate
[maven_central]: https://search.maven.org/
[custom_rule_documentation]: https://detekt.github.io/detekt/extensions.html
[jitpack]: https://jitpack.io/
[detekt_marketplace]: https://detekt.dev/marketplace
[detekt_marketplace_edit]: https://github.com/detekt/detekt/blob/main/website/src/data/marketplace.js