Commit Graph

95 Commits

Author SHA1 Message Date
Vyacheslav Gerasimov be900a76d8 Android Lint: check for array initializer in SuppressLint 2017-09-01 13:32:08 +03:00
Vyacheslav Gerasimov aedb4c0ade Android Lint: Fix constant evaluation in annotation parameter
#KT-17785 Fixed Target Versions 1.1.5
2017-08-23 13:18:56 +03:00
Vyacheslav Gerasimov e06cb1ec39 Android Lint: Use Uast to check for SuppressLint annotation
#KT-14800 Fixed Target versions 1.1.5
2017-08-23 13:18:42 +03:00
Yan Zhulanow a142c2f8fa Fix compilation IntelliJLintClient, IntelliJLintProject, IDEAndroidLayoutXmlFileManager 2017-08-10 22:05:45 +03:00
Yan Zhulanow 448fa8495a Parcelable, Lint: Do not report "CREATOR field missing" warnings on our '@Parselize' Parcelables 2017-08-02 03:35:11 +03:00
Mikhail Glukhikh 1d2017b0fc Cleanup: apply "cascade if..." inspection (+ some others) 2017-07-07 18:15:32 +03:00
Valentin Kipyatkov 61d9a6b9cd Use the same way to check for ProcessCanceledException everywhere 2017-06-30 11:21:16 +03:00
Vyacheslav Gerasimov 15bfd4439a Fix AddTargetVersionCheckQuickFix, generate else branch with TODO
when surrounded statement used as expression

#KT-17786 Fixed
#KT-17788 Fixed
2017-06-06 20:46:53 +03:00
Vyacheslav Gerasimov 33c3ba815f Fix Android SuppressLint and Api quickfixes: proper annotation placing
#KT-17783 Fixed
 #KT-17787 Fixed
2017-06-06 20:46:40 +03:00
Vyacheslav Gerasimov ca124d1e36 Remove Android api diagnostic error on Kotlin interface default methods
They don't require java 8 or any other special support to work on Android

#KT-18059 Fixed
2017-06-01 20:35:08 +03:00
Vyacheslav Gerasimov 5f09e18394 Fix Android api issues reporting for generic collection method calls
#KT-16712 Fixed
2017-04-27 16:02:37 +03:00
Vyacheslav Gerasimov 5b58a6f9e8 Add intentions Add/Remove/Redo parcelable implementation
#KT-17465 Fixed
#KT-12049 Fixed
2017-04-18 19:04:14 +03:00
Vyacheslav Gerasimov d8fdd04e7f Remove custom lint detectors registration from kotlin lint
#KT-14970 Fixed
2017-04-12 19:23:43 +03:00
Vyacheslav Gerasimov 1d134ffc72 Register Android api quickfixes for inlined api inspection
#KT-14857 Fixed
2017-04-10 12:39:40 +03:00
Vyacheslav Gerasimov ba5e78a917 Replace deprecated Iterators.emptyIterator() in JavaContext.java
with ContainerUtil.emptyIterator()
2017-03-27 21:35:11 +03:00
Nikolay Krasko 82a2a705fb Do not wrap analyze into write action priority in tests
In tests the code is executed in EDT and runInReadActionWithWriteActionPriority fails

See: MergingUpdateQueue.setPassThrough() and ExternalToolPassFactory() constructor
2017-03-20 18:45:36 +01:00
Nikolay Krasko 2eb6c393a4 Move android modules to Java 8 SDK 2017-03-20 18:45:29 +01:00
Dmitry Jemerov b10073465c fix compilation of new lint checks against IDEA 163 2017-03-20 18:45:22 +01:00
Yan Zhulanow 24c9b6e171 Migrate IDEA plugin code to Android Studio 2.2 (br 145) 2017-03-20 18:45:15 +01:00
Dmitry Jemerov 006062499c Optimize imports (to fix compilation under 171 branch) 2017-03-13 16:34:48 +01:00
Dmitry Jemerov 8c3936a0ee Update to UAST 0.12 2017-03-09 17:07:43 +01:00
Vyacheslav Gerasimov 1376c8f8cf Implement quickfixes for Android Lint api issues
#KT-16624 Fixed
#KT-16625 Fixed
#KT-14947 Fixed
2017-03-03 16:22:36 +03:00
Dmitry Jemerov 87187437ab Update UAST to version 1.0.11 2017-02-10 13:55:25 +01:00
Vyacheslav Gerasimov 6699b03c0b Fixed error reporting in AnnotationDetector
#KT-14920 Fixed

(cherry picked from commit 3647d53)
2017-02-03 18:06:05 +03:00
Vyacheslav Gerasimov 10517c16ee Uast 1.0.9 2017-02-03 18:06:04 +03:00
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