Vyacheslav Gerasimov
4fe040eeb9
Fixed several bugs in Android lint ApiDetector (KT-15002, KT-12024, KT-14737, KT-14825, KT-12023, KT-15018)
...
Merged IntelliJApiDetector to ApiDetector
#KT-15002 Fixed
#KT-12024 Fixed
#KT-14737 Fixed
#KT-14825 Fixed
#KT-12023 Fixed
#KT-15018 Fixed
(cherry picked from commit e830e8b55fa2e354303a6c604b3905285a05b9db)
2017-01-25 10:50:36 +03:00
Vyacheslav Gerasimov
d0f1b81bfa
Fixed bugs in Kotlin Android Lint CleanupDetector
...
#KT-14780 Fixed
#KT-14677 Fixed
(cherry picked from commit f591b4958e4a836d37d70c2ad8ff15e626c6342a)
2017-01-25 10:50:35 +03:00
Dmitry Jemerov
f8f73d338b
Use UTryStatement.isResources() instead of getting the resource list (for which there is no portable API ATM)
2017-01-12 14:30:49 +01:00
Yan Zhulanow
1d9fe685ac
Update lint diagnostics to Uast 1.0.8
2016-12-30 18:41:46 +03:00
Yan Zhulanow
7152c9c789
Use uast-common and uast-java as an external dependency
2016-12-30 18:41:45 +03:00
Vyacheslav Gerasimov
60bc35b787
Implemented suppress lint intention action for android lint (KT-12020)
...
#KT-12020 Fixed
2016-11-21 17:16:27 +03:00
Vyacheslav Gerasimov
29b9521596
Android lint check for api requirements for classes in catch clause (KT-13243)
...
Added test for #KT-14047, #KT-13243 Fixed, #KT-14047 Fixed
2016-11-03 17:21:17 +03:00
Yan Zhulanow
4188ef6e53
Fix conformance test
2016-11-01 19:36:32 +03:00
Yan Zhulanow
7338980d00
Lint: Add several checkCancelled() checks to UElementVisitor
2016-11-01 19:36:32 +03:00
Yan Zhulanow
65cea7e92c
Lint: Use IntellijApiDetector in IDE
2016-11-01 19:36:32 +03:00
Yan Zhulanow
fee54d9b86
Lint: Remove SdkWrapper and AnroidModelFacade (was needed in Android Studio 1.5)
2016-11-01 19:36:31 +03:00
Yan Zhulanow
7404b91cb3
Lint: Fix diagnostic tests
2016-11-01 19:36:31 +03:00
Yan Zhulanow
565ca0f7a3
Lint: Fix compilation errors after replacing diagnostics
2016-11-01 19:36:31 +03:00
Vyacheslav Gerasimov
2be9a083ad
Lint: Android Lint diagnostics fixes
2016-11-01 19:36:31 +03:00
Yan Zhulanow
c2ddd943f9
Lint: Update diagnostics because of the new Uast. Also, these diagnostics are from AS 2.2.
2016-11-01 19:36:31 +03:00
Nikolay Krasko
72c6c66b48
API Change: Implement new method isSuppressAll()
2016-09-20 15:10:48 +03:00
Nikolay Krasko
d96863da93
Fix severe freezes because of long lint checks on large files (KT-13071)
...
- Run lint analyze under indicator with write action priority. Otherwise ProgressManager.checkCanceled() checks doesn't work
- Move ProgressManager.checkCanceled() up or they are not called in large files without lint warnings
#KT-13071 Fixed
2016-09-19 18:53:52 +03:00
Nikolay Krasko
67f353903e
Show lint diagnostics even if there're errors in the file (KT-12022)
...
It also affects working with KotlinChangeLocalityDetector. Right after error is fixed in local context file is still reported as having errors and diagnostics are not counted.
#KT-12022 Fixed
2016-09-02 13:41:24 +03:00
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