Commit Graph

74 Commits

Author SHA1 Message Date
Denis Zharkov 38bafaa35c Drop annotations deprecation related things: diagnostics, quickfixes 2015-09-18 09:34:25 +03:00
Michael Nedzelsky 9fd968d59e extend test for code cleanup with changing visibility from private to internal for declarations, which are used outside of their file. 2015-09-10 16:50:47 +03:00
Denis Zharkov 372e35436a Implement annotation related migrational quick fixes 2015-09-10 10:04:59 +03:00
Denis Zharkov 31244edec9 Deprecate deprecated in favor of Deprecated 2015-09-04 18:19:31 +03:00
Valentin Kipyatkov b2ea369129 Don't report conflicting extension for marked with @HiddenDeclaration 2015-09-03 15:55:56 +03:00
Valentin Kipyatkov 10f7d6d7dd Inspection (and quickfix) for extension propeties conflicting with synthetic ones 2015-09-03 15:55:54 +03:00
Nikolay Krasko 1132652026 Update to 142.4245.2: Temprorary modify test data after IDEA update
The problem is in order of cleanup actions. Each action can invalidate psi and that can prevent next action from execution.
2015-09-02 15:10:43 +03:00
Valentin Kipyatkov e98edbcbac Code cleanup to remove deprecated symbol imports that have ReplaceWith 2015-08-31 15:48:25 +03:00
Natalia Ukhorskaya bf7f56d458 Redundant Sam Constructor inspection 2015-08-24 12:37:37 +03:00
Evgeny Gerashchenko 4b6991603f Minor. Split test file into two. 2015-08-15 12:29:46 +02:00
Evgeny Gerashchenko 799368386b KT-6877 Wrong unused function inspection on anonymous object member
#KT-6877 fixed
2015-08-15 12:29:46 +02:00
Evgeny Gerashchenko da4be8a0f5 KT-7484 Companion object is marked unused if it's only usages are statically imported from Java
#KT-7484 fixed
2015-08-15 12:29:44 +02:00
Evgeny Gerashchenko fe1d4e38b3 KT-8273 Don't mark serialVersionUID as unused
#KT-8273 fixed
2015-08-15 12:29:42 +02:00
Evgeny Gerashchenko 1cf433909b Test for KT-7134 Command line entry point (main function is highlighted as unused)
#KT-7134 obsolete
2015-08-15 12:29:12 +02:00
Mikhail Glukhikh 3f14e74b08 Drop old enum syntax. Comma / semicolon are now a syntactic part of enum entry.
Comma must present now between enum entries, semicolon between last entry & first member, constructor calls must be without colons / specifiers.
A swarm of tests fixed accordingly.
2015-08-11 10:38:10 +03:00
Valentin Kipyatkov 851057a9ef Highlighting duplicated and redandant *-imports as unused 2015-07-22 21:16:15 +03:00
Valentin Kipyatkov af192698ed Imports from current package are redundant too 2015-07-22 21:11:00 +03:00
Valentin Kipyatkov 344529a09a Fixed test 2015-07-22 21:11:00 +03:00
Valentin Kipyatkov e5d8eecc9d Unused import highlighting
#KT-5236 Fixed
2015-07-22 21:11:00 +03:00
Alexander Udalov 636b63a8c5 Make "reflection not found" a warning, provide a quick fix
Reporting the warning on each "::", as ReflectionNotFoundInspection did, is not
correct anymore, because for example name/get/set on properties works perfectly
without kotlin-reflect.jar in the classpath. So instead we report the warning
on calls to functions from reflection interfaces. This is not perfect either
because it's wrong in projects with custom implementations of reflection
interfaces, but this case is so rare that the users can suppress the warning
there anyway

 #KT-7176 Fixed
2015-07-10 20:10:11 +03:00
Evgeny Gerashchenko 8fcbd44ad4 KT-8137 AE at JetSourceNavigationHelper.convertNamedClassOrObject() on function local class with several constructor parameters
#KT-8137
 #EA-69470 fixed
2015-07-01 19:43:54 +03:00
Evgeny Gerashchenko b068a1dd5f Added test for implicit receiver in class. 2015-06-17 13:14:07 +03:00
Evgeny Gerashchenko 154b0d8351 KT-7899 "Do not check if annotated by" setting for "Unused symbol" doesn't affect properties
#KT-7899 fixed
2015-06-17 13:14:06 +03:00
Evgeny Gerashchenko cc70ea2586 KT-7883 Receiver parameter falsely marked as unused
#KT-7883 fixed
2015-06-17 13:14:06 +03:00
Denis Zharkov 980499e331 Drop javaClass in annotations related things from inspections/quickfixes 2015-06-12 09:55:09 +03:00
Denis Zharkov 26864a4407 Get rid of annotation syntax deprecation related things 2015-06-12 09:23:32 +03:00
Alexander Udalov 64b60718e3 Finish off old deprecated function/extension function classes
This reverts commit d14e5b8a72.
2015-06-10 14:41:57 +03:00
Valentin Kipyatkov 5e5e71882e Code cleanup to work more reliably with nested problems 2015-05-28 13:45:24 +03:00
Valentin Kipyatkov 2b61bca6dd Code cleanup includes deprecated symbol usage fixes + code cleanup does not crash on nested usages to fix 2015-05-28 13:45:24 +03:00
Alexander Udalov d14e5b8a72 Restore and deprecate Function{n}/ExtensionFunction{n} classes for easier migration
Users' Java code will not break in common cases (when passing functions to
Kotlin), and deprecation warnings will be reported.

Provide an inspection with a quick fix which allows to replace deprecated
function class usages to the new classes. Include this fix to the "code
cleanup" action
2015-05-28 01:20:05 +03:00
Denis Zharkov 53e9234ea9 Add quickfix for replacing positioned arguments in Java annotation 2015-05-27 17:41:27 +03:00
Evgeny Gerashchenko 88021ffc73 KT-7381 Receiver parameter is never used for native extension function
#KT-7381 fixed
2015-05-27 16:07:09 +03:00
Evgeny Gerashchenko 2a23bc79f3 KT-7256 False "Receiver parameter not used" for property with delegation
#KT-7256 fixed
2015-05-27 16:07:09 +03:00
Dmitry Jemerov 58e4ff0502 Add quickfixes for unnecessary casts and nullability operations to cleanup inspection. Rewrite two quickfixes from Java to Kotlin. Add inspection description. Use marker interface for identifying quickfixes applicable for code cleanup. 2015-05-26 14:41:23 +02:00
Dmitry Jemerov e2dbfebf32 add more quickfixes to cleanup action 2015-05-26 14:41:21 +02:00
Dmitry Jemerov 6e7ea662c8 "Code Cleanup" action to migrate all instances of deprecated syntax to new one 2015-05-26 14:41:21 +02:00
Evgeny Gerashchenko 0488229a61 KT-7693 Unused constructor parameter is not detected if class is constructed with named argument
#KT-7693 fixed
2015-05-25 18:33:08 +03:00
Evgeny Gerashchenko 533935f2c0 KT-7472 function of anonymous class is never used
#KT-7472 fixed
2015-05-14 21:51:07 +03:00
Dmitry Jemerov 625096466e IDE testdata: s/trait/interface 2015-05-13 16:13:13 +02:00
Dmitry Jemerov f93eeeb563 fix tests by adding missing 'init' keywords to testdata 2015-04-29 14:07:05 +02:00
Denis Zharkov 470ad93328 Do not report inspection "no reflection" in annotation entries
Annotation codegen shouldn't use something from reflection.jar
2015-04-23 11:22:39 +03:00
Evgeny Gerashchenko e1f6dfa52d EA-67458 - assert: UnusedSymbolInspection.hasNonTrivialUsages 2015-04-22 11:32:17 +03:00
Evgeny Gerashchenko 508c7a58b6 KT-7377 Throwable: Empty PSI elements should not be passed to createDescriptor from UnusedReceiverParameterInspection
#KT-7377 fixed
2015-04-13 15:04:00 +03:00
Evgeny Gerashchenko 5c0a81fae1 Minor. Renamed test data. default object -> companion object. 2015-04-08 21:15:28 +03:00
Evgeny Gerashchenko 86f91ade1a Minor. Fixed syntax error in test data. 2015-04-08 15:14:11 +03:00
Alexander Udalov 5b2ffd50d3 Use mock JDK instead of full in IDEA plugin tests 2015-04-02 21:57:51 +03:00
Alexander Udalov 3335752462 Do not report "no reflection" inspection where reflection is not used
#KT-7059 Fixed
2015-03-23 15:54:33 +03:00
Evgeny Gerashchenko 1946360a80 Introduced "Unused receiver parameter" inspection. 2015-03-20 19:34:16 +03:00
Evgeny Gerashchenko edd51908ec KT-7021 Don't mark companion object as unused if some stuff from it is used
#KT-7021 fixed
2015-03-20 19:34:15 +03:00
Evgeny Gerashchenko 2fcee37b58 Temporarily disabled "Unused symbol" for companion objects. 2015-03-18 15:20:45 +03:00