Toshiaki Kameyama
4563cf250d
"Add type" quick fix incorrectly processes vararg modifier with primitive type array initializer #KT-21544 Fixed
2017-12-08 15:46:45 +01:00
Dmitry Jemerov
846e50dcaa
Wording fix
2017-12-08 15:44:18 +01:00
Toshiaki Kameyama
270b41dc66
KT-13378 Provide ability to configure highlighting for !! in expressions and ? in types
2017-12-08 15:44:18 +01:00
Dmitry Jemerov
ab619c5655
Improve wording; mark inspection as cleanup tool
2017-12-08 15:41:22 +01:00
Toshiaki Kameyama
0e2bdf8995
Add inspection to sort modifiers #KT-21560 Fixed
2017-12-08 15:41:22 +01:00
Mikhail Glukhikh
e503c1d411
Suspend call detector: fix delegated properties checking
2017-12-07 15:54:47 +03:00
Mikhail Glukhikh
24bd31457c
Has suspend calls: fix suspend iterator case
2017-12-07 15:54:47 +03:00
Mikhail Glukhikh
4404439521
Introduce "redundant suspend" inspection #KT-19103 Fixed
2017-12-07 15:54:47 +03:00
Denis Zharkov
4ed6928e6b
Avoid building stubs in KtFile::getClasses for compiled files
...
In Gradle, JavaPsiFacade finds Kotlin compiled files as KtFile instances
and tries to obtain classes from them.
And while it returns an empty array anyway, it starts building
unnecessary stub when calling `isScript`
2017-12-07 12:53:33 +03:00
Denis Zharkov
5e334550eb
Optimize entry point check in UnusedSymbolInspection
...
It helps to avoid return types calculation for light-class element
2017-12-07 12:53:33 +03:00
Denis Zharkov
ac56965a99
Do not force loading all kt-files inside LazyPackageDescriptor constructor
...
Effectively it leads to all stubs being built for any once used package
The idea is that they only were used for FILE_TO_PACKAGE_FRAGMENT
that is mostly read in backend and rarely in the IDE, so we can replace
its usages with searching through related package-fragments
2017-12-07 12:53:33 +03:00
Denis Zharkov
d655c4075c
Introduce index for the set of top-level names by package
...
It should help with actual loading of all the stubs for all declarations
in the package on every access when it's implemented through
`getDeclarations()`
2017-12-07 12:53:33 +03:00
Denis Zharkov
2d82cb936e
Fix potential memory leak in light-classes
...
The problem is that they might indirectly retain a reference to an
obsolete ResolverForProject (it becomes outdated after out of block
modification).
The best solution would be to avoid preserving jvm-related diagnostics
(that are only used once to report them when highlighting, and exactly
they retains an obsolete resolve session)
But it seems that this may lead to a deep light-classes refactoring and
the temporary fix is storing diagnostics themselves in a CachedValue
bound to out of block modification tracker. There're no guarantees that
this would help, since CachedValue anyway is based on soft-reference
that is not the first thing GC collects
2017-12-07 12:53:33 +03:00
Denis Zharkov
f1cbf21f96
Simplify LazyLightClassDataHolder
...
- Use only stubs instead of full results in LazyLightClassData
- Store only stubs for inexactStub
2017-12-07 12:53:33 +03:00
Toshiaki Kameyama
b23d62c760
Transfer type to parent property in "Remove redundant getter" inspection
...
So #KT-21612 Fixed
2017-12-07 12:19:35 +03:00
Mikhail Glukhikh
834c3fe62b
Do not inline property setter if it's not required (e.g. ReplaceWith)
...
So #KT-21237 Fixed
2017-12-07 12:14:29 +03:00
Mikhail Glukhikh
bddaab9d48
Inline properties without setter / with default setter correctly
...
Related to KT-21237
2017-12-07 12:14:29 +03:00
Nikolay Krasko
fba50a8d15
Disable language injection for SpEL language as it cause to many troubles
...
It's known that there're several inspections that report warnings when
SpEL language is injected not to Java files if IDEA is before 173.
2017-12-07 12:02:39 +03:00
Michal Bendowski
6f350c032d
Recognize injections in annotations (KT-13636)
...
Recognize patterns from both Java (psiMethod) and Kotlin
(kotlinParameter) that match the annotation argument.
2017-12-07 12:02:37 +03:00
Nikolay Krasko
b7ba45c001
Reparse lambda expression after removing parameter comma (KT-21497)
...
Without the parameter it can become block.
#KT-21497 Fixed
2017-12-07 12:02:07 +03:00
Nikita Skvortsov
962c512882
optimize search for modules nodes
2017-12-06 18:55:09 +01:00
Nikita Skvortsov
cc580ca1dc
optimize check of module-per-source-set
2017-12-06 18:55:09 +01:00
Mikhail Zarechenskiy
7f0cca52ca
[NI] Use definitely not-null types for smartcasts
2017-12-06 18:36:13 +03:00
Alexey Sedunov
e2743c8f34
Rename: Do not use KotlinDirectoryAsPackageRenameHandler via dispatch handler
...
#KT-21604 Fixed
2017-12-06 14:17:56 +03:00
Alexey Sedunov
e1ed74008f
Rename: Fix exception on attempt to rename KtConstructorDelegationReference
...
#KT-21536 Fixed
2017-12-06 14:17:56 +03:00
Alexey Sedunov
ec85b708c9
Misc: Use delegate with predefined name for fake light methods
...
#KT-21414 Fixed
2017-12-06 14:17:56 +03:00
Alexey Sedunov
89352a295d
Maven Import: Support compiler arguments specified directly in <args>
...
#KT-21592 Fixed
2017-12-06 14:17:56 +03:00
Alexey Sedunov
288560eb37
Misc: Fix project configuration test
2017-12-06 14:17:55 +03:00
Alexey Sedunov
4369c6d26c
Minor: Update Maven import test data
2017-12-06 14:17:55 +03:00
shiraji
5d44037a2b
Support 'it op something' case in "redundant let" #KT-21373 Fixed
2017-12-05 19:23:44 +03:00
Mikhail Glukhikh
8257e14055
J2K: perform additional isActiveFor check before applying inspections
2017-12-05 18:21:22 +03:00
Mikhail Glukhikh
a90e3c2e45
Add "replace map.put with assignment" to J2K
...
Related to KT-21502
2017-12-05 18:18:25 +03:00
Dereck Bridie
8c305a137f
Introduce inspection "replace map.put with assignment" #KT-21502 Fixed
2017-12-05 16:57:36 +03:00
Nikolay Krasko
ab28bdf32f
Store in test data failure for quotedName name
2017-12-05 16:07:55 +03:00
Nikolay Krasko
57d62eb74a
Document error behaviour of evaluate expression lost sometime
2017-12-05 16:07:54 +03:00
Nikolay Krasko
b21fb1a375
Replace assertTrue with assertEquals in AbstractKotlinEvaluateExpressionTest
2017-12-05 16:07:53 +03:00
Nikolay Krasko
04e6aa76cf
Fix lint apiCheck lint
2017-12-05 16:07:53 +03:00
Mikhail Glukhikh
7118a4bf80
Fix KNPE in "introduce variable", add some name conflict introduce tests
...
So #KT-21530 Fixed
2017-12-05 15:29:45 +03:00
Mikhail Glukhikh
b09465ca0b
Unnecessary variable: do not suggest in case of name duplication
...
So #KT-20300 Fixed
2017-12-05 15:29:45 +03:00
Mikhail Glukhikh
844dd1c43c
Refactoring: Unnecessary variable inspection
2017-12-05 15:29:45 +03:00
Mikhail Glukhikh
52053695fe
Fix variable name validator (take parameters into account)
2017-12-05 15:29:44 +03:00
Toshiaki Kameyama
e341ec969f
"Join declaration and assignment" should remove 'lateinit' for 'var' #KT-21603 Fixed
2017-12-05 11:19:58 +09:00
Mikhail Glukhikh
ac3542c041
Minor cleanup
2017-12-04 15:58:13 +03:00
Toshiaki Kameyama
74d83997c7
Fix false "function is never used" for functions with '@JvmName'
...
So #KT-20435 Fixed
2017-12-04 15:58:13 +03:00
Mikhail Glukhikh
fb8dc7b590
Minor cleanup
2017-12-04 15:16:04 +03:00
Toshiaki Kameyama
0eec3ef1f8
Add / preserve semicolon after empty companion object #KT-21179 Fixed
2017-12-04 15:15:49 +03:00
Yan Zhulanow
3d1ca61f9f
Kapt: Remove artificial KaptError exception on errors from annotation processor (KT-21262)
2017-12-01 22:53:20 +09:00
Yan Zhulanow
037caf3a17
Kapt: Prefer Kotlin diagnostic locations over ones from stubs
2017-12-01 22:53:19 +09:00
Nikolay Krasko
2c79481f37
Add IdeaOpenApiClassFinder and BundledGroovyClassFinder to known finder
...
Fix testKnownNonClasspathFinder for 173 branch
2017-12-01 00:44:05 +03:00
Nikolay Krasko
e2418ec892
Remove custom runtime configure from AbstractParameterInfoTest
2017-12-01 00:44:05 +03:00