Skip to content
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

MayBeConst should not report properties in local anonymous object declarations #2794

Closed
arturbosch opened this issue Jun 13, 2020 · 0 comments
Assignees
Milestone

Comments

@arturbosch
Copy link
Member

Expected Behavior

No detekt issues.

Observed Behavior

Anonymous object declarations in gradle scripts are reported.
Kotlin compiler reports syntax errors.

dependencies {
    val version = object {
        val spek = "2.0.11"
        val ktlint = "0.37.1"
    }
...

Steps to Reproduce

  1. Go to detekt-pom/build.gradle.kts
    2.Remove @file:Suppress("detekt.MayBeConst")
  2. Run detekt analysis via our @argsfile_linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants