https://github.com/r0adkll/danger-kotlin
⚠️ Stop saying "you forgot to …" in code review
https://github.com/r0adkll/danger-kotlin
culture danger danger-kotlin kotlin
Last synced: 5 months ago
JSON representation
⚠️ Stop saying "you forgot to …" in code review
- Host: GitHub
- URL: https://github.com/r0adkll/danger-kotlin
- Owner: r0adkll
- License: mit
- Created: 2024-08-24T19:17:32.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-16T10:49:31.000Z (6 months ago)
- Last Synced: 2025-12-19T01:58:20.010Z (6 months ago)
- Topics: culture, danger, danger-kotlin, kotlin
- Language: Kotlin
- Homepage: https://r0adkll.github.io/danger-kotlin/
- Size: 3.34 MB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
⚠️ Stop saying "you forgot to …" in code review in Kotlin
# 🧪 Project status 🧪
This project is currently in **_Beta_**
This was forked from [danger/kotlin](https://github.com/danger/kotlin) to undergo extensive project maintenance and opinionated changes that felt should
stand in its own repository. I don't plan on changing the namespacing of classes, except for artifact targets, to maintain
as much compatibility between the two. However, there may be a point at which I deviate from this as the project continues to
grow.
---
[](https://danger.systems/kotlin/)
[](https://search.maven.org/search?q=g:%22com.r0adkll%22%20AND%20a:%22danger-kotlin-sdk%22)
[](https://oss.sonatype.org/content/repositories/snapshots/com/r0adkll/danger/)
### :warning: https://r0adkll.github.io/danger-kotlin/
# Setup
**Mac - Apple Silicon**
```shell
brew install r0adkll/tap/danger-kotlin
```
**Mac - Intel**
```shell
brew install r0adkll/tap/danger-kotlin-intel
```
**Linux**
```shell
bash <(curl -s https://raw.githubusercontent.com/r0adkll/danger-kotlin/main/scripts/install.sh)
source ~/.bash_profile
```
---
# IntelliJ Plugin
This repository boasts an [IntelliJ Plugin](intellij-plugin/) that you can install to automatically load the
custom Danger kotlin script definition into the IDE for syntax highlighting and autocomplete.
Install the latest version via https://plugins.jetbrains.com/plugin/26699-danger-kotlin
or
Directly in your IDE via
```
Plugins --> Marketplace --> Danger Kotlin
```
> [!NOTE]
> Custom Kotlin script definitions are still a bit wonky in the IDE so sometimes it can take a restart, or another file resolving for it to "settle down"
### Run Configurations
The plugin will also automatically detect `danger(args) {…}` in your Dangerfiles and provide a ▶︎ icon in the gutter for
testing your scripts directly in the IDE
### GitHub Plugin Integration
The plugin is also integrates with the built-in [GitHub Plugin][] to automatically detect open PRs for your current branch.
This allows you to run a `danger-kotlin pr` command directly from the IDE without having to copy the PR url. It will also
automatically hydrate the runtime environment with the auth token and host/api url information based on the remote you have configured
in `git`.
Additionally, it will use git to determine if you are on a branch that is not a base branch (i.e. `master`, `main`, `develop`) and
give you an option to run `danger local` against your base.
---
# Github Actions / CI
Danger has prebuilt images that you can use in your workflows
https://github.com/r0adkll/danger-kotlin/pkgs/container/danger-kotlin
In order to import one of those use the `docker://` prefix, like so:
```yml
jobs:
build:
runs-on: ubuntu-latest
name: "Run Danger"
container:
image: docker://ghcr.io/r0adkll/danger-kotlin:
steps:
- uses: actions/checkout@v4
- name: Run Danger
run: danger-kotlin ci --failOnErrors --no-publish-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
---
# Authors
`danger-kotlin` was originally developed by [@gianluz][] and [@f-meloni][] @ [danger/kotlin](https://github.com/danger/kotlin)
and forked by [@r0adkll][]
[@f-meloni]: https://github.com/f-meloni
[@gianluz]: https://github.com/gianluz
[@r0adkll]: https://github.com/r0adkll
[GitHub Plugin]: https://plugins.jetbrains.com/plugin/13115-github