Toshiaki Kameyama
e903b2f92a
Unused symbol: don't report for finalize() method #KT-13311 Fixed
2018-11-13 10:26:06 +03:00
Toshiaki Kameyama
0bfcfb5716
ProtectedInFinalInspection: don't report for finalize() method #KT-13311 Fixed
2018-11-08 10:37:36 +03:00
Mikhail Glukhikh
9bc1dbb5bc
Fix testCleanup
2018-10-31 19:00:29 +03:00
Yan Zhulanow
9dd6efeb46
Fix sporadic false-positive "Receiver parameter is never used" for local functions (KT-26481)
2018-10-24 20:12:42 +03:00
Mikhail Glukhikh
a5e508a083
Unused symbol: handle functions with inline class parameters correctly
...
#KT-27357 Fixed
2018-10-19 19:07:59 +03:00
Mikhail Zarechenskiy
d0ed76ebc8
183: Fix exception about unmapped lambda argument from IDE inspection
...
Intention: obtain lambda argument for some parent call,
then get that call (for the lambda argument) and map
the argument to the parameter.
Before the fix, we were getting call for inner element,
not for the lambda argument and as a result, there were exceptions.
#KT-26873 Fixed
2018-09-26 18:03:34 +03:00
NikitaKatkov
d2536f207c
183: CoroutineNonBlockingContextChecker for warning on blocking calls in coroutines (KT-15525)
2018-09-13 19:36:51 +03:00
Denis Zharkov
aa74511378
Fix UnusedSymbolInspection for parameterless and suspend main functions
...
#KT-26574 Fixed
2018-09-12 09:49:25 +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
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
af17a4e961
For each parameter unused: do not report with explicit parameter
...
In this case we are duplicating compiler warning.
Related to KT-22068
2018-08-13 19:03:00 +03:00
Dennis Cornwell
f3b0378918
"ForEach parameter unused": don't report destructured parameters
...
Related to KT-22068
2018-08-13 19:02:56 +03:00
Dennis Cornwell
e81eee4cc1
Introduce inspection for determining if a forEach parameter is unused
...
#KT-22068 Fixed
2018-08-13 19:02:53 +03:00
Mikhail Glukhikh
e15fc7da15
Fix two inspection tests (bunch file -> original file)
2018-08-06 19:04:07 +03:00
Vyacheslav Gerasimov
0103c0d2fd
Switch to 182 platform
2018-08-02 18:17:06 +03:00
Toshiaki Kameyama
4c34ced1fa
Introduct "Redundant 'with' call" inspection #KT-6633 Fixed
2018-08-02 09:23:27 +03:00
Toshiaki Kameyama
4d1b8405cb
"Suspicious ==/===": do not report when comparison with null is included
...
So #KT-24001 Fixed
2018-07-25 16:15:59 +03:00
Nikolay Krasko
7b6df0a7cc
Don't delete unresolved imports in cleanup inspection (KT-25678)
...
It looks like they were deleted because of the bug in search for deprecated
imports search.
#KT-25678 Fixed
2018-07-24 17:09:14 +03:00
Mikhail Glukhikh
cc1d9e88d5
1.3 migration: make inspections working for non-experimental coroutines
2018-07-24 10:24:18 +03:00
Nikolay Krasko
5b34498162
Do not report code style warnings on overridden declarations (KT-25416)
...
#KT-25416 Fixed
2018-07-17 02:22:14 +03:00
Nikolay Krasko
b51880332e
Migration inspection for fromClosedRange() call (KT-17176)
...
#KT-17176 Open
2018-07-11 14:25:24 +03:00
Mikhail Glukhikh
7e0e7dc983
Unused symbol: remove forced "used" from actual declarations
...
Now we really check whether actual declaration has usages
(in expect or actual code) or not
Related to KT-17512
Related to KT-15666
2018-06-26 15:36:07 +03:00
Dmitry Petrov
f956e8d85d
Record special descriptor in REFERENCE_TARGET for type alias object
...
If a type alias is used to reference an object (companion object) as a
qualifier, record FakeCallableDescriptorForTypeAliasObject in
REFERENCE_TARGET. This tells IDE that type alias was used in the file,
thus, if it's imported, such import isn't redundant.
REFERENCE_TARGET is used mostly by IDE and by ClassifierUsageChecker,
which we also have to update to handle qualifiers with
FakeCallableDescriptorForTypeAliasObject in REFERENCE_TARGET.
Rewrite some parts of ClassifierUsageChecker for cleaner interaction.
#KT-21863 Fixed Target versions 1.2.40
2018-06-20 17:16:25 +03:00
Mikhail Glukhikh
9ef89447b3
Sealed sub-class -> object: handle equals, suggest "add equals"
...
Before this commit, sealed sub-class without state was considered
a style issue.
After this commit, sealed sub-class without state AND custom equals
is considered a probable bug,
because comparison of its instances is very fragile.
Alternative fix (generate equals & hashCode by identity) is added.
2018-06-19 11:20:26 +03:00
Mikhail Glukhikh
b235af0656
Can be private: correct detection of calls inside inline accessors
2018-06-13 19:17:50 +03:00
Mikhail Glukhikh
faa8d92560
Unused receiver: do not report on actual declarations #KT-24562 Fixed
2018-06-13 18:12:36 +03:00
Mikhail Glukhikh
38632c2937
Can be private: correct detection of calls inside inline function
...
So #KT-22180 Fixed
So #KT-22094 Fixed
2018-06-13 18:12:34 +03:00
Mikhail Glukhikh
a8737a1278
Can be private -> could be private (violation of naming convention)
2018-06-13 18:12:33 +03:00
Mikhail Glukhikh
6c8276b701
Do not report "can be private" on annotated declarations #KT-24422 Fixed
2018-06-13 18:12:28 +03:00
Mikhail Glukhikh
d1155070a7
Do not report "can be private" on expect or actual declarations
...
So #KT-24374 Fixed
So #KT-24537 Fixed
2018-06-13 18:12:27 +03:00
Mikhail Glukhikh
c95ed9fd20
Result unused: a few enhancements for PSI checks
...
Related to KT-15063, KT-24433
2018-05-22 17:13:48 +03:00
Mikhail Glukhikh
b8375d4864
Extend "async result unused" to "Deferred result unused" #KT-15063 Fixed
2018-05-22 17:07:05 +03:00
Mikhail Glukhikh
ffcfa51fbf
Introduce inspection "async result unused" #KT-24433 Fixed
2018-05-22 16:39:14 +03:00
Nikolay Krasko
3ef67e1d9d
Inspection for highlighting problem API usage
...
It's planned to use this inspection for show patchset branches problems
during development process.
2018-05-17 12:27:29 +03:00
Mikhail Glukhikh
e933bb8220
Unused symbol suppression: get annotation descriptors via entries
...
Otherwise we miss use-site targeted annotations,
and getUseSiteTargetedAnnotations does not help
So #KT-20332 Fixed
2018-05-08 18:37:09 +03:00
Mikhail Glukhikh
df59af8ee8
Move sort modifiers test to inspection local group
...
This should fix test in 181 branch
2018-04-27 17:26:56 +03:00
Nicolay Mitropolsky
06e65e5f48
182: removing Spring from Kotlin-Ultimate
...
because all necessary functionality is already in IDEA-Ultimate
2018-04-21 11:25:49 +03:00
Mikhail Glukhikh
ef3ba5f0b1
Test local inspections on the fly via highlighting
...
Fixes problem with INFORMATION highlight type in batch mode (IDEA 181).
It's no more required to report INFORMATIONs in unit tests in batch.
2018-04-18 16:14:43 +03:00
Toshiaki Kameyama
ff63ba4dc1
Add inspection: redundant internal in local anonymous object / class
...
So #KT-23617 Fixed
2018-04-18 11:17:52 +03:00
Gabryel Monteiro
df7968678a
Add inspection: Refactor sealed sub-class to object #KT-20305 Fixed
2018-04-11 14:51:00 +03:00
Mikhail Glukhikh
34de241154
Add inspection to detect public API with implicit type
2018-03-29 11:39:01 +02:00
Toshiaki Kameyama
b9e7e8fca3
Sort modifiers: process final modifier correctly #KT-22954 fixed
2018-03-07 13:34:25 +03:00
Alexey Sedunov
d690aedb89
References: Fix resolution of delegate reference for local variables
...
#KT-22229 Fixed
2018-03-06 15:15:40 +03:00
Mikhail Glukhikh
664a25ce81
Polish KT-22011 inspection: message, level, group, range, etc.
2018-02-28 12:10:24 +03:00
Toshiaki Kameyama
7d6cb7805c
Add inspection: Java mutator method used on immutable Kotlin Collections
...
In particular, fill, reverse, shuffle, sort calls are reported
So #KT-22011 Fixed
2018-02-28 11:52:44 +03:00
Mikhail Glukhikh
7995ae05c5
Introduce inspection for redundant not-null extension receiver of inline
...
Related to KT-22303
2018-02-06 14:17:01 +03:00
Yan Zhulanow
0a3a493f25
AllOpen: Fix incorrect 'accessing non-final property in constructor' warning (KT-16619)
2018-01-15 12:39:29 +09:00
Dmitry Jemerov
84d63051f9
Add a rule for invalid characters in names
2018-01-02 13:17:31 +01:00
Dmitry Jemerov
f83c5344d7
Apply same style for top-level and object properties
...
#KT-20437 Fixed
2018-01-02 12:46:03 +01:00