-
Notifications
You must be signed in to change notification settings - Fork 39
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
Changing indentation of multiline string works incorrect #811
Comments
Arrgentum
pushed a commit
that referenced
this issue
Jun 6, 2022
* 1 new fix test * first corrected code ### Issue (#811)
Arrgentum
pushed a commit
that referenced
this issue
Jun 6, 2022
* corrected code StringLiteral * added test ### Issue(#811)
Some part of the error has already been fixed. Environment information
Test1Initial code №1:fun `check dummy property`() {
lintMethod(
"""
|// provide your check here
""".trimMargin(),
LintError(1, 1, ruleId, "${DUMMY_TEST_WARNING.warnText()} some detailed explanation", true)
)
} Observed behavior №1:fun `check dummy property`() {
lintMethod(
"""
|// provide your check here
""".trimMargin(),
LintError(1, 1, ruleId, "${DUMMY_TEST_WARNING.warnText()} some detailed explanation", true)
)
} Test2Initial code №2:fun `check dummy property`() {
lintMethod(
"""
|// provide your check here
""".trimMargin(),
LintError(1, 1, ruleId, "${DUMMY_TEST_WARNING.warnText()} some detailed explanation", true)
)
} Observed behavior №2:fun `check dummy property`() {
lintMethod(
"""
|// provide your check here
""".trimMargin(),
LintError(1, 1, ruleId, "${DUMMY_TEST_WARNING.warnText()} some detailed explanation", true)
)
} Test3Initial code №3:fun `check dummy property`() {
lintMethod(
"""
|// provide your check here
""".trimMargin(),
LintError(1, 1, ruleId, "${DUMMY_TEST_WARNING.warnText()} some detailed explanation", true)
)
} Observed behavior №3:fun `check dummy property`() {
lintMethod(
"""
|// provide your check here
""".trimMargin(),
LintError(1, 1, ruleId, "${DUMMY_TEST_WARNING.warnText()} some detailed explanation", true)
)
} Expected behavior №3:fun `check dummy property`() {
lintMethod(
"""
|// provide your check here
""".trimMargin(),
LintError(1, 1, ruleId, "${DUMMY_TEST_WARNING.warnText()} some detailed explanation", true)
)
} Test4Initial code №4 (extracted into a separate gh-1347):fun checkScript() {
lintMethod(
"""
|val A = "aa"
""".trimMargin(),
)
} Observed behavior №4:fun checkScript() {
lintMethod(
"""
|val A = " aa "
""".trimMargin(),
)
} Expected behavior №4:fun checkScript() {
lintMethod(
"""
|val A = "aa"
""".trimMargin(),
)
} ResultTesting showed that in the first two tests, the expected behavior coincides with the result obtained. And in the last two tests, no. |
Arrgentum
pushed a commit
that referenced
this issue
Jun 15, 2022
### Whats added: * corrected the logic of checking MultilionString * added fix test in IndentationRuleFixTest.kt - MultilionStringExpected.kt, MultilionStringTest.kt * run diktat:fix@diktat ### Issue (#811)
Arrgentum
pushed a commit
that referenced
this issue
Jun 15, 2022
### Whats added: * corrected the logic of checking MultilionString * added fix test in IndentationRuleFixTest.kt - MultilionStringExpected.kt, MultilionStringTest.kt * delete smoke tests * run diktat:fix@diktat ### Issue (#811)
Arrgentum
pushed a commit
that referenced
this issue
Jun 15, 2022
### Whats added: * corrected the logic of checking MultilionString * added fix test in IndentationRuleFixTest.kt - MultilionStringExpected.kt, MultilionStringTest.kt * delete smoke tests * run diktat:fix@diktat ### Issue (#811)
Arrgentum
pushed a commit
that referenced
this issue
Jun 15, 2022
### Whats added: * corrected the logic of checking MultilionString * added fix test in IndentationRuleFixTest.kt - MultilionStringExpected.kt, MultilionStringTest.kt * delete smoke tests * run diktat:fix@diktat ### Issue (#811)
Arrgentum
pushed a commit
that referenced
this issue
Jun 15, 2022
### Whats added: * corrected the logic of checking MultilionString * added fix test in IndentationRuleFixTest.kt - MultilionStringExpected.kt, MultilionStringTest.kt * delete smoke tests ### Issue (#811)
Arrgentum
pushed a commit
that referenced
this issue
Jun 15, 2022
### Whats added: * corrected the logic of checking MultilionString * added fix test in IndentationRuleFixTest.kt - MultilionStringExpected.kt, MultilionStringTest.kt * delete smoke tests * run install * mvn fix ### Issue (#811)
Arrgentum
pushed a commit
that referenced
this issue
Jun 15, 2022
### Whats added: * corrected the logic of checking MultilionString * added fix test in IndentationRuleFixTest.kt - MultilionStringExpected.kt, MultilionStringTest.kt * delete smoke tests * run install * mvn fix ### Issue (#811)
Arrgentum
pushed a commit
that referenced
this issue
Jun 15, 2022
### Whats added: * corrected the logic of checking MultilionString * added fix test in IndentationRuleFixTest.kt - MultilionStringExpected.kt, MultilionStringTest.kt * delete smoke tests * run install * mvn fix ### Issue (#811)
4 tasks
Closed
Merged
0x6675636b796f75676974687562
added a commit
that referenced
this issue
Jul 18, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Initial code:
Problem: There are extra indentations in lintMethod.
Expected behavior after command
mvn diktat:fix@diktat
:Observed behavior
So only first and last lines were changed.
Environment information
The text was updated successfully, but these errors were encountered: