Igor Yakovlev
bd9877cc62
Rename testdata from DestructuringDeclarations to DestructionDeclarations
2020-03-26 12:35:49 +03:00
Toshiaki Kameyama
0b9106b0f8
CanBePrimaryConstructorPropertyInspection: do not report for 'open' property used in class initializer in 'open' class
2020-02-28 17:21:56 +07:00
kvirolainen
90cfa80683
KT-27601 keep imports for extension functions used in kdoc
2020-02-22 08:55:50 +01:00
Roman Golyshev
4042214bb2
Fix tests broken by enhanced RedundantSamConstructor inspection
...
- The inspection now works in more cases, so the test data had to be
updated accordingly
2020-02-20 17:27:41 +03:00
Roman Golyshev
46ae6136cb
Rewrite RedundantSamConstructorInspection to support more cases
...
- Now inspection does not rely on synthetic descriptors at all, instead
it uses `SamConversionOracle` and `SamConversionResolver` to detect
if the argument type support SAM conversion
- This transparently considers all language features like
`SAM conversions for kotlin functions`, `Functional interfaces` etc.
- In case of multiple SAM arguments, part of them can be converted only
when `SAM conversion per argument` is enabled
- Fix inspection and nj2k tests that were failing because of better
working inspection
- Rewrite automatically fixes multiple bugs that were present
- ^KT-36367 ^KT-36368 ^KT-36296 ^KT-36395 Fixed
2020-02-19 17:16:17 +03:00
Dmitry Gridin
cb66625688
TrailingComma: fix case of when without expression or property
...
#KT-34744
#KT-36393 Fixed
2020-02-06 23:55:59 +07:00
Dmitry Gridin
195d9020a6
TrailingCommaInspection: shouldn't be associated with formatter settings
...
#KT-34744
2020-02-04 21:34:53 +07:00
Toshiaki Kameyama
1ba8b52856
Constructor parameter is never used as a property: do not report if parameter is used as a reference
...
#KT-34686 Fixed
2020-01-27 11:33:50 +03:00
Dmitry Gridin
7627834dd0
TrailingCommaInspection: report Missing trailing comma on argument
...
#KT-34744
2020-01-23 17:36:38 +07:00
Dmitry Gridin
63ee723928
TrailingCommaPostFormatProcessor: improve findInvalidCommas
...
Add case for line break between argument and comma
#KT-34744
2020-01-23 17:36:38 +07:00
Dmitry Gridin
ca1aa6ed4e
TrailingCommaInspection: should report Missing line break
...
#KT-34744
2020-01-23 17:36:38 +07:00
Dmitry Gridin
976db65911
TrailingCommaInspection: replace "Redundant trailing comma" message with "Useless trailing comma"
...
#KT-34744
2020-01-20 16:56:06 +07:00
Dmitry Gridin
6c166e744a
Implement TrailingCommaInspection
...
#KT-34744
2020-01-17 21:02:55 +07:00
Nikolay Krasko
73a152ccc7
Re-mute inspection tests in AS34 (KT-32856)
2019-11-22 22:12:39 +03:00
Leonid Startsev
24688f3503
Do not disable 'redundant visibility modifier' inspection completely in Explicit API mode.
...
Instead, disable it only for effectively public declarations.
Add tests for this IDE inspection.
2019-11-06 19:54:00 +03:00
Nikolay Krasko
e9f8693a73
as34: Mute several inspection/intention tests in as34 (KT-32856)
2019-10-03 11:56:01 +03:00
Alexander Podkhalyuzin
66bed85176
Fixed testdata for new inference
2019-09-26 16:25:50 +03:00
Toshiaki Kameyama
784ba69b7a
"Cleanup code": remove 'final' keyword for overridden function with non-canonical modifiers order
...
#KT-33060 Fixed
2019-09-24 18:28:00 +07:00
Nikolay Krasko
4d0fc1dc22
Remove 182 support
...
#KT-33536 Fixed
2019-08-30 12:13:44 +03:00
Dmitry Gridin
b04fbbd43b
Fix testUnusedSymbol_class_inspectionData_Inspections_test test
2019-08-28 19:11:42 +07:00
Dmitry Gridin
7040639c38
Fix false positive "Not-null extension receiver of inline function can be made nullable" with operator fun invoke
...
#KT-25786 Fixed
2019-06-19 12:16:41 +07:00
Dmitry Gridin
f48640f91c
Fix test for UnsafeCastFromDynamicInspection
2019-06-07 12:23:55 +07:00
Toshiaki Kameyama
354f8f0bf1
Redundant 'suspend' modifier inspection: don't report when function has suspend operator invoke
...
#KT-25465 Fixed
2019-05-18 11:54:57 +03:00
Dmitry Gridin
eee8d0263d
Fix "Unused import" for 'provideDelegate'
...
#KT-31319 Fixed
2019-05-14 21:01:21 +07:00
Dmitry Gridin
7fe0503337
Unused import: support also imports as alias
...
#KT-12392 Fixed
2019-05-06 18:10:52 +07:00
Dmitry Gridin
9062a2fe72
Fix false positive "Unused import directive" for imports under several alias
...
#KT-30949 Fixed
2019-05-06 18:10:51 +07:00
Ilya Kirillov
02c8e4cede
New J2K: Do not remove semicolon after if expression when then branch is empty in RedundantSemicolonInspection
2019-04-03 11:24:14 +03:00
Dmitry Gridin
0237dc3f4b
Fix inspections test 'Unused symbol' for enum entry
2019-03-27 12:27:48 +07:00
Toshiaki Kameyama
0f45e3d238
Fix false positive for HasPlatformType with member extension on 'dynamic'
...
#KT-29812 Fixed
2019-03-11 19:28:08 +03:00
Toshiaki Kameyama
7cba11ff28
Can be private: don't report if it's used in inline property
...
#KT-29085 Fixed
2019-02-05 11:34:08 +03:00
Nikolay Krasko
64b2527e31
Revert allowing upper case letters in packages (KT-27900)
2019-01-31 13:40:37 +03:00
Mikhail Glukhikh
04bd5139d5
Don't suggest "return type is..." inspections for anonymous functions
...
#KT-29290 Fixed
2019-01-28 16:03:55 +03:00
Denis Zharkov
37614254d7
Fix test on unused import suppression
...
Before the fix for KT-7185, the file looked like:
package suppression
@file:Suppress("UnusedImport")
import java.io.* // unused
And it was parsed incorrectly, because @file: annotations
should come before package directive
But after fix, import directives started being parsed that lead
to wrong unused import (because suppression wasn't parsed still)
2019-01-17 14:56:42 +03:00
Nikolay Krasko
2373c9d838
Allow underscore in packages and forbid uppercase letters (KT-27900)
2018-12-07 18:32:09 +03:00
Nikita Katkov
297054037c
Dispatchers IO is now considered non-blocking context
...
See BlockingMethodInNonBlockingContextInspection
2018-12-07 15:19:12 +03:00
Vyacheslav Gerasimov
d84c5b1608
Switch to 183 platform
2018-12-06 20:16:58 +03:00
Mikhail Glukhikh
d909162a89
Rename "Result is Result" inspection to "Direct use of result type"
2018-11-30 15:14:26 +03:00
Toshiaki Kameyama
c49770d9a7
Unused symbol: don't report for type parameter in open class #KT-23639 Fixed
2018-11-20 11:18:18 +03:00
Toshiaki Kameyama
bc4d353134
Unused symbol: fix message for interface #KT-28286 Fixed
2018-11-20 11:14:45 +03:00
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