Skip to content

Can't find DangerFileScript in Kotlin Scripting #276

Open
@gulomov

Description

@gulomov

Hello people, I am trying to activate the autocomplete, and after adding Script template classes and Script templates classpath
Screenshot 2024-04-12 at 13 19 34

I want to activate DangerFileScript but don't see it in Kotlin Scripting.

Screenshot 2024-04-12 at 13 25 00

I see this cause of errors (Unresolved reference: danger) in my Dangerfile.df.kts

`import systems.danger.kotlin.*

danger(args) {

onGitHub {

    // Big PR Check
    if ((pullRequest.additions ?: 0) - (pullRequest.deletions ?: 0) > 300) {
        warn("Big PR, try to keep changes smaller if you can")
    }

    // Work in progress check
    if (pullRequest.title.contains("WIP", false)) {
        warn("PR is classed as Work in Progress")
    }
}

}`

Am I missing something or doing something wrong?
Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions