Commit Graph

523 Commits

Author SHA1 Message Date
Mikhail Glukhikh 4d19120d84 Don't report "main parameter not necessary" in objects #KT-29414 Fixed 2019-03-04 17:57:52 +03:00
Dereck Bridie 4156a76129 #KT-26965 Add inspection + quickfix for replacing Collection<T>.count() with .size 2019-03-01 16:58:36 +03:00
Toshiaki Kameyama 1a818970c3 Add inspection to replace Java Map.forEach with Kotlin's forEach
#KT-17278 Fixed
2019-03-01 16:15:23 +03:00
Toshiaki Kameyama 20aa8ebdb0 Add "Throwable not thrown" Inspection
#KT-11629 Fixed
2019-03-01 11:35:12 +03:00
Toshiaki Kameyama df3953f03a Redundant Unit: fix false positive when return type is nullable Unit
#KT-30038 Fixed
2019-03-01 11:12:25 +03:00
Toshiaki Kameyama d67c793a9b map.get() with not-null assertion: add quick-fixes
#KT-30010 Fixed
2019-03-01 11:11:05 +03:00
Dmitry Gridin 304007f602 Fix false positive "Redundant companion reference"
#KT-30166 Fixed
2019-02-28 10:42:22 +03:00
Dmitry Gridin 3756b6f54d Add inspection to remove redundant qualifier name
#KT-12134 Fixed
2019-02-27 20:43:35 +03:00
Toshiaki Kameyama 779d536605 Redundant getter: fix false positive for 'external' getter
#KT-29416 Fixed
2019-02-19 13:03:11 +03:00
Toshiaki Kameyama 8e61a13809 Move lambda argument out of parentheses: fix false negative when function type is type parameter
#KT-26979 Fixed
2019-02-18 16:48:11 +03:00
Dmitry Gridin 33954c7632 Add inspection to move the variable declaration into when
#KT-29001 Fixed
2019-02-14 17:45:53 +03:00
Toshiaki Kameyama d583c1be58 Can be replaced with binary operator: do not suggest when receiver or argument is floating point type
#KT-28596 Fixed
2019-02-14 15:10:26 +03:00
Toshiaki Kameyama fa1f3871c0 Add "Redundant 'requireNotNull' or 'checkNotNull' call" inspection
#KT-29113 Fixed
2019-02-06 11:10:27 +03:00
Toshiaki Kameyama 2a7eb2fb0e Redundant lambda arrow: do not report on nested lambda
#KT-29093 Fixed
2019-02-05 11:27:41 +03:00
Toshiaki Kameyama bf7f7c81b1 Redundant explict type: do not report for aliased types
#KT-29128 Fixed
2019-02-05 11:24:32 +03:00
Toshiaki Kameyama b9d8466fc0 Replace rangeTo with until: fix false negative with parenthesized expression
#KT-29153 Fixed
2019-02-05 11:22:59 +03:00
Toshiaki Kameyama e8a8bc89c9 Add "Redundant enum constructor invocation" inspection
#KT-29321 Fixed
2019-02-05 11:16:01 +03:00
Mikhail Glukhikh 04bd5139d5 Don't suggest "return type is..." inspections for anonymous functions
#KT-29290 Fixed
2019-01-28 16:03:55 +03:00
Toshiaki Kameyama 4ffeff5e6c Redundant lambda arrow: do not report on type parameter
#KT-28131 Fixed
2019-01-25 10:53:04 +03:00
Toshiaki Kameyama de7adf55ff Non-canonical modifiers order: do not highlight annotation
#KT-29238 Fixed
2019-01-24 09:47:54 +03:00
Toshiaki Kameyama 0075e90042 Convert to lambda: report at INFORMATION level if anonymous object super type does not match function parameter type exactly
#KT-28081 Fixed
2019-01-24 09:42:16 +03:00
Toshiaki Kameyama 3649e61c2f Boolean literal arguments: do not report for varargs parameters
#KT-29469 Fixed
2019-01-24 09:40:21 +03:00
Toshiaki Kameyama f389c31d8e Replace with binary operator: don't highlight when receiver is dynamic type
#KT-28773 Fixed
2019-01-09 12:17:40 +03:00
Mikhail Glukhikh cdef811c55 Do not report "redundant arrow" with parameters without expected type
#KT-29049 Fixed
Part of KT-29005
2018-12-27 19:21:34 +03:00
kenji tomita 7b43d5c972 Add inspection for converting !collection.isEmpty() -> isNotEmpty()
#KT-27556 Fixed
2018-12-26 19:25:14 +03:00
Toshiaki Kameyama 538a746df9 Introduce "Function with = { ... }" inspection
#KT-17119 Fixed
2018-12-26 19:14:06 +03:00
Toshiaki Kameyama 301b3aad06 Condition of 'if' expression is constant: report enum entries comparison
#KT-28803 Fixed
2018-12-26 19:04:22 +03:00
Toshiaki Kameyama d00236d366 "Remove redundant backticks": Fix false positive for underscore
#KT-28592 Fixed
2018-12-25 10:37:18 +03:00
Toshiaki Kameyama f2cf3a8e7b Replace with binary operator: don't suggest for non-operator function
#KT-12273 Fixed
2018-12-18 09:30:38 +03:00
Mikhail Glukhikh a15b47c93c Add "Ambiguous context due to scope receiver in suspend fun" inspection
#KT-28696 Fixed
2018-12-12 17:10:37 +03:00
Mikhail Glukhikh 13b09f532c Boolean literal arguments: check previous arg, fix all args in a row 2018-12-12 15:56:12 +03:00
Mikhail Glukhikh d31e0b9632 Boolean literal arguments: don't report on a call, just on an element 2018-12-12 15:56:12 +03:00
Toshiaki Kameyama 0d7116aa5d Introduce "Boolean literal arguments" inspection #KT-2029 Fixed 2018-12-12 15:56:11 +03:00
Mikhail Glukhikh ed8305995e Don't highlight "replace with +=" for read-only collections
Related to KT-20626
2018-12-12 15:56:11 +03:00
Mikhail Glukhikh c560aada3d Add "Suspicious collection reassignment" inspection #KT-20626 Fixed 2018-12-12 15:56:11 +03:00
Mikhail Glukhikh b143a1c8f7 For each parameter not used: handle char sequences correctly
An enhancement for KT-27209
2018-12-11 16:42:04 +03:00
Mikhail Glukhikh 11909a86a8 For each parameter not used: introduce "replace with repeat"
An enhancement for KT-27209
2018-12-11 16:42:03 +03:00
Mikhail Glukhikh 9aa1d1495b Redundant arrow: don't report on forEach call with underscore
#KT-27209 Fixed
2018-12-11 16:42:03 +03:00
Mikhail Glukhikh c8c485d27e Redundant arrow: support removing of 'it ->' #KT-28631 Fixed 2018-12-11 16:42:03 +03:00
Toshiaki Kameyama 07ffac72cf Assign backing field: don't add empty line
#KT-28694 Fixed
2018-12-10 12:06:55 +03:00
Mikhail Glukhikh de33905c44 Fix formatting in "simplify call chain" #KT-28576 Fixed 2018-12-06 15:37:47 +03:00
Mikhail Glukhikh a3909d8e47 Refactor code in "simplify call chain" (relates to KT-28576) 2018-12-06 15:37:47 +03:00
Toshiaki Kameyama f6323cdee4 Replace assert boolean with assert equality: add import statement
#KT-28540 Fixed
2018-12-06 09:27:35 +03:00
Mikhail Glukhikh 7cbc8e8b76 Introduce "Redundant else in if" inspection #KT-19668 Fixed 2018-12-03 09:39:22 +03:00
Mikhail Glukhikh ca87e53f04 Introduce DeferredIsResultInspection #KT-25620 Fixed 2018-12-01 11:07:02 +03:00
Mikhail Glukhikh a7ad1113b2 Redundant async: do not suggest for calls with 'start'
The reason with 'withContext' does not have such parameter anymore
2018-11-30 15:14:27 +03:00
Mikhail Glukhikh 3d15cbcced Redundant async inspection: run "optimize imports" after quick-fix 2018-11-30 15:14:27 +03:00
Mikhail Glukhikh fd3c6496fb Redundant async inspection: support case with explicit scope
#KT-28504 Fixed
2018-11-30 15:14:27 +03:00
Mikhail Glukhikh 9f5255da02 SimplifyCallChainFix: take Conversion instead of raw text, polish a bit 2018-11-30 15:14:27 +03:00
Mikhail Glukhikh e6a1b96c53 Redundant async inspection: support case with GlobalScope
Partial implementation of KT-28504
2018-11-30 15:14:26 +03:00