Skip to content

Commit

Permalink
Write up README
Browse files Browse the repository at this point in the history
  • Loading branch information
xcq1 committed Jan 18, 2023
1 parent 5b4a700 commit eaa73c7
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
# Detekt custom rule template
# Meisterplan Detekt Rules

This repository is a template. You can use it to generate your own repository to write and share your custom rules.
This repo contains [Detekt](https://detekt.dev/) Rules useful for developing [Meisterplan](https://github.com/meisterplan).

## 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`.

[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/
Look up the [most recent version](todo) and add the dependency to your `build.gradle.kts`:
```kotlin
repositories {
// ...
maven { url = uri("https://jitpack.io") }
}

dependencies {
// ...
detektPlugins("com.meisterplan.detektrules:detekt-rules:VERSION")
}
```

And configure your detekt configuration (usually `detekt-overrides.yml`) by enabling the desired rules:
```yaml
meisterplan:
CopyOnDataClassWithNonPublicConstructor:
active: true
# ...
```

0 comments on commit eaa73c7

Please sign in to comment.