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

Bugfix/long line in string template #1297

Merged
merged 63 commits into from
Jun 16, 2022
Merged
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
0d62a5f
### Whats added:
May 16, 2022
89baaaa
Merge branch 'master' into bugfix/LongLine_in_StringTemplate
May 16, 2022
c00df8b
### Whats added:
May 16, 2022
5e52117
### Whats added:
May 20, 2022
949f78a
### Whats added:
May 24, 2022
abba36f
### Whats added:
May 24, 2022
6854102
### Whats added:
May 24, 2022
544011f
### Whats added:
May 24, 2022
58716cf
### Whats added:
May 24, 2022
df885f8
### Whats added:
May 24, 2022
fda30f6
### Whats added:
May 24, 2022
566f62f
### Whats added:
May 24, 2022
6b0ba56
### Whats added:
May 24, 2022
ebf05b1
### Whats added:
May 24, 2022
998ee8b
### Whats added:
May 25, 2022
ac942e6
### Whats added:
May 25, 2022
8c3d6b8
### Whats added:
May 25, 2022
ca89cbd
### Whats added:
May 25, 2022
e75580c
### Whats added:
May 25, 2022
4b5a2d0
### Whats added:
May 31, 2022
e7fc444
### Whats added:
May 31, 2022
09812b6
### Whats added:
May 31, 2022
a5e91dc
### Whats added:
May 31, 2022
a06a4e3
### Whats added:
May 31, 2022
410a743
### Whats added:
May 31, 2022
ada81be
### Whats added:
May 31, 2022
417e2d7
### Whats added:
May 31, 2022
4d2f87c
### Whats added:
May 31, 2022
ebf5e2b
### Whats added:
May 31, 2022
6201472
### Whats added:
May 31, 2022
b7060c1
### Whats added:
May 31, 2022
ba164c5
Merge branch 'master' into bugfix/LongLine_in_StringTemplate
Arrgentum May 31, 2022
a3630f1
### Whats added:
Jun 1, 2022
9cf7b09
Merge remote-tracking branch 'origin/bugfix/LongLine_in_StringTemplat…
Jun 1, 2022
2bcc2f8
### Whats added:
Jun 1, 2022
3a37ead
### Whats added:
Jun 1, 2022
21c44f1
### Whats added:
Jun 1, 2022
778ee66
### Whats added:
Jun 1, 2022
7d88336
Merge branch 'master' into bugfix/LongLine_in_StringTemplate
Arrgentum Jun 1, 2022
7c1675c
merged condition and other logics, fixed recursive logic, renamed fun…
Jun 1, 2022
79b4040
moved fix logic to class methods
Jun 7, 2022
7e01fc0
Merge branch 'master' into bugfix/LongLine_in_StringTemplate
Arrgentum Jun 7, 2022
a2b1b60
moved fix logic to class methods
Jun 7, 2022
8e8013b
Merge remote-tracking branch 'origin/bugfix/LongLine_in_StringTemplat…
Jun 7, 2022
b743379
moved fix logic to class methods
Jun 7, 2022
d1feaf3
moved fix logic to class methods
Jun 7, 2022
6ccdb65
corrected code
Jun 7, 2022
29f14b1
corrected code
Jun 7, 2022
b62d473
corrected code
Jun 7, 2022
20a5498
corrected code
Jun 7, 2022
276fd00
corrected code
Jun 7, 2022
61d4bac
corrected code
Jun 7, 2022
228a24f
corrected code
Jun 7, 2022
76f261b
corrected code
Jun 8, 2022
68d4b1a
corrected code
Jun 8, 2022
e494594
corrected code
Jun 8, 2022
2a4ce0f
corrected code
Jun 8, 2022
66f1df5
Merge branch 'master' into bugfix/LongLine_in_StringTemplate
Arrgentum Jun 15, 2022
22c79b9
Merge branch 'master' into bugfix/LongLine_in_StringTemplate
Arrgentum Jun 15, 2022
8be353c
Merge branch 'master' into bugfix/LongLine_in_StringTemplate
Arrgentum Jun 15, 2022
910738a
fix all
Jun 16, 2022
95c1b0b
Merge remote-tracking branch 'origin/bugfix/LongLine_in_StringTemplat…
Jun 16, 2022
f29777f
Merge branch 'master' into bugfix/LongLine_in_StringTemplate
Arrgentum Jun 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
### Whats added:
 * corrected logic fix and warn String Template in Linelength rule
 * added logic fix and warn long Dot Qualified Expression and Safe Access Expression in LineLength rule
 * added logic fix and warn Value Arguments List in LineLength rule
 * added and corrected fix and warn tests in LineLength rule
 * fix code with diktat:fix@diktat
 * added comments to classes and functions
 * correct code with running detect

 ### Issue (#1243)
Arrgentum committed May 25, 2022
commit ca89cbd3ba85eec4d894138c5fc64f132e3431b8
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.cqfn.diktat.ruleset.rules.chapter3

import org.cqfn.diktat.common.config.rules.RulesConfig
import org.cqfn.diktat.common.config.rules.RuleConfiguration
import org.cqfn.diktat.common.config.rules.RulesConfig
import org.cqfn.diktat.common.config.rules.getRuleConfig
import org.cqfn.diktat.ruleset.constants.Warnings.LONG_LINE
import org.cqfn.diktat.ruleset.rules.DiktatRule
@@ -380,7 +380,7 @@ class LineLength(configRules: List<RulesConfig>) : DiktatRule(
val node = wrongDotQualifiedExpression.node
val dot = node.getFirstChildWithType(DOT)
val safeAccess = node.getFirstChildWithType(SAFE_ACCESS)
val splitNode = if ( (dot?.startOffset ?: 0) > (safeAccess?.startOffset ?: 0)) {
val splitNode = if ((dot?.startOffset ?: 0) > (safeAccess?.startOffset ?: 0)) {
dot
} else {
safeAccess