Sergey Patrikeev
7915d08945
KT-35296 (followup): False positive "Suspicious package-private inspection" on empty package-private super-constructor.
...
GitOrigin-RevId: 5746d2a69c3f3e8395e4479c8d2707dc5d85d211
2019-12-16 12:05:21 +00:00
Sergey Patrikeev
1468e2ac20
KT-35296: False positive "Suspicious package-private access" with unrelated package-private no-arg superconstructor.
...
GitOrigin-RevId: bb186ee4cfaf890392be318c01613f301dd9b595
2019-12-05 16:03:48 +00:00
Sergey Patrikeev
8448cf149c
ScheduledForRemoval API usages: update test data.
...
GitOrigin-RevId: 8abe28c91cd05d3c906149e88450bc9163b626e9
2019-10-24 11:05:18 +00:00
Sergey Patrikeev
722c7216f3
UnstableApiUsageInspection: specify annotation name causing the warning.
...
GitOrigin-RevId: 21ad929338bfa74a0cab35ca998e6dc87167e950
2019-10-24 11:05:18 +00:00
maksim.pelevin
9c33f8acc2
IDEA-223097 Provide an inspection which reports overriding package-private methods located in different module
...
GitOrigin-RevId: 2708657ea214765cf92f259a6de83beb6275ad5e
2019-09-19 08:31:30 +00:00
Sergey Patrikeev
5c3f54c486
IDEA-219976: False-positive "class must not be extended" for a nested class, whose enclosing class is @NonExtendable.
...
GitOrigin-RevId: 3686fadd23c193966411419f354e94f58ecb5faa
2019-08-08 15:05:59 +03:00
nik
75d7a92ffd
java: remove extra spaces in test data for KtSuspiciousPackagePrivateAccessInspectionTest
...
GitOrigin-RevId: 35693ab197b92fa2e646b9632b777fc6c0f843c6
2019-07-03 01:13:10 +03:00
nik
598c9e62c7
java: properly process inner and local classes in 'Suspicious package-private access' inspection (IDEA-217306)
...
Java doesn't treat inner and local classes in a special way at runtime so SuspiciousPackagePrivateAccessInspection.canAccessProtectedMember shouldn't process enclosing classes like JavaResolveUtil.canAccessProtectedMember does.
GitOrigin-RevId: 86404e3a3cb29b3300d5dfaad0e3ef9f9dda3355
2019-07-03 01:13:10 +03:00
Sergey Patrikeev
444fede6e0
Revert "UnstableTypeUsedInSignatureInspection: do not produce a warning in a annotated Kotlin file.
...
This reverts commit ad36f41a.
@file:ApiStatus.Experimental does not mean that all classes\methods declared in this file are experimental, as it may seem naively. Instead, it only means that a class generated for top level declarations in the file (for file with name 'file.kt' class name will be 'FileKt') will be annotated but not other top-level classes in the file.
GitOrigin-RevId: 5dadbf90aff8a0f421379f0e55786eac7848f201
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
90e915819b
UnstableTypeUsedInSignatureInspection: ensure warnings are not produced for anonymous classes declarations.
...
GitOrigin-RevId: b6c241f54ea29482172f8b01fdd6c6a88d3139a7
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
846e687b26
UnstableTypeUsedInSignatureInspection: do not produce a warning in a Kotlin file annotated with unstable annotation.
...
GitOrigin-RevId: ad36f41acde6f97f1b3f24d23bbab59d0def7d22
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
3074b2a345
UnstableApiUsageInspection: add more tests on overriding unstable methods.
...
GitOrigin-RevId: 77c551c6afee5c9ecf42a3d4bc9f02a381aafe41
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
f2cf382034
ScheduledForRemoval inspection: update test data.
...
GitOrigin-RevId: d597239bd5f1f8b4c70a5385540534a69519fa62
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
c080fa6df2
UnstableApiUsageInspection: do not report API usages of members declared in the same file.
...
GitOrigin-RevId: c103f514fcc7dcdddc94c761d275a135e6bf580c
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
9329e65e5b
UnstableTypeUsedInSignature: do not emit warning if declaration is containing inside private or package local class.
...
GitOrigin-RevId: 3c55d941a582af00a01faf65f14a4d8fc07dc709
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
ddc5ccd24c
UnstableApiUsageInspection: check if signature of the referenced API contains an unstable type.
...
For example, if a method's parameter is marked with @ApiStatus.Experimental annotation, the method is effectively experimental. Invoking such a method from plugin code must be highlighted even if the method itself is not marked with the same annotation.
GitOrigin-RevId: 5ebd52b3a525a0d51aa2cbed5cb2603157e7f292
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
4e0b7c950e
UnstableApiUsageInspection: extract overridden method case to a separate method. Update testdata for ScheduledForRemoval
...
GitOrigin-RevId: a855fca7fbc9c3865108aa6937d962709a1471dc
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
c9ea0a57e6
Unstable\ScheduledForRemoval API usage inspections: improve messages for methods\fields declared in annotated classes.
...
GitOrigin-RevId: 95db4460a5f65bfcc0846b0840dccf16af720645
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
37fd165f7e
Merge ScheduledForRemovalInspection into UnstableApiUsageInspection.
...
ScheduledForRemovalInspection is effectively the same as more general UnstableApiUsageInspection. The only thing that differs is the provided message "Foo is scheduled for removal in 2.3.4" instead of "Foo is marked unstable". To customize the message a dedicated "message provider" interface is extracted. It may later be utilized for other annotations.
Also tests for "scheduled for removal API usages" are moved next to the tests of the UnstableApiUsageInspection.
GitOrigin-RevId: 0693f41954bd5a4d79699b83a76cd4d293a56f9a
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
f04eaad9a2
IDEA-215432: UnstableApiUsage\ScheduledForRemoval inspections: check if containing declaration is marked with annotation
...
If a class is marked with @ApiStatus.Internal annotation, all its methods must be considered internal, even if invocation is performed via a subclass and no explicit reference onto a class exists.
If a package is marked with @ApiStatus.Internal, all its classes and their members must be considered internal.
GitOrigin-RevId: f8bcb2a91cf958b878cd45a58d4fed69297fd372
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
c9eae61072
UnstableTypeUsedInSignatureInspection: do not report if declaration is not accessible (private), or in the same package
...
GitOrigin-RevId: ac1182eefc5894b9893481015d3b3355785b37a0
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
6c8d9ccd9b
IDEA-215436: Inspection that checks if declaration with "unstable" API type in signature is "unstable" on its own.
...
GitOrigin-RevId: 6ba9bf7a8ebfd8b34488cb98536c5fa3e781deb7
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
ed1acb9b0d
ScheduledForRemovalInspection and UnstableApiUsageInspection: convert to Kotlin and support method overriding case.
...
GitOrigin-RevId: dd24dbf613673ae788e1f2ae0229c0ef27e66fe3
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
856a375563
Unstable and ScheduledForRemoval inspections tests refactoring: move to single module, move code to files.
...
GitOrigin-RevId: e4fb80e92b276952d608d0b721301471ac4e7cd7
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
9b498304a6
IDEA-216155: inspection that warns if API marked with @ScheduledForRemoval annotation must already be removed.
...
GitOrigin-RevId: bb9cc3c842e6110d801f718717665498a077e3a3
2019-07-02 06:52:16 +03:00
Sergey Patrikeev
cbe1384451
IDEA-211503: Add inspection checking that @ApiStatus.ScheduledForRemoval annotation is accompanied by the @Deprecated.
...
GitOrigin-RevId: 071f0a6c823037bade61bc42a1e9714515439111
2019-07-02 06:52:16 +03:00
Dmitry Jemerov
97e0289250
Rename various Java-specific test case classes to include Java in the name; leave old names as deprecations
...
GitOrigin-RevId: 0f105a6c063ce216f7e22348221ad4cd335295df
2019-07-02 06:52:16 +03:00
Rustam Vishnyakov
123242c4b2
EditorConfig documentation test
...
GitOrigin-RevId: fd52ace3d7a32ecd02c2c5ab90e077967604c15e
2019-06-16 04:03:21 +03:00
Egor Zhdan
c1813cfb52
Cleanup: NotNull/Nullable
...
GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
2019-06-16 04:02:08 +03:00
Anna Kozlova
91f7445298
constructor reference: don't ignore constructor parameters during method reference inference (IDEA-185578)
...
GitOrigin-RevId: e836468e05db28157713e9edd3c70382f8ecdebc
2019-06-13 03:15:49 +03:00
Egor Zhdan
39d2d77155
Cleanup: NotNull/Nullable
...
GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
2019-06-13 03:14:35 +03:00
Aleksey Rostovskiy
185284cee6
get rid of intellij.build.toolbox.litegen parameter and use BuildOptions.TOOLBOX_LITE_GEN_STEP to skip it instead
...
GitOrigin-RevId: 9aac8ee4ed1ebf2a29de18a238825fafb1ab88f9
2019-05-27 15:08:08 +03:00
Alexandr Suhinin
9215f4240b
[duplicates] enable duplicates analysis in PyCharm/WebStorm/PhpStorm/RubyMine
...
GitOrigin-RevId: 1545b79fdca4888f4b94f47f22703fd37694fa7a
2019-05-27 15:07:30 +03:00
Anton Makeev
c105e26db3
Merge remote-tracking branch 'origin/master' into amakeev/gradle
...
GitOrigin-RevId: f9a633252daf311ecab19002c0f4757052eee9dc
2019-05-17 19:13:15 +03:00
Anton Makeev
b54aaf7e4e
IDEA-210281 Cleanup Gradle settings: separate Runner configurable removed
...
GitOrigin-RevId: adbc39121fe91beb633e125b4cf39bfe0a422e4b
2019-05-17 19:02:16 +03:00
Sergey Patrikeev
44ad67b999
Platform API (IDEA-211307): add annotations prohibiting certain types of API usages.
...
Added annotations @ApiStatus.NonExtendable and @ApiStatus.OverrideOnly.
Added corresponding inspections checking violation of usages of annotated API.
Fix a couple of bugs in ApiUsageUastVisitor. Enforce both "processReference" (for class) and "processConstructorInvocation" (for constructor) events. Suppose code "new SomeClass(42)". We want ApiUsageVisitorBase to invoke both "processReference" for "SomeClass" and "processConstructorInvocation" for "SomeClass()", though they point to the same PSI element.
GitOrigin-RevId: 811b4d5a875dcb246582df1cd2e6be48cc96c990
2019-05-15 17:08:41 +03:00
Sergey Patrikeev
95cc10cd5e
IDEA-210618: Reference implementation of PSI visitor for UAST-supporting languages that detects usages of APIs in source code.
2019-04-18 19:58:17 +03:00
nik
c0198a15fe
kotlin: fix false positives for 'suspicious package-private access' inspection nested object literal expressions in Kotlin
...
This is an improvement for cdd6055 which also fixes IDEA-210253. JavaResolveUtil.canAccessProtectedMember doesn't work properly for Kotlin because of KT-30759 and KT-30752, so its code is rewritten to use UAST to find outer class.
2019-04-03 14:13:45 +03:00
nik
cdd60556a9
kotlin: fix false positives for 'suspicious package-private access' inspection in object literal expressions in Kotlin
...
(IDEA-210216)
2019-04-02 14:34:18 +03:00
nik
29369cda82
tests: add test for SAM conversion in Kotlin for "Suspicious package-private access" inspection (IDEA-CR-43857)
2019-02-26 10:42:33 +03:00
nik
e189f7b1dc
inspection: fix bugs in "Suspicious package-private access" inspection (IDEA-200047)
...
Properly report references to protected constructors accessed not via subclass, and fix duplicating warning in Kotlin files. Also add tests for Kotlin.
2019-02-21 13:00:17 +03:00
Sergey Patrikeev
4e1d9527ca
ScheduledForRemoval: display version when API is going to be removed, if it's specified.
2019-02-01 19:12:40 +03:00
Dmitry Batkovich
1332716b15
rename tests to run on teamcity
2019-01-17 15:04:45 +03:00
nik
d2653869a5
IntelliJ project configuration: rename KotlinJavaRuntime library to kotlin-stdlib-jdk8
...
For clarity and consistency with artifactId and other Kotlin libraries.
2019-01-11 11:59:04 +03:00
Sergey Patrikeev
f880b44c8f
Update test data for AnnotatedElementInspection so that references' names are consistent with the Deprecation inspection
2018-12-02 17:58:05 +03:00
Dmitry Batkovich
a1696d1e02
fix SameParameterValueInspectionJvmTest
2018-10-08 18:27:40 +03:00
Yaroslav Pankratyev
5302b3fb01
IDEA-194133 ScheduledForRemovalInspection tests
2018-09-26 13:44:34 +07:00
Yaroslav Pankratyev
04497c6e0b
IDEA-194133 Refactor UnstableApiUsageInspectionTest, extract common parts with future tests for @ScheduledForRemoval inspection
2018-09-26 13:44:34 +07:00
Dmitry Batkovich
098c6318cf
re-implement java global inspection graph using uast
2018-09-13 08:18:27 +03:00
Nikita Katkov
16330c504d
BlockingCallDetectionKtTest renamed to BlockingCallDetectionKtTest to make it run in Kotlin-Test configuration
2018-08-30 18:09:07 +03:00