https://kotlinlang.org logo
#ktlint
Title
# ktlint
s

sanggggg

01/27/2023, 7:25 AM
Hello, I’m using ktlint 0.48.x, and found that
standard:trailing-comma-*
rules strongly depend on execution of
standard:wrapping
rule . (this means that if wrapping is disabled, trailing-comma rules are disabled too) Is it right that this dependency was created for the following example?
Copy code
processFoo(Foo(
    a = 3,
    b = 4,
),) // it's weird to insert "," between unwrapped (continuated) parenthesis
And how about add some back link for this dependencies in trailing-comma rule documentation? (IMHAO it seems to be quite confusing for some users)
p

Paul Dingemans

01/27/2023, 8:30 AM
Indeed this is an example that shows the dependency between the rules. There might be more reasons and should be covered with unit test. Can you make a PR for the proposed change to the documentation?
s

sanggggg

01/27/2023, 9:21 AM
Thank you for detailed respond! I’ve been suffered hours for debugging silently disabled
trailing-comma
rule by
wrapping
rule disabled 😂 I will make some PR for document changes
107 Views