https://github.com/NFesquet/danger-kotlin_detekt
https://github.com/NFesquet/danger-kotlin_detekt
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/NFesquet/danger-kotlin_detekt
- Owner: NFesquet
- License: mit
- Created: 2018-09-21T08:06:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-17T12:04:04.000Z (12 months ago)
- Last Synced: 2025-04-04T17:50:21.825Z (about 1 month ago)
- Language: Ruby
- Size: 34.2 KB
- Stars: 17
- Watchers: 0
- Forks: 19
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-danger - danger-kotlin_detekt - Detekt files of a gradle based project, using [Detekt](https://github.com/arturbosch/detekt) tool. (Plugins / Ruby (danger))
README
### kotlin_detekt
Detekt files of a gradle based Android project.
This is done using the Android's [Detekt](https://github.com/arturbosch/detekt) tool.
Results are passed out as tables in markdown.Running KotlinDetekt with its basic configuration
kotlin_detekt.detektRunning KotlinDetekt with a specific gradle task
kotlin_detekt.gradle_task = "detektCheckMyFlavorDebug"
kotlin_detekt.detektRunning KotlinDetekt for a specific severity level and up
# options are ["warning", "error"]
kotlin_detekt.severity = "error"
kotlin_detekt.detekt#### Attributes
`report_file` - Location of Detekt report file
If your Detekt task outputs to a different location, you can specify it here.
Defaults to "build/reports/detekt/detekt-checkstyle.xml".`gradle_task` - Custom gradle task to run.
This is useful when your project has different flavors.
Defaults to "detektCheck".`severity` - Defines the severity level of the execution.
Selected levels are the chosen one and up.
Possible values are "Warning", "Error" or "Fatal".
Defaults to "Warning".`filtering` - Enable filtering
Only show messages within changed files.Additionally, you can further filter to only the modified lines by setting the `filtering_lines` parameter to `true`.
`skip_gradle_task` - Skip gradle task
#### Methods
`detekt` - Calls Detekt task of your gradle project.
It fails if `gradlew` cannot be found inside current directory.
It fails if `severity` level is not a valid option.
It fails if `xmlReport` configuration is not set to `true` in your `build.gradle` file.