Commit Graph

39943 Commits

Author SHA1 Message Date
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 2deef48b84 Cleanup code: BranchedFoldingUtils 2017-07-07 18:15:15 +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 8f33bd0768 Handle break / continue / throw in lift return / assignment intentions
So #KT-14900 Fixed
2017-07-07 18:15:09 +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
takahirom fe9d3f16d3 KT-18501: Fix to find KDoc even if KDoc is in ModifierList 2017-07-07 18:12:19 +03:00
Dmitry Jemerov 4b92349031 Specify group for "Redundant 'Unit' return type" inspection 2017-07-07 16:53:42 +02:00
nd 33a93e5fc5 Inspection detecting redundant Unit return type (#1144) 2017-07-07 16:51:53 +02:00
Dmitry Jemerov 5f9a33564a Implement option for wrapping method annotations 2017-07-07 16:48:31 +02:00
Dmitry Jemerov a379a814ba Implement option for wrapping class annotations 2017-07-07 16:48:31 +02:00
Dmitry Jemerov 6c62b60147 Implement option for wrapping parameter annotations 2017-07-07 16:48:31 +02:00
Dmitry Jemerov be15ee3c03 Add "Wrap extends/implements list" option 2017-07-07 16:48:30 +02:00
Dmitry Jemerov 722cc521a9 Add "Blank lines before }" option
#KT-15504 Fixed
2017-07-07 16:48:30 +02:00
Dmitry Jemerov 5c8a90fe85 "Blank lines after class header" option supported 2017-07-07 16:48:30 +02:00
Dmitry Jemerov 6a96ade02c Options for blank lines between 'when' branches
#KT-18607 Fixed
2017-07-07 16:48:29 +02:00
Dmitry Jemerov 8fe2858c6a Option to use normal indent in chained calls
#KT-18605 Fixed
2017-07-07 16:48:29 +02:00
Simon Ogorodnik d8bb0b1023 KT-16999: Fix duplicates in parameter info
Use ShadowedDeclarationFilter in Parameter Info
 #KT-16999 fixed
2017-07-07 17:40:32 +03:00
nd 58e5c497d0 Intention to replace add/addAll on a mutable collection with += (#1143) 2017-07-07 16:34:20 +02:00
nd fae8efdc7f Handle unsafe implicit invoke on array access expression (#1151) 2017-07-07 16:29:11 +02:00
Dmitry Jemerov 8cc9195fae Merge remote-tracking branch 'origin/master' 2017-07-07 13:26:59 +02:00
Dmitry Jemerov 9dc4183a16 Fix tests affected by the inspection behavior change 2017-07-07 13:25:59 +02:00
Mikhail Zarechenskiy 039729908d Minor, remove field that never used 2017-07-07 14:20:03 +03:00
Mikhail Zarechenskiy 3fed4e6dc7 Improve diagnostic for unresolved reference when function expected
#KT-10657 Fixed
2017-07-07 14:20:02 +03:00
Mikhail Zarechenskiy 0ae45a2835 Add test for obsolete issue
#KT-6502 Obsolete
2017-07-07 14:20:01 +03:00
Mikhail Zarechenskiy c853ac95ad Improve diagnostic message for annotations with @receiver
#KT-14647 Fixed
2017-07-07 14:19:59 +03:00
Mikhail Zarechenskiy f5cd8c7e4d Relax name shadowing warning on parameter names
#KT-17611 Fixed
2017-07-07 14:19:57 +03:00
Mikhail Zarechenskiy daa8521729 Avoid getting descriptors for collection literals from built-ins scope
#KT-18845 Fixed
2017-07-07 14:14:30 +03:00
Dmitry Jemerov a12594fe27 Merge branch 'KT-18717' of https://github.com/nd/kotlin 2017-07-07 13:10:52 +02:00
Dmitry Jemerov 1de685949b Merge branch 'KT-18797' of https://github.com/nd/kotlin 2017-07-07 13:02:02 +02:00
Alexey Andreev 2f74fd6f90 Don't exit with error status when node.js tests fail 2017-07-07 11:57:32 +03:00
Vyacheslav Gerasimov 4cef8728d7 Add layout file name in completion for Android Extension properties
#KT-11051 Fixed
2017-07-07 03:24:19 +03:00
Vyacheslav Gerasimov f59859842a Fix Android extensions import rename
#KT-17890 Fixed
2017-07-07 03:24:10 +03:00
Vyacheslav Gerasimov ee53e81e8e Fix Android resource reference folding
Properly fold qualified expressions and handle nested references

 #KT-18429 Fixed
2017-07-07 03:24:03 +03:00
Vyacheslav Gerasimov 7c6ffff198 Refactor Kotlin Gradle configurator 2017-07-07 03:23:34 +03:00
Vyacheslav Gerasimov 9810c10f8b Implement Add Kotlin library quickfix for GSK 2017-07-07 03:23:26 +03:00
Vyacheslav Gerasimov 2ec1a4311a Implement Kotlin configurator for GSK
#KT-14965 Fixed
2017-07-07 03:23:17 +03:00
Vyacheslav Gerasimov 2116877991 J2K: rename KotlinAndroidGradleModuleConfigurator .java -> kt 2017-07-07 03:22:28 +03:00
Simon Ogorodnik 9f340b40c2 Minor: Add test to check inferred types shown correctly in parameter info
#KT-11858 Obsolete
2017-07-06 20:40:53 +03:00
Alexander Udalov 0f15413d47 Minor, do not output stack trace on invalid contents of build file 2017-07-06 17:03:25 +03:00
Alexander Udalov 55468735df Rename -module argument to -Xbuild-file
To prevent confusion with Java 9 module-related arguments

 #KT-18754 Fixed
2017-07-06 17:03:25 +03:00