Mikhail Glukhikh
0c41ceea9d
"Cascade if" inspection: do not suggest for one-line if
2017-07-07 18:15:28 +03:00
Mikhail Glukhikh
0fe9030eba
"Cascade if" inspection: don't highlight for complex logical conditions
...
Related to KT-18615
2017-07-07 18:15:27 +03:00
Mikhail Glukhikh
8273eff1a1
Introduce "cascade if" inspection suggesting replacement with when
...
So #KT-18615 Fixed
2017-07-07 18:15:26 +03:00
Mikhail Glukhikh
1ddaee5b4a
"Lift return / assignment": don't highlight if other returns available
2017-07-07 18:15:24 +03:00
Mikhail Glukhikh
691b733c55
"Lift return / assignment": do not suggest for else arguments
2017-07-07 18:15:22 +03:00
Mikhail Glukhikh
042990dda1
"Lift return / assignment": do not suggest for too long expressions
2017-07-07 18:15:21 +03:00
Mikhail Glukhikh
398f92dc6f
Lift assignment out: do not suggest if other assignments available
...
So #KT-18709 Fixed
2017-07-07 18:15:20 +03:00
Mikhail Glukhikh
9c4dfa3343
Lift return out: do not suggest for lambda in return #KT-18711 Fixed
2017-07-07 18:15:18 +03:00
Mikhail Glukhikh
c0d10264bc
Lift assignment out: do not highlight for exactly one assignment
...
Related to KT-14900
2017-07-07 18:15:17 +03:00
Mikhail Glukhikh
1010ecca8c
Lift return out: do not report for zero returns
...
Also, do not highlight (but suggest fix) for exactly one return
Related to KT-14900
2017-07-07 18:15:16 +03:00
Mikhail Glukhikh
2d1abda9a1
Convert "lift return / assignment" intentions into a single inspection
...
Also includes minor test fix, related to KT-14900
2017-07-07 18:15:14 +03:00
Mikhail Glukhikh
523cbc6723
Convert to expression body: insert new-line after = for long lines
2017-07-07 18:15:07 +03:00
Mikhail Glukhikh
d08b18f5f8
Introduce "use expression body" inspection #KT-16063 Fixed
...
Converted from the relevant intention
Reported cases: one-liners, whens
Also, more exact caret detection in local inspection tests
2017-07-07 18:15:06 +03:00
Alexey Sedunov
9ba868a903
Minor: Fix test data
2017-06-30 13:53:09 +03:00
Mikhail Glukhikh
fdca96634e
Add restrictions for "simplifiable call chain" inspection
...
Do not use on maps; do not suggest for lambdas with return inside
Related to KT-18274
2017-06-29 16:25:55 +03:00
Mikhail Glukhikh
36be1fdaef
Introduce "simplifiable call chain on collection" inspection
...
Related to KT-12165
So #KT-18274 Fixed
So #KT-17198 Fixed
2017-06-29 16:25:52 +03:00
Mikhail Glukhikh
bdb9f00c75
Introduce "Useless call on collection type" inspection
...
Related to KT-12165
Supported functions: filterNotNull, filterIsInstance,
mapNotNull, mapNotNullTo, mapIndexedNotNull, mapIndexedNotNullTo
Also, "Useless cal on not-null" improved a bit
2017-06-29 16:25:50 +03:00
Mikhail Glukhikh
f80f41d254
Introduce "redundant explicit type" inspection #KT-18517 Fixed
...
Reported cases: constants, constructors, object references
2017-06-29 16:25:47 +03:00
Mikhail Glukhikh
0f4ae3b727
Introduce "Useless call on not-null type" inspection #KT-18386 Fixed
...
Supported functions: orEmpty(), isNullOrEmpty(), isNullOrBlank()
2017-06-29 16:25:45 +03:00
shiraji
cbccf932a7
Add inspection removing redundant spread operator for arrayOf call
...
So #KT-17920 Fixed
2017-06-16 15:04:04 +03:00
Toshiaki Kameyama
b9fb7cc3a5
Add quick fix to generate equals / hashcode in data class with arrays
...
So #KT-15893 Fixed
2017-06-16 15:03:52 +03:00
Kirill Rakhman
13a2612e20
Add inspection for ranges with start > endInclusive #KT-18438 Fixed
2017-06-16 15:02:31 +03:00
shiraji
647558c98a
Add inspection for potentially wrongly placed unary operators
...
So #KT-18236 Fixed
2017-06-16 15:02:24 +03:00
Dimach
d369fa094a
Add Boolean? == const to elvis conversion and vice versa #KT-15368 Fixed
...
Convert elvis to equality check implemented as inspection due
code style guide
2017-06-15 15:01:39 +03:00
Mikhail Glukhikh
44e727b75c
Redundant toString() in string template: highlight selector only
...
And not the receiver. So #KT-18253 Fixed
2017-06-13 15:17:42 +03:00
Ilya Zorin
5e265b3d17
Convert intention "a..b-1 -> a until b" into weak warning inspection
...
So #KT-17895 Fixed
2017-05-26 09:48:04 +03:00
Mikhail Glukhikh
17869abfaf
Don't suggest making interface member final
...
(which was possible in leaking this inspection)
So #KT-14443 Fixed
2017-05-19 20:36:31 +03:00
Mikhail Glukhikh
51af18608f
AbstractLocalInspectionTest: add LANGUAGE_VERSION support
...
Related to KT-17164
2017-05-16 20:44:12 +03:00
Mikhail Glukhikh
9990550429
Introduce inspection "replace arrayOf with literal" #KT-17164 Fixed
2017-05-16 20:44:11 +03:00
Kirill Rakhman
a8b2d3b4e8
Add inspection to detect copy() calls in a data class without named arguments
...
So #KT-17660 Fixed
2017-05-10 17:43:44 +03:00
Mikhail Glukhikh
bb8091a6ca
KT-17503 add check whether callable reference is acceptable in lambda
2017-04-27 18:21:33 +03:00
shiraji
0eceef1519
Add inspection to detect use of callable reference as a lambda body
...
So #KT-17053 Fixed
2017-04-27 18:21:27 +03:00