ralf
11/17/2020, 2:30 AM0.40.0
and filed three tickets:
https://github.com/pinterest/ktlint/issues/963
https://github.com/pinterest/ktlint/issues/964
https://github.com/pinterest/ktlint/issues/965
There are quite a few open indentation issues and they might be duplicates. I also saw some fixes in 0.40.0
. Is there a timeline when to expect a new release? Thanks!Colton Idle
12/06/2020, 9:57 AMhttps://youtu.be/KffXqIZ0tYg?t=531▾
Rob Elliot
12/15/2020, 8:35 PMDmitry
12/17/2020, 2:07 PMfilename
rule.
But ktlint is not reporting this to me. However my colleague just ran into this violation.
I am on macOS, he is on Linux (not sure if this matters).
Version: 0.40.0
Any ideas what I could try to debug/fix this issue?nhaarman
12/17/2020, 7:53 PM/usr/local/bin
, meaning that all your projects need to be on the same ktlint version. Now you probably don't want to include the ktlint
binary in every repo, but what about a Gradle-wrapper like script that downloads the ktlint binary?
Would that be something the repository might want to provide?neugartf
12/21/2020, 4:11 PM:ktlint
with SNAPSHOT-0.41.0? (gradle-6.7.1)
Execution failed for task ':ktlint'.
> Could not resolve all files for configuration ':ktlint'.
> Could not resolve com.pinterest:ktlint:0.41.0-SNAPSHOT.
Required by:
project :
> Cannot choose between the following variants of com.pinterest:ktlint:0.41.0-SNAPSHOT:20201220.202723-13:
- runtimeElements
- shadowRuntimeElements
All of them match the consumer attributes:
- Variant 'runtimeElements' capability com.pinterest:ktlint:0.41.0-SNAPSHOT:
- Unmatched attributes:
- Provides org.gradle.category 'library' but the consumer didn't ask for it
- Provides org.gradle.dependency.bundling 'external' but the consumer didn't ask for it
- Provides org.gradle.jvm.version '8' but the consumer didn't ask for it
- Provides org.gradle.libraryelements 'jar' but the consumer didn't ask for it
- Provides org.gradle.status 'integration' but the consumer didn't ask for it
- Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it
- Provides org.jetbrains.kotlin.localToProject 'public' but the consumer didn't ask for it
- Provides org.jetbrains.kotlin.platform.type 'jvm' but the consumer didn't ask for it
- Variant 'shadowRuntimeElements' capability com.pinterest:ktlint:0.41.0-SNAPSHOT:
- Unmatched attributes:
- Provides org.gradle.category 'library' but the consumer didn't ask for it
- Provides org.gradle.dependency.bundling 'shadowed' but the consumer didn't ask for it
- Provides org.gradle.libraryelements 'jar' but the consumer didn't ask for it
- Provides org.gradle.status 'integration' but the consumer didn't ask for it
- Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it
Alex Johnson
12/23/2020, 4:00 PMfun Validated<Nel<Violation>, Field<List<MyReallyLongObjectTypeName>>>.validate(): Validated<Nel<Violation>, Field<List<MyOtherReallyLongObjectTypeName>>> {
Most places cause a violation with ktlint, I'm wondering if a suppression for it is the best option for readability.chao
12/24/2020, 5:09 PMemrisb
01/26/2021, 11:47 AMSaidu E. Kamara
01/28/2021, 11:37 AMdata class DeviceMeasurementStatus(
val sensorType: DeviceSensorType,
val measurementMessage:
String,
val measurementState: MeasurementState
)
but not this:
data class DeviceMeasurementStatus(
val sensorType: DeviceSensorType,
val measurementMessage:
String,
val measurementState: MeasurementState
)
Shouldn’t both these formatting be flagged as an error?neugartf
02/02/2021, 11:45 PMtapchicoma
02/10/2021, 9:55 PM10.0.0
release (slightly delayed due to non-working Github action): https://github.com/JLLeitschuh/ktlint-gradle/blob/master/CHANGELOG.md#1000---20210209
Under-the-hood contains a lot of changes that opens a door to future improvements, but update should be easy. You should see runtime improvements in multimodule project from a clean state on running ktlintCheck
(ktlintFormat
) tasks, but slightly higher runtime in single module project (this should be addressed in the next release).gmarques
02/11/2021, 3:54 PMktlintCheck
task is always different between our CI (Linux) and my machine (MacOS) for the exact same code. What could be causing this?orafaaraujo
02/12/2021, 11:17 AM./gradlew ktlintFormat
) only in a selected file or package?
Thank you 🙂FareesHussain
02/16/2021, 6:10 AMPedro Alberto
02/28/2021, 3:38 PMbrew install ktlint
==> Downloading <https://homebrew.bintray.com/bottles/openjdk-15.0.1.arm64_big_sur.bottle.1.tar.gz>
#=#=#
curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
Error: Failed to download resource "openjdk"
Download failed: <https://homebrew.bintray.com/bottles/openjdk-15.0.1.arm64_big_sur.bottle.1.tar.gz>
Mervyn McCreight
03/17/2021, 2:37 PMkotlin_imports_layout = idea
in my .editorconfig
, which is deprecated now.
If I change that to ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
like suggested in the deprecation message, the linting with KTLint fails because of wrong import ordering. If I let ktlint format my source files it formats the imports alphabetically.
I'm using one of the gradle plugins (https://github.com/jlleitschuh/ktlint-gradle) mentioned in the README to integrate ktlint into my project.
Does anyone have any ideas? 🤔Henning B
04/01/2021, 3:08 PM[90m
and similar characters:
[90m/Users/henning.bunk/repos/work/wetter-app/[0mbuild.gradle.kts[90m:[0m38[90m:9:[0m Missing space after //
Any idea how to get rid of them?
I am on Mac and execute ktlint via gradlekenkyee
04/01/2021, 5:04 PMchao
04/03/2021, 4:59 PM> Dependency verification failed for configuration ':buildSrc:compileClasspath'
2 artifacts failed verification:
- dokka-gradle-plugin-0.10.1.jar (org.jetbrains.dokka:dokka-gradle-plugin:0.10.1) from repository MavenRepo
- dokka-gradle-plugin-0.10.1.pom (org.jetbrains.dokka:dokka-gradle-plugin:0.10.1) from repository MavenRepo
If the artifacts are trustworthy, you will need to update the gradle/verification-metadata.xml file by following the instructions at <https://docs.gradle.org/6.8.3/userguide/dependency_verification.html#sec:troubleshooting-verification>
This verification error is failing all PR checks now. Is this something we should be aware of? (I assume dokka jar was changed after created)orafaaraujo
04/23/2021, 7:34 AM* What went wrong:
Execution failed for task ':app:runKtlintCheckOverMainSourceSet'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
> Java heap space
I found this issue with a possible solution but I still can’t make it work… where should I add it?
Thanks in advancejmarkstar
05/19/2021, 12:38 AMAlex
05/19/2021, 8:35 AM0.39.0
to 0.41.0
and it seems like the rules for string indentation have changed (code in thread). Can we get the old behavior back somehow and does someone know the reasoning behind this change?Henning B
05/19/2021, 10:17 AMeygraber
06/11/2021, 8:10 AMindentSize
always ends up being 2. Is there an easy way to get the correct indentSize
or does it have to be calculated each time based on the PsiElement/ASTNode
and where it's positioned in the file?Ben Dodson
06/13/2021, 8:57 PMAlex
06/15/2021, 3:02 PMSha Sha Chu
07/29/2021, 4:10 PMBacho Kurtanidze
08/16/2021, 2:21 PMMisileLab
08/21/2021, 3:31 PMCode
else if (position2 == 7 && keys.pressing(<http://Key.SPACE|Key.SPACE>)) {
a = true
}
Another Code
MisileLab
08/21/2021, 3:31 PMCode
else if (position2 == 7 && keys.pressing(<http://Key.SPACE|Key.SPACE>)) {
a = true
}
Another Code
romtsn
08/21/2021, 7:49 PMelse
keyword has a newline in front, which is not what the rule expects