Giter Club home page Giter Club logo

Comments (3)

BraisGabin avatar BraisGabin commented on June 3, 2024

Can you provide a reproducer? Which detekt version are you using? Which version of AS? How are you running the task from AS?

from detekt.

3flex avatar 3flex commented on June 3, 2024

Also in your description you mention two different commands:

  • gradle app:detekt (running in AS)
  • ./gradlew detekt (running from CLI)

Please make sure you're using the same commands in CLI and AS when you're investigating this issue.

You also seem to be using projectDir in your config, please make very sure that it's pointing to the right location after you move the file.

from detekt.

MudraPatel avatar MudraPatel commented on June 3, 2024

Android studio version - Koala | 2024.1.1 Canary 5
detekt version - 1.23.3

I have resolved this issue - by adding the path on both the build.gradle file (root and app)

The following path has been included in the build.gradle file at the app level.

detekt {
    config.setFrom("../config/detekt/detekt.yml") // point to your custom config defining rules to run, overwriting default 
    baseline = file("../config/detekt/detekt-baseline.xml") // a way of suppressing issues before introducing detekt
}

The following path has been included in the build.gradle file at the project level.

detekt {
    config.setFrom("$projectDir/config/detekt/detekt.yml") // point to your custom config defining rules to run, overwriting 
    baseline = file("$projectDir/config/detekt/detekt-baseline.xml") // a way of suppressing issues before introducing detekt
}

Now both worked - From Android Studio gradle tool and command line.

Thanks!

from detekt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.