-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Docker instructions and syntax highlighting tips #305
Open
hubertgrzeskowiak
wants to merge
1
commit into
danger:master
Choose a base branch
from
hubertgrzeskowiak:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,11 @@ danger(args) { | |
|
||
### Setup | ||
|
||
### Docker | ||
```sh | ||
docker run --rm -v "${PWD}:/code" -w /code ghcr.io/danger/danger-kotlin:1.3.3 danger-kotlin local | ||
``` | ||
|
||
#### macOS (ARM) | ||
```sh | ||
brew install danger/tap/danger-kotlin | ||
|
@@ -130,6 +135,9 @@ You can activate the autocomplete following this additional steps: | |
- Make sure the script template `DangerFileScript` is active and above the default `Kotlin Script` | ||
- Apply changes | ||
- If opening the `Dangerfile.df.kts` the autocomplete and syntax highlighting doesn't work, try to reboot your IDE or open the Dangerfile from your IDE as a single file. | ||
- If it still doesn't work, go to `Help -> Edit Custom VM Options...` and add `-Dkotlin.script.classpath=<path>/danger-kotlin.jar` (replace the `<path>` with the absolute path to the JAR). Then restart the IDE. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually ran this tool without installing. I got the JAR from the Docker image using
|
||
- You may also need to disable the "K2 mode" (search the settings for it) if you enabled it previously. | ||
|
||
|
||
### Using external maven dependencies into your Dangerfile | ||
You can use any external dependency by adding the following lines at the top of your `Dangerfile.df.kts` | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would theoretically also work without changing the work directory, but the default dir is the root, so mounting the current working directory there could override existing files. Mounting it in a new dir and using that for running the command seems much safer.