Comments (2)
Below TC is passing though
@Test
fun `does report private logger property in top level`() {
val code = """
private val logger = 2
""".trimIndent()
assertThat(subject.lintWithContext(env, code))
.hasSize(1)
}
is your type resolution set properly?
from detekt.
Hi,
sorry for the late answer, one of my Outlook filters has eaten up the notification.
I've tried to run 'detektMain' wich gave me a lot of new findings but the unused logger property was still ignored.
Then I tried to assign the value '2' to logger, like in your test. That was found by both, the 'detekt' and the 'detektMain' task.
After that, I tried to assing 'private val logger = Logger.getLogger("foo")' and that was also found.
It must have something to do with the 'KotlinLogging.logger {}'.
from detekt.
Related Issues (20)
- False negative for enum constants in UndocumentedPublic* rule group HOT 2
- `RedundantSuspendModifier` false-positives with extension functions HOT 3
- False-positve `UnusedImports` when there are mutiple functions of the same name
- Create a property to store the `basePath`
- Alias ObjectPropertyNaming as ObjectPropertyName
- StringLiteralDuplication potential false positive with interpolated strings HOT 3
- NamedArguments: False positive on spread varargs
- Ignore / Suppress specific magic number warning in detekt baseline.xml for a Compose function HOT 1
- detekt-core shouldn't depend on detekt-psi-utils HOT 2
- ignoreFailures doesn't work when using gradle workers
- False positive `SwallowedException` when exception is used as a receiver
- Multiline strings may occur parse error HOT 3
- "Missing new line after {" is reported incorrectly in nested lambda
- Incorrect report of error - UnsafeOptInUsageError HOT 2
- MatchingDeclarationName - Not detecting method names - Jetpack Compose HOT 10
- The issue arises when I move the detekt-baseline.xml file from its default path (project/app/detekt-baseline.xml) to a new location (project/config/detekt/detekt-baseline.xml). HOT 3
- MissingPackageDeclaration - Incorrect issue reported.
- Add 2.0.0 language version compatibility to detekt-compiler-plugin
- Remove deprecated configuration items HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from detekt.