Commit Graph

52 Commits

Author SHA1 Message Date
Mikhail Glukhikh 692623cb55 Cleanup: smart casts of safe call receiver applied (do NOT cherry-pick to 1.0.X) 2016-07-27 16:24:18 +03:00
Yan Zhulanow bb083a51cc KT-12895, EA-84877: Fix NoSuchMethodError thrown when saving a Kotlin file.
newOutputStreamSupplier() is deprecated and was deleted in Guava 18.
2016-06-29 17:52:25 +03:00
Yan Zhulanow 6e6c9682ec Fix KT-12173 (Kotlin Lint False Positive for "Toast created but not shown" inside SAM adapter).
(cherry picked from commit 4940d3b)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 1720f8b4ff KT-12681 (Lint: run from main menu / Analyze: Kotlin inspections reports only java source)
Cause we've copied Lint diagnostics to the Kotlin project, there's no harm in making them Kotlin-only.
(cherry picked from commit 7105648)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 8f75ababde KT-12674 "Calling new methods on older versions" errors for inlined constants
Inlined constants from Java should not be detected.
(cherry picked from commit b34ee4e)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 206e439595 KT-12023 Kotlin Lint: Cast doesn't trigger minSdk error
Check Kotlin as/is types.
(cherry picked from commit c0db8e0)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 1de05b965e KT-12015 (Kotlin Lint False Positive for Bundle.getInt())
Java approach is not sufficient here, in Kotlin receivers can be implicit.
Use Kotlin extension/dispatch receivers to figure out the receiver type for our method call.
(cherry picked from commit cdedf1d)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 1a0acf3208 Fix EA-82166. NPE. loadModel() can return null, and it's a bad idea to call methods on a null pointer.
(cherry picked from commit cf033d0)
(cherry picked from commit 37dc0ae)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 001d5397c5 Fix EA-82449. Do not run Lint diagnostics if the project is already disposed
(cherry picked from commit 98b2899)
(cherry picked from commit 2179ee8)
2016-06-24 15:10:19 +03:00
Yan Zhulanow c5e0f992e5 KT-12387 Fix Performance problem with Lint in IDE
Call checkCanceled() before running Lint diagnostics (UastScanner)
(cherry picked from commit c6e328a)
(cherry picked from commit 696475e)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 4ee19cce93 Fix #KT-12047 (Kotlin Lint: "Missing @JavascriptInterface on methods" does not report anything)
(cherry picked from commit 61e8e01)
(cherry picked from commit dbc54e2)
2016-06-24 15:10:19 +03:00
Yan Zhulanow d1447faf2b Fix #KT-12015 (Kotlin Lint False Positive for Bundle.getInt()).
Android firstly checks API version against the function call receiver type, so we should do the same to be consistent.
(cherry picked from commit c3d01ec)
(cherry picked from commit 5c78acc)
2016-06-24 15:10:19 +03:00
Alexander Udalov da42023dd9 Support new callable reference expressions in UAST
Manually mute the class literal test in apiCheck.kt; support for new class
literal expressions is postponed because it's not straightforward to combine
both unbound (Type::class) and bound (instance::class) class literals in one
UClassLiteralExpression: in Java they're two very different expressions
(Type.class and instance.getClass())
2016-05-26 22:22:41 +03:00
Nikolay Krasko a801d8fa6f Don't use reference to asm directly. Use asm from Idea instead. 2016-05-20 15:51:55 +03:00
Nikolay Krasko add07ad1a5 Remove unused import 2016-05-18 13:33:18 +03:00
Nikolay Krasko 89a10578f4 Remove unused method that causes compatibility problem in update AS plugin 2016-05-17 21:34:00 +03:00
Mikhail Glukhikh 9bd3be68f7 Code cleanup: protected is effectively private 2016-05-13 17:57:17 +03:00
Yan Zhulanow 99b619497a Fix EA-81689 2016-05-11 21:37:16 +03:00
Valentin Kipyatkov b551886889 Code cleanup: removed redundant semicolons 2016-04-29 11:26:25 +03:00
Yan Zhulanow d478b90fb8 Lint: Fix KT-12009: IAE at JavaContext.getLocation() 2016-04-22 19:48:28 +03:00
Yan Zhulanow 9ea7a4f112 Lint: run inspections only for Kotlin 2016-04-22 19:48:28 +03:00
Yan Zhulanow 04ed20c574 Lint: Remove AssertDetector (unrelated to Kotlin) 2016-04-22 19:48:28 +03:00
Yan Zhulanow 16b831196a Fix EA-81689 2016-04-22 19:48:28 +03:00
Yan Zhulanow 33f9a0c798 Lint: Review changes 2016-04-21 20:08:46 +03:00
Yan Zhulanow a2b1eb7ee8 Lint: Fix KT-11919 ("Missing Parcelable CREATOR field" rule is not accurate) 2016-04-21 20:08:46 +03:00
Yan Zhulanow 33434a3c5b Lint: Fix KT-11939 (@SuppressLint("PrivateResource") doesn't work) 2016-04-21 20:08:46 +03:00
Yan Zhulanow 574aa5debe Lint: Fix KT-11924 (False positive on beginTransaction() should be completed with a commit() call) 2016-04-21 20:08:46 +03:00
Yan Zhulanow 35fca9171c Lint, Minor: Fix compilation 2016-04-21 20:08:46 +03:00
Yan Zhulanow 64dbba8e2c Lint: Fix EA-81613, EA-81468 2016-04-21 20:08:46 +03:00
Yan Zhulanow 8304c85f4f Lint: support both IJ 15 and Android Studio 2.0 (different Android plugins)
Dirty hack :(
2016-04-14 17:20:23 +03:00
Yan Zhulanow c45bdef0c2 Minor: Add idea -> lint_idea dependency (fixes IDEA tests), change lint sdk to 1.8 2016-04-08 16:27:50 +03:00
Yan Zhulanow c13c24becc Uast, Lint: Update and fix tests 2016-04-08 15:39:58 +03:00
Yan Zhulanow 21a2115501 Uast: Add Uast visitor extensions instead of additional checkers 2016-04-08 15:39:58 +03:00
Yan Zhulanow 6b30b8ce1f Other code review changes 2016-04-08 15:39:58 +03:00
Yan Zhulanow 991e783ccf Lint: Make lint run normally on both older and newer versions of IDEA (IdeaAndroidProject was replaced by AndroidGradleModel) 2016-04-08 15:39:58 +03:00
Yan Zhulanow 41979de71e Uast: Rewrite visitor 2016-04-08 15:39:58 +03:00
Yan Zhulanow 04e8161f1d Code review changes 2016-04-08 15:39:58 +03:00
Yan Zhulanow 7ed5b6c10b Minor: rename NoTraverse to LeafUElement 2016-04-08 15:39:58 +03:00
Yan Zhulanow 7007261d7b Rename UastHandler to UastCallback 2016-04-08 15:39:58 +03:00
Yan Zhulanow 109c76c87d Minor: remove @author comments 2016-04-08 15:39:58 +03:00
Yan Zhulanow 984f10ddff Lint: fix some more detectors 2016-04-08 15:39:58 +03:00
Yan Zhulanow aa4f2e426b Lint: Remove lint suppress quickfix (does not work currently with Kotlin) 2016-04-08 15:39:58 +03:00
Yan Zhulanow 5cf5024d08 Lint: fix Lint additional checkers with the custom handlers 2016-04-08 15:39:58 +03:00
Yan Zhulanow 5bc31112c1 Lint: Remove IntellijApiDetector 2016-04-08 15:39:58 +03:00
Yan Zhulanow 3a7f29bfc5 Lint: Support visitResourceReference() in Uast 2016-04-08 15:39:58 +03:00
Yan Zhulanow 862f824bcc Kotlin Uast: Support object literals 2016-04-08 15:39:58 +03:00
Yan Zhulanow 18e963422b Lint: Remove diagnostics unrelated to uast.
All these diagnostics are already present in the Android plugin, so there's no need in them here.
2016-04-08 15:39:58 +03:00
Yan Zhulanow ed10829091 Uast: Allow to search for a static members (in Kotlin static members are located inside the companion objects).
Companion objects support.
2016-04-08 15:39:58 +03:00
Yan Zhulanow d1939d52bc Replace UastConverter with UastLanguagePlugin, allow additional checkers 2016-04-08 15:39:58 +03:00
Yan Zhulanow 4ef6016ee8 Lint: Rename all Lint inspections to KLint to provide unique short names 2016-04-08 15:39:58 +03:00