Commit Graph

575 Commits

Author SHA1 Message Date
Toshiaki Kameyama ee406f1622 Lift assignment out: if last statement is lambda, enclose it in parentheses if necessary
#KT-38155 Fixed
2021-02-22 17:40:06 +01:00
Ilya Kirillov e8f3ebdd19 FIR IDE: introduce HLRedundantVisibilityModifierInspection by extended checker 2021-02-16 15:23:18 +01:00
Dmitriy Novozhilov a6600cef47 [Test] Remove some outdated tests from LocalInspectionTestGenerated
Those tests are referring to outdated language features which are
  meaningless for language version 1.5
2021-01-28 13:19:29 +03:00
Toshiaki Kameyama 09e1bed5c9 Redundant 'inner' modifier: fix false positive/negative with constructor call
#KT-40879 Fixed
#KT-41223 Fixed
#KT-41311 Fixed
#KT-41680 Fixed
2020-10-28 18:16:57 +07:00
Yan Zhulanow c07f25fa44 Revert "FoldInitializerAndIfToElvisInspection: don't add explicit type if var is used as non-nullable"
This reverts commit bb7d4c22
2020-10-24 00:22:41 +09:00
Yan Zhulanow 9320637efe Revert "Redundant companion reference: do not report 'values/valueOf' function in enum"
This reverts commit 55d55446
2020-10-24 00:22:40 +09:00
Yan Zhulanow 16dbf7ba74 Revert "Convert to range check: don't report it if recursive call will be created"
This reverts commit 73184884
2020-10-24 00:22:38 +09:00
Yan Zhulanow 19f518c037 Revert "IfThenToSafeAccessInspection: fix it works correctly for variable/operator call"
This reverts commit 5095caee
2020-10-24 00:22:36 +09:00
Toshiaki Kameyama 5095caee50 IfThenToSafeAccessInspection: fix it works correctly for variable/operator call
#KT-30513 Fixed
#KT-17071 Fixed
2020-10-23 15:46:54 +09:00
Toshiaki Kameyama 731848849e Convert to range check: don't report it if recursive call will be created
#KT-39182 Fixed
2020-10-23 15:46:52 +09:00
Toshiaki Kameyama 55d55446c8 Redundant companion reference: do not report 'values/valueOf' function in enum
#KT-34285 Fixed
2020-10-23 15:46:50 +09:00
Toshiaki Kameyama bb7d4c224f FoldInitializerAndIfToElvisInspection: don't add explicit type if var is used as non-nullable
#KT-38349 Fixed
2020-10-23 15:46:48 +09:00
Dmitry Gridin 9a0c3c47c8 [inspections] fix false positive "Redundant Unit" inspection in lambda with dynamic return type
^KT-40700 Fixed
2020-10-07 08:38:28 +00:00
Toshiaki Kameyama bcbb90dd81 "Receiver parameter is never used" inspection: don't report it when anonymous function is called with receiver
#KT-41246 Fixed
2020-10-02 13:32:31 +07:00
Toshiaki Kameyama 33969c5f9a Redundant semicolon: fix false negative on start of line
^KT-40704 Fixed
2020-10-01 14:31:59 +02:00
Toshiaki Kameyama 86ac44c23e "Replace 'if' with elvis operator": don't suggest if val initializer is a complex expression
#KT-35165 Fixed
2020-09-29 23:58:29 +09:00
Toshiaki Kameyama 653e20dcba Convert put to assignment: don't report when receiver object has custom 'set' method
#KT-33212 Fixed
2020-09-29 23:58:29 +09:00
Toshiaki Kameyama 74ee68e57b Remove redundant backticks: do not report if variable inside the string and isn't followed by space
#KT-35051 Fixed
2020-09-29 23:58:27 +09:00
Toshiaki Kameyama ad3ea9a36a Replace with binary operator: don't highlight when receiver is platform type
#KT-35097 Fixed
2020-09-29 23:58:27 +09:00
Toshiaki Kameyama 93db78e7ac JavaMapForEachInspection: report for expression with implicit receiver
#KT-31833 Fixed
2020-09-29 23:58:27 +09:00
Toshiaki Kameyama 915dc6ce91 FoldInitializerAndIfToElvisInspection: don't report when 'var' variable has no explicit type and it's used as not nullable type
#KT-38349 Fixed
2020-09-29 23:58:26 +09:00
Toshiaki Kameyama ef5335ba99 ReplaceJavaStaticMethodWithKotlinAnalogInspection: don't report for Character.toString(int)
#KT-34859 Fixed
2020-09-29 23:58:25 +09:00
Toshiaki Kameyama b008e6c9be SimplifiableCallChainInspection: don't report if suspend function cannot be called correctly
#KT-23934 Fixed
2020-09-29 23:58:24 +09:00
Toshiaki Kameyama bc580d2fd9 Introduce "Unused result of data class copy" inspection
#KT-34121 Fixed
2020-09-25 17:18:41 +02:00
Toshiaki Kameyama a2f70dfc3d KT-41298 "Remove redundant 'with' call" intention works incorrectly with non-local returns and single-expression functions (#3713)
* Remove redundant 'with' call: remove redundant 'return' keyword

#KT-41298 Fixed
2020-09-25 12:48:31 +02:00
Toshiaki Kameyama 17176c00ae Move lambda out: don't remove block comments
#KT-35357 Fixed
2020-09-24 12:05:43 +02:00
Toshiaki Kameyama a2bde2ffb2 Redundant overriding method: do not report when super method is not called
#KT-34959 Fixed
2020-09-23 14:12:06 +02:00
Vladimir Dolzhenko 985f2b839c Add regression tests to cover Unused symbol with private anonymous object property
^KT-39454 Fixed
2020-09-17 11:54:53 +02:00
Toshiaki Kameyama 0e4bd70c29 Redundant nullable return type: fix false positive with elvis return
#KT-41878 Fixed
2020-09-17 09:49:02 +02:00
Toshiaki Kameyama 370622087b Redundant nullable return type: false negative with return expression in local function or lambda
#KT-41817 Fixed
2020-09-11 19:09:57 +02:00
Toshiaki Kameyama de3907e8cc Redundant nullable return type: fix false positive with non-local return
#KT-41800 Fixed
2020-09-11 19:09:57 +02:00
Vladimir Dolzhenko 6f03e42ef7 Revert back Inspection: convert initialized val to non-null type
Relates to ^KT-35757
Relates to ^KT-19321
2020-09-09 23:38:21 +02:00
Toshiaki Kameyama 5c011bc954 Don't report when property is multi-line and action is MOVE 2020-09-09 22:31:56 +07:00
Toshiaki Kameyama 4569b85a16 MoveVariableDeclarationIntoWhenInspection: report it if initializer is single line even if property is multi line
#KT-39467 Fixed
2020-09-09 22:31:56 +07:00
Toshiaki Kameyama 3f7aab6fae Redundant 'asSequence' call: don't report when reciever type is Map
#KT-41338 Fixed
2020-09-04 22:10:34 +02:00
Toshiaki Kameyama 343010a833 "Unused equals expression" inspection: highlight whole expression with yellow background
^KT-41615 Fixed
2020-09-04 12:55:55 +02:00
Toshiaki Kameyama 8420c0b7c7 Add "Redundant nullable return type" inspection
^KT-19321 Fixed
2020-09-04 09:07:22 +02:00
kvirolainen 18fbf5729d Inspection: convert initialized val to non-null type
^KT-35757 Fixed
2020-09-03 16:30:28 +02:00
Enteerman c3aeaa9052 Inspection: Simplify Nested forEach/onEach in also/apply to onEach
^KT-40283 Fixed
2020-09-03 15:29:32 +02:00
Enterman d09b20f11d Inspection to replace !string.isBlank() with string.isNotBlank()
#KT-40769 Fixed
2020-09-03 14:20:35 +02:00
Yunir Salimzyanov 27b2e16141 Cleanup as36 patchset files (KTI-315) 2020-08-19 19:40:00 +03:00
Toshiaki Kameyama f3be3f449a Scope function conversion: do not suggest when invoked without receiver
#KT-35525 Fixed
2020-08-19 12:27:41 +03:00
Toshiaki Kameyama d965ad0a98 IfThenToSafeAccessInspection: do not report if condition is SENSELESS_COMPARISON/USELESS_IS_CHECK (#3007)
#KT-36051 Fixed
2020-08-19 12:22:10 +03:00
Toshiaki Kameyama 122bba9102 UnnecessaryVariableInspection: don't report for overriding property
#KT-39263 Fixed
2020-08-19 12:16:37 +03:00
Toshiaki Kameyama 4901cdb11f ConvertCallChainIntoSequence: support functions added in Kotlin 1.4
#KT-40448 Fixed
2020-08-12 16:28:29 +03:00
Toshiaki Kameyama d2deff4864 Add "Replace with 'equals(..., ignoreCase = true)'" inspection
#KT-40016 Fixed
2020-07-08 12:38:30 +02:00
Mikhail Zarechenskiy 01f2b0e26b Fix test data about JsExport
It allows only for top-level declarations, plus JsName is needed to
 avoid error about method redeclaration
2020-07-03 21:23:29 +03:00
Mikhail Zarechenskiy a0ecfce7b7 Update test data: add correct error 2020-07-03 21:23:29 +03:00
Toshiaki Kameyama 0a230905ae Remove redundant spread operator: don't report if overloaded functions cannot be resolved
#KT-38282 Fixed
2020-06-30 19:16:22 +07:00
kvirolainen 5b1d019bb0 Added Incomplete destructuring inspection
#KT-21223 Fixed
2020-06-30 11:47:27 +02:00