dazza5000
04/19/2022, 9:51 PMdaz@daz:/source/source/well/consumer-android-ui-2$ git status
On branch MOB-310-integrate-ktlint
Your branch is up to date with 'origin/MOB-310-integrate-ktlint'.
nothing to commit, working tree clean
daz@daz:/source/source/well/consumer-android-ui-2$ ./gradlew :app:ktlintDebugSourceSetCheck
Configuration on demand is an incubating feature.
BUILD SUCCESSFUL in 919ms
16 actionable tasks: 1 executed, 15 up-to-date
(failed reverse-i-search)`forma': git reset --hard origin/MOB-1190-calculate-height-^Cr-list-items
daz@daz:/source/source/well/consumer-android-ui-2$ ./gradlew :app:ktlintDebugSourceSetFormat
Configuration on demand is an incubating feature.
BUILD SUCCESSFUL in 1s
16 actionable tasks: 2 executed, 14 up-to-date
daz@daz:/source/source/well/consumer-android-ui-2$ git status
On branch MOB-310-integrate-ktlint
Your branch is up to date with 'origin/MOB-310-integrate-ktlint'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: app/src/debug/java/co/foo/data/session/LocalSessionDataSource.kt
modified: app/src/debug/java/co/foo/util/FlipperUtil.kt
no changes added to commit (use "git add" and/or "git commit -a")
nuhkoca
04/20/2022, 1:53 PMdazza5000
04/20/2022, 2:14 PMdazza5000
04/22/2022, 6:33 PMVivek Modi
04/29/2022, 8:46 AMwhen setting up our modules & their corresponding dependencies I think we should have a rule that we always need to add a classifier declaration. This makes things crystal clear when we revisit the modules. So for example instead of
viewModel { ConsultationViewModel(networkSessionScope.get(), get()) }
we would have
viewModel { ConsultationViewModel(addressRepository = networkSessionScope.get(), consultationsRepository = get()) }
Just makes the solution more readable. I just want to check only specific file, not in whole projectDavid Smith
05/24/2022, 4:35 PMDavid Smith
05/24/2022, 5:05 PMktlintMainSourceSetCheck
the old version of the rule is used. The compiled custom rule is cached somewhere but I can’t work out how to remove itJonathan Lennox
05/25/2022, 6:57 PMval snapshot: Snapshot
get() {
val bucketCounts = Array(thresholdCounts.size) {
- i ->
+ i ->
Pair(Pair(thresholds[i], thresholds[i + 1]), thresholdCounts[i].sum())
}
Why is it better to have the variable indented like that? It seems odd to me.nuhkoca
05/31/2022, 9:21 AMExecution failed for task ':data:runKtlintFormatOverKotlinScripts'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
> com/pinterest/ktlint/core/KtLint$Params
Stacktrace in the threadPaweł Łukasz
06/13/2022, 3:18 PM() -> Unit
in nested function
Theme.kt:
@Composable
fun MusicApp_theme(
darkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable () -> Unit
) {
val colors = if (darkTheme) {
DarkColorPalette
} else {
LightColorPalette
}
MaterialTheme(
colors = colors,
typography = Typography,
shapes = Shapes,
content = content
)
}
Paul Dingemans
06/19/2022, 7:56 PMU9G
06/19/2022, 9:57 PMSha Sha Chu
06/21/2022, 9:02 PMEmil Kantis
06/22/2022, 6:56 AMorg.jlleitschuh.gradle.ktlint
) or ktlint itself?
java.lang.NoClassDefFoundError: com/pinterest/ktlint/core/KtLint$Params
at org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction.execute(KtLintWorkAction.kt:52)
Paul Dingemans
06/22/2022, 7:14 AMEmil Kantis
06/22/2022, 7:27 AMJeremy Mailen
06/22/2022, 3:43 PMPaul Dingemans
06/26/2022, 7:32 PMnbadal
07/01/2022, 4:34 AMkenkyee
07/01/2022, 2:11 PMStylianos Gakis
07/05/2022, 3:15 PMcom.android.library
module?
I’ve got a simple module which is setup to be a com.android.library and also applies this ktlint setup.
However in the end, in the files that are contained in this core-common module things do not get formatted at all. :core-common:ktlintCheck
doesn’t find an error and ktlintFormat doesn’t edit them at all either.
It’s weird because I do the exact same setup on my app module which is a com.android.application instead and it works perfectly fine.
I’ve also tried stuff like applying the plugin only to that one module but still nothing, it only works on my application module.
If anyone else who’s using the plugin in a multi-module setup like this has any ideas I would really appreciate it.
(.editorconfig used is here and I am using ktlint gradle plugin 10.3.0 with ktlint “0.45.2”)Emil Kantis
07/06/2022, 6:17 AMjeff
07/14/2022, 6:18 PMExceeded max line length (120) (cannot be auto-corrected) (max-line-length)
Why can't line length be auto-corrected? IntelliJ auto-corrects it just fine. Any alternative settings or different tools that can do better?Paul Dingemans
07/25/2022, 6:11 PMStylianos Gakis
08/02/2022, 3:51 PMPiotr Krzemiński
08/04/2022, 10:33 AMPaul Dingemans
08/04/2022, 11:07 AMEmil Kantis
08/10/2022, 7:10 PMspacing-between-declarations-with-annotations
? 🧵Paul Dingemans
08/20/2022, 12:14 PMPaul Dingemans
08/20/2022, 12:14 PMSha Sha Chu
08/20/2022, 6:49 PMthe indent rule finally supports disabling/enabling the rule for a block in the middle of the file.
a welcome change. Thanks, Paul!