-
Notifications
You must be signed in to change notification settings - Fork 506
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
Cannot apply default formatting Kotest\StringSpec when migrate from 1.0.1 -> 1.3.0 #2722
Comments
For now, most practical approach will be to disable the |
It is nice to find you as a maintaner of this repo as well. I appreciate your contribution to community. I agree with you, it will work as temporary workaround. But in case of multi-module project, let's say 7 sub-modules, we have 7 folders with Tests. Each of them requires copy of .editorconfig file. But if we have many projects like that, then number of files will explode. I have to admit, in some cases (like mine), it is also possible to target all test files in single root .editorconfig file by adding a section Anyway, for the latest ktlint it is non-official formatting. Disabling official rules looks smelly. Could you consider to add support for this case in next versions of ktlint? Arguments are:
|
You can still upgrade to
See #2423, #2710 and #2711. I will close this issue as it will not be resolved until the aforementioned issues are resolved. That might take quit a long while though. Until that time, disabling the |
Yeah. I understand the pain and lack of time. As I've understood, you considering this as a "problem". |
Personally I do not consider it a problem but a conscious choice. But as you can read in #2423 there are more people not agreeing with that. Once, and if that issue is resolved, this issue is resolved as well which is the reason that I closed it as being duplicate. |
Hi, there!
My team uses in Kotlin projects:
ktlint
with codestylektlint_code_style = ktlint_official
.Ktlint
and Gradle pluginorg.jlleitschuh.gradle.ktlint
Kotest
withStringSpec
test style.Now my team uses
ktlint
version1.0.1
(hardcoded in IDE plugin and Gradle plugin). All tests look like it is described inKotest
documentation. See https://kotest.io/docs/framework/testing-styles.html#string-specWhen I try to migrate
ktlint
to version1.3.0
all tests have to be reformatted (with extra indent), because they violate rule https://pinterest.github.io/ktlint/1.3.0/rules/standard/#class-signature.I've tried to set
ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than=2
but it did not help.Issue happens due to approach how tests to be written. It is expected that test classes to be inherited from kotest class. On printscreen above it is
StringSpec
. This class should be initialised with single argument, lambda function which should contain full code of unit test.Expected Behavior
Current Behavior
Additional information
StringSpec
test style of theKotest
, but most of them.We have a tons of tests. Please help to keep them as is.
The text was updated successfully, but these errors were encountered: