You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Granted, using toInt() repeatedly this way is dumb. This is just to make the example simple.)
Expected behavior
No warning from DiKTat.
Observed behavior
DiKTat produces the following warning:
[WRONG_NEWLINES] incorrect line breaking: wrong split long `dot qualified expression` or `safe access expression` (diktat-ruleset:newlines)
Notes
This issue seems to be related to the use of a magic number instead of a configuration variable at the following, but I don't understand enough of the code to know if that number controls other things:
### What's done:
- Fixed bug related to case when the number of allowed extension function calls in one line did not match `maxCallsInOneLine` configuration.
- Fixed several warning tests.
- Added new warning test.
Closes#1705
…1858)
### What's done:
- Fixed bug related to case when the number of allowed extension function calls in one line did not match `maxCallsInOneLine` configuration.
- Fixed several warning tests.
- Added new warning test.
Closes#1705
Describe the bug
The number of allowed extension function calls on a line does not seem to respect
[WRONG_NEWLINES].maxCallsInOneLine
.Steps to Reproduce
In
diktat.kt
:Somewhere in your Kotlin code:
3.toInt().toInt().toInt().toInt()
(Granted, using
toInt()
repeatedly this way is dumb. This is just to make the example simple.)Expected behavior
No warning from DiKTat.
Observed behavior
DiKTat produces the following warning:
Notes
This issue seems to be related to the use of a magic number instead of a configuration variable at the following, but I don't understand enough of the code to know if that number controls other things:
diktat/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/NewlinesRule.kt
Line 160 in 9c96ec4
Environment information
The text was updated successfully, but these errors were encountered: