Commit Graph

22 Commits

Author SHA1 Message Date
Mikhail Glukhikh 04bd5139d5 Don't suggest "return type is..." inspections for anonymous functions
#KT-29290 Fixed
2019-01-28 16:03:55 +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 a3909d8e47 Refactor code in "simplify call chain" (relates to KT-28576) 2018-12-06 15:37:47 +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
Mikhail Glukhikh d909162a89 Rename "Result is Result" inspection to "Direct use of result type" 2018-11-30 15:14:26 +03:00
Mikhail Glukhikh 05b1a99022 Fix "redundant async" for coroutines 1.*, forbid explicit scopes case
Related to KT-28504
#KT-28445 Fixed
2018-11-29 21:17:57 +03:00
Mikhail Glukhikh 93fff99d8d Extract stub library file from "Result is Result" inspection tests 2018-11-29 21:17:33 +03:00
Mikhail Glukhikh 6b60d49e09 Extract stub library file from "Redundant async" inspection tests 2018-11-29 21:17:16 +03:00
Mikhail Glukhikh 2e2b15853e Suppress RESULT_CLASS_IN_RETURN_TYPE in ResultIsResultInspection tests
This fixes four relevant inspection tests
2018-09-18 11:50:40 +03:00
Roman Elizarov e2713501ce Rename SuccessOrFailure to Result and hide Failure from ABI
* The members of Result are isSuccess, isFailure, exceptionOrNull, getOrNull
* The rest of API is implemented via inline-only extensions
* There are two internal functions to hide detailed mechanics of an internal
  Result.Failure class: createFailure and throwOnFailure
* Result.toString is explicit: either Success(v) or Failure(x)

See KT-26538
2018-09-09 11:34:31 +03:00
Mikhail Glukhikh c12f29ae30 Enhance inspection about SuccessOrFailure (related to KT-25621)
Increase performance by searching first SuccessOrFailure/runCatching/etc
in text of functions without return type.
Remove stdlib false positives, like success() & failure().
For catching extension, check also non-catching members.
Add "rename to *Catching" fix.
2018-08-24 18:00:46 +03:00
Mikhail Glukhikh 7a2d0a3bb2 Add inspection "Redundant runCatching {}" (related to KT-25621) 2018-08-24 18:00:44 +03:00
Mikhail Glukhikh 2084e94099 Add quick-fix "add .getOrThrow()" for SuccessOrFailure inspection
#KT-25621 Fixed
2018-08-24 18:00:42 +03:00
Mikhail Glukhikh 023b1b1880 Shorten quick-fix text of "Redundant async" #KT-25712 Fixed 2018-08-23 18:35:01 +03:00
Mikhail Glukhikh cc1d9e88d5 1.3 migration: make inspections working for non-experimental coroutines 2018-07-24 10:24:18 +03:00
Mikhail Glukhikh fbb0a3e06c Convert async {}.await() to withContext(DefaultDispatcher) {}
This fixes incorrect transformation related to KT-24235
2018-05-24 15:15:25 +03:00
Mikhail Glukhikh 13be7803bb Introduce "redundant async" inspection #KT-24235 Fixed 2018-05-11 17:36:35 +03:00