Zac Sweers
12/01/2022, 9:26 PMeygraber
12/02/2022, 12:01 AMgammax
12/02/2022, 8:52 AMwe’ve been surprised to find it runs even slower than android lint (!!)That sucks 😐 Is it consistently slower? The answer to those kind of problems is to use our compiler plugin as currently enabling TR effectively ends up costing as much as a new Kotlin compilation.
gammax
12/02/2022, 8:52 AMZac Sweers
12/02/2022, 2:58 PMgammax
12/02/2022, 4:09 PMBrais Gabin
12/02/2022, 6:41 PMZac Sweers
12/03/2022, 9:43 PMZac Sweers
12/03/2022, 9:45 PMgammax
12/04/2022, 1:08 PMgammax
12/04/2022, 1:09 PMBrais Gabin
12/04/2022, 3:01 PMZac Sweers
12/06/2022, 8:24 PMZac Sweers
12/06/2022, 8:25 PMgammax
12/06/2022, 9:23 PMZac Sweers
12/06/2022, 9:23 PMgammax
12/06/2022, 9:25 PMchao
12/07/2022, 4:31 AMK2 support: it’s something we should definitely look into. I’m planning to look into it over the Xmas breakEarly start: https://github.com/detekt/detekt/tree/k2
we’ve been surprised to find it runs even slower than android lintProviding a datapoint for a large-scale Android app, lint runs for 10min for our codebase and detekt with type resolution runs for 6 min (we also run twitter-compose-rules) as well
are there ways to diagnose how long detekt checks takeIf there is a buildscan to share it would be great, however it is a known issue that type resolution does redundant work of running compilation twice.
also - how does baseline generation work with the plugin?My thoughts around baseline is that • When embarking adopting Detekt, baseline is super useful • When continuing upgrading Detekt, baseline often gets updated as the KtElement signature becomes implementation detail of Kotlin compiler and is very subjective to change. • In the longer term, I found annotation-based suppression is more useful and we can link to the Github issue in the code stating why a suppression is needed
chao
12/07/2022, 4:33 AMZac Sweers
12/07/2022, 4:48 AMHow comes you enabled Type Resolution?Well, we’d like to run without blind spots basically. Many checks more or less don’t work in syntactic checks only (including ones that really matter to us), they’re quite noisy about the lack of type resolution, etc. If anything, I’m surprised that you’re surprised 😛. I figured the question would why not use type resolution?
Zac Sweers
12/07/2022, 4:49 AMZac Sweers
12/07/2022, 4:50 AMIf there is a buildscan to share it would be greatUnfortunately this is only really an issue in our internal repo 😕
> also - how does baseline generation work with the plugin?I meant this question as a functional piece – the compiler plugin doesn’t have its own task, so how does it produce baseline files. Not intended as a philosophical one, sorry I was unclear.
chao
12/07/2022, 5:00 AM:app:detektInternalDebugAndroidTest
has too many files? The Android codebase does not run detekt on non-main (e.g. test files), hence that might cut off the execution time.
Although the counterargument could be that why test code does not have the same quality as production code.Zac Sweers
12/07/2022, 5:03 AMchao
12/07/2022, 5:07 AMchao
12/07/2022, 5:08 AMZac Sweers
12/07/2022, 5:11 AMchao
12/07/2022, 5:12 AMZac Sweers
12/07/2022, 5:13 AMZac Sweers
12/07/2022, 5:13 AMFound 409 tasks executed in 409 projects totaling 1h 8m 45.581sDetekt tasks
Found 750 tasks executed in 395 projects totaling 3h 34m 13.458s
Zac Sweers
12/07/2022, 5:15 AMZac Sweers
12/07/2022, 5:16 AMZac Sweers
12/07/2022, 5:17 AMZac Sweers
12/07/2022, 5:18 AMZac Sweers
12/07/2022, 5:18 AMchao
12/07/2022, 5:21 AMchao
12/07/2022, 5:22 AM-Pdetekt-dry-run=true
Zac Sweers
01/20/2023, 10:56 PMgammax
01/23/2023, 7:09 PM0.4.0
from main + add a note on the readme + archive the repo). Next stable version will be 1.23.0
gammax
01/26/2023, 1:02 AMgammax
01/26/2023, 1:03 AMZac Sweers
01/26/2023, 1:34 AMgammax
01/27/2023, 2:46 PM