Co-authored-by: Goooler <wangzongler@gmail.com>
Co-authored-by: Nicola Corti <corti.nico@gmail.com>
This commit is contained in:
Matthew Haughton
2022-04-12 09:12:58 +10:00
committed by GitHub
parent d28d0af28c
commit 8939aedb42
17 changed files with 56 additions and 362 deletions

View File

@@ -10,9 +10,8 @@
- We use [JUnit 5](https://junit.org/junit5/docs/current/user-guide/) for testing. Please use the `Spec.kt` suffix on
new test classes. If your new rule requires type resolution (i.e. it utilises `BindingContext`) then annotate your
test class with `@KotlinCoreEnvironmentTest` and have the test class accept `KotlinCoreEnvironment` as a parameter.
See `SpekTestDiscoverySpec.kt` in the `custom-checks` module for a complete example.
- We are in the process of migrating existing [Spek](https://github.com/spekframework/spek) tests to JUnit 5. For easier
testing of these tests you might want to use the [Spek IntelliJ Plugin](https://plugins.jetbrains.com/plugin/10915-spek-framework).
See "Testing a rule that uses type resolution" section of the [Using Type Resolution](../docs/pages/gettingstarted/type-resolution.md)
guide for details.
- Feel free to add your name to the contributors list at the end of the readme file when opening a pull request.
- The code in `detekt-api` and any rule in `detekt-rules` must be documented. We generate documentation for our website based on these modules.
- If some Kotlin code in `resources` folder (like `detekt-formatting`) shows a compilation error, right click on it and use `Mark as plain text`.