Lots of issues using CLI but no issues when using Jar Bazel #4888
manwinder123
started this conversation in
General
Replies: 1 comment 6 replies
-
Could you clarify how you're using Detekt? Are you depending on the Detetk Jar and running it as part of a Java/Kotlin application? Can I ask you why you're doing this? As a rule of thumb, you should be able to achieve the same results between the CLI and calling detekt from the .api package. That's how we're implementing the Gradle Plugin. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Expected Behavior
When I run
detekt
command in terminal it returns a bunch of issues, such asImplicitDefaultLocale
but when I am runningdetekt
using the libraryio.gitlab.arturbosch.detekt.api
I get 0 issues.Steps to Reproduce
Here is my
ProcessingSpec
:I've modified the options a few times, providing a config yaml file as well, haven't seen any changes to issue output.
When I call
DetektProvider.load().get(processingSpecHere).run()
and debug the application I find the following things:Inside
Lifecycle
internal interface, the functionanalyze
is called, it has the correctfilesToAnalyze
, theprocessors
list contains 11 processors (KtFileCount
,PackageCount
,ClassCount
, ...), the theruleSets
contain only 1 item, which isPerformanceProvider
(I think this may be the issue?).The returned
Detektion
object contains 0 finding items (should have at least 1ImplicitDefaultLocale
), 0 notification items,. 5 metric items, 6 userdata itemsThat is for the first 2 items, there are about 309 files I pass to Detekt.
Thanks for any help :)
Context
Trying to run Detekt on a codebase
Your Environment
Beta Was this translation helpful? Give feedback.
All reactions