detekt / detekt

Static code analysis for Kotlin
https://detekt.dev
Apache License 2.0
6.07k stars 751 forks source link

Create a property to store the `basePath` #7241

Open BraisGabin opened 2 weeks ago

BraisGabin commented 2 weeks ago

Expected Behavior

It's easy to find the basePath on the detekt API.

I would vote to add a val basePath: Path inside SetupContext and use it instead of getOrNull(DETEKT_OUTPUT_REPORT_BASE_PATH_KEY).

Current Behavior

It's not, we are storing in an user property and you need to know the constant to read its value.

Context

https://github.com/detekt/detekt/pull/7234#discussion_r1581766941