Commit Graph

6982 Commits

Author SHA1 Message Date
Toshiaki Kameyama 97150cb0e2 "Nested lambda has shadowed implicit parameter": show warning on the shadowing 'it' reference 2018-08-30 17:37:36 +03:00
Toshiaki Kameyama 7800f42840 "Nested lambda has shadowed implicit parameter": Do not report if 'it' paramerter is not used #KT-26268 Fixed 2018-08-30 17:37:36 +03:00
Alexey Tsvetkov 49bddcd220 Use release coroutines in evaluate tests 2018-08-30 14:57:12 +03:00
Toshiaki Kameyama 6a140fb9ed "Useless call on collection type" inspection: Apply to 'kotlin.sequences.orEmpty' 2018-08-30 14:50:56 +03:00
Ilya Gorbunov d57e1bb68b Migrate stepping and evaluation tests to the new coroutine API 2018-08-30 14:50:31 +03:00
Natalia Selezneva 81f4bd3846 Add tests for configuring kotlin with gradle 4.9 2018-08-30 12:35:52 +03:00
kenji tomita e5841441c9 Fix #KT-26353 'Make variable immutable' is a bad name for a quickfix that changes 'var' to 'val' 2018-08-29 16:27:46 +03:00
Toshiaki Kameyama 3ea0222d43 "Add annotation target" quickfix: add SOURCE retention when target is EXPRESSION #KT-26306 Fixed 2018-08-29 16:18:04 +03:00
Toshiaki Kameyama ae4ff45750 "Remove redundant let" inspection: do not report for long call chains #KT-26289 Fixed 2018-08-27 13:42:25 +03:00
Toshiaki Kameyama c6db26ba91 "Replace 'if' with elvis operator": Don't suggest on nullable type check #KT-25886 Fixed 2018-08-27 13:33:46 +03:00
Toshiaki Kameyama 1a31ce769c Fix false negative in not reduceable binary expression #KT-26179 Fixed 2018-08-27 13:32:49 +03:00
Toshiaki Kameyama 8f80851b9a if then to elvis: support calling extension function in class #KT-26343 Fixed 2018-08-27 13:31:04 +03:00
Toshiaki Kameyama b34f32d4f3 "Remove redundant backticks": Fix false positive for yield #KT-25968 Fixed 2018-08-27 13:10:57 +03:00
Toshiaki Kameyama 362e6863ac "Replace if with when": Do not remove block braces if block has single lambda expression #KT-26187 Fixed 2018-08-27 12:54:45 +03:00
kenji tomita e59427edab Fix false positive for if-else 2018-08-27 12:53:35 +03:00
Toshiaki Kameyama 0099b7b3b1 "Remove explicit type specification" intention: Add type argument to initializer if need #KT-13343 Fixed 2018-08-27 12:35:32 +03:00
Mikhail Glukhikh 564ea629d1 Add annotations to primary constructor together with 'constructor'
This fixes incorrect behaviour if primary constructor has no explicit
'constructor' keywork
#KT-25548 Fixed
2018-08-24 18:00:54 +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 87d750aa1c Add inspection to detect functions with SuccessOrFailure return type
Partial implementation of KT-25621 (no quick-fixes yet)
2018-08-24 18:00:41 +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 b41ef6a807 Do not report "unused symbol" on experimental annotations
#KT-25609 Fixed
2018-08-23 18:34:59 +03:00
Mikhail Glukhikh 4113a6fd6a Extend fixes of experimental errors to property & type alias
#KT-25525 Fixed
#KT-25526 Fixed
2018-08-23 18:34:57 +03:00
Toshiaki Kameyama f1dc09f839 Add postfix template for the spread operator #KT-26249 Fixed 2018-08-22 10:56:39 +03:00
Denis Zharkov 944b0d058a Allow calling some pieces of the experimental coroutine API
- Calling suspend functions is allowed
- Presence of suspend function type still makes declaration
unusable unless it belongs to a value parameter as a top-level type
containing less then three parameters

Still, warning should be emitted because they will become unsupported in 1.4

 #KT-25683 In Progress
2018-08-21 13:44:02 +03:00
Mikhail Glukhikh 4fd8d3b480 Add formatting rule "new line between { and when entry" 2018-08-20 13:21:22 +03:00
Mikhail Glukhikh ef094e78e3 Add when branches (minor): 'with import' -> 'with * import'
Change name of quick-fix to more descriptive one
2018-08-20 13:21:18 +03:00
Mikhail Glukhikh b031e34f8d Add when branches: include auto-import
Before this commit, enum / sealed class to add was not imported so
user had to import them himself. Now everything is auto-imported.
Separate "add with import" is kept but * import is now in mind there.
#KT-22330 Fixed
#KT-22354 Fixed
EA-108090 Fixed
2018-08-20 13:21:17 +03:00
Vitaliy.Bibaev 568a664491 Move test classes into 'streams' package in the tiny app 2018-08-20 05:18:01 +03:00
Vitaliy.Bibaev d4795c0e5d Add generated tests for collections/java streams 2018-08-20 05:18:01 +03:00
Vitaliy.Bibaev cf2c2ed802 Move sequence test data into 'debugger/tinyApp/src/streams/sequence' 2018-08-20 05:18:01 +03:00
Vitaliy.Bibaev 895e78d180 Move test data to tinyApp directory 2018-08-20 05:18:00 +03:00
Vitaliy.Bibaev fbc2a5d9a7 EA-114349 Fix bug when trace collecting for large int values throws NPE 2018-08-20 05:17:59 +03:00
Vitaliy.Bibaev 7cd1baff9d Fix bug when chain is not detected if method expression is used 2018-08-20 05:17:59 +03:00
Vitaliy.Bibaev da731b9bae Do not set redundant space in string representation of lambdas 2018-08-20 05:17:58 +03:00
Vitaliy.Bibaev 89abcb82e4 Support distinctBy intermediate call 2018-08-20 05:17:58 +03:00
Vitaliy.Bibaev 0cc5e924a7 Fix bug then Map.contains is not an expression 2018-08-20 05:17:58 +03:00
Vitaliy.Bibaev bfced7dd1e Support filterIsInstance with generic parameter 2018-08-20 05:17:58 +03:00
Vitaliy.Bibaev e9d8398573 Minor: update test data 2018-08-20 05:17:58 +03:00
Vitaliy.Bibaev 914a631322 Add tests & test data for all terminal operations 2018-08-20 05:17:58 +03:00
Vitaliy.Bibaev bf82cd9b40 Fix test dsl/mapComputeIfAbsent 2018-08-20 05:17:58 +03:00
Vitaliy.Bibaev bde34b45e7 Add 'asSequence' operation support 2018-08-20 05:17:57 +03:00
Vitaliy.Bibaev 8f807f441b Add two more tests for windowed operation support 2018-08-20 05:17:57 +03:00
Vitaliy.Bibaev 449fa8f3ec Support 'windowed' intermediate call 2018-08-20 05:17:57 +03:00
Vitaliy.Bibaev cc549d3ae5 Support chunked operation 2018-08-20 05:17:57 +03:00
Vitaliy.Bibaev 85d83309ae Support mapNotNull intermediate operation 2018-08-20 05:17:57 +03:00
Vitaliy.Bibaev eaee6697f2 Make zipWithNext work & add test 2018-08-20 05:17:56 +03:00
Vitaliy.Bibaev d8bc73367f Add tests for misc operations 2018-08-20 05:17:56 +03:00
Vitaliy.Bibaev 53209eaeec Add tests for appending values to sequence operation 2018-08-20 05:17:56 +03:00