Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly provide EditorConfig property types for Ktlint #2052

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

@paul-dingemans
Copy link

@Goooler It is implemented as documented and intended from the Ktlint perspective. This might also fix problems with .editorconfig properties below:

  • ktlint_argument_list_wrapping_ignore_when_parameter_count_greater_or_equal_than
  • ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than
  • ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than
  • ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than

@Goooler
Copy link
Member Author

Goooler commented Feb 25, 2024

Do you mean I can add both of them into the test fixture?

@paul-dingemans
Copy link

Do you mean I can add both of them into the test fixture?

What do you mean with 'both'? I have listed 4 properties which would result in an exception when set in .editorconfig with old spotless version.

@Goooler
Copy link
Member Author

Goooler commented Feb 25, 2024

Yeah, I meant these 4 rules. Would you suggest I add them into the test fixture?

@paul-dingemans
Copy link

Yeah, I meant these 4 rules. Would you suggest I add them into the test fixture?

No, that would not make sense to me. You will never be able to keep that list in sync with Ktlint whenever it would add a new property which has a non-string datatype. I just mentioned the other properties, so that it can be used in documentation, or to verify whether there are other (open) issues which are related.

@Goooler
Copy link
Member Author

Goooler commented Feb 25, 2024

Got it! Thanks again for your patience!

@Goooler Goooler requested a review from nedtwigg April 2, 2024 06:18
@nedtwigg nedtwigg merged commit 7118f6a into diffplug:main Apr 3, 2024
14 checks passed
@Goooler Goooler deleted the fix-ktlint-empty-rules branch April 3, 2024 07:06
@zengcanxiang
Copy link

@nedtwigg hi, In which version will this MR change be released?

@henningBunk
Copy link

@zengcanxiang I got errors with 6.25.0 but it works with 7.0.0.BETA1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants