Commit Graph

74 Commits

Author SHA1 Message Date
Anna Kozlova
7450e40b4e [uast] create serial UID: don't require current editor in batch mode
GitOrigin-RevId: e8000852f93ac1415268e004fab4ce51de06cae9
2021-10-06 19:14:38 +00:00
Artemiy Sartakov
40936f24bf SourceToSinkFlowInspection: added fix to propagate safe annotation
GitOrigin-RevId: 03b5b73ec32510624858245e9024152a7341b3ff
2021-10-01 11:32:07 +00:00
Nikolay Chashnikov
5dddf91069 [intellij project configuration] rename jvm.analysis.tests to jvm.analysis.testFramework
By convention, we use 'testFramework' suffix for modules containing common testing code in production source roots, and 'tests' suffix for modules containing actual tests only. Let's follow this convention in jvm.analysis for consistency and to simplify writing tests on project structure.

GitOrigin-RevId: 482a8d9f5a038b2261b03c09309f93233932ec04
2021-09-09 15:53:53 +00:00
Yuriy Artamonov
9d7c5caf91 [java] Consider @Blocking and @NonBlocking on classes in BlockingMethodInNonBlockingContextInspection
GitOrigin-RevId: d3a486b85659c78901a326f08ebadeadd8e656ab
2021-09-05 16:21:13 +00:00
Bart van Helvert
3d92bd0683 [jvm] Add Serial annotation to AddSerialVersionUidFix
Only adds the annotation when language level is Java 14 or higher

GitOrigin-RevId: 7e573f1e410d17a3b0fa2abe4bd32df7d4cc51c6
2021-08-31 15:59:31 +00:00
Bart van Helvert
b18fabb509 [jvm] Improve DependencyInspection tests
GitOrigin-RevId: 3f52a1948633aaf8631fc0606d99f905c6cf590a
2021-08-27 08:51:03 +00:00
Yuriy Artamonov
96788322e1 [java] Improve BlockingMethodInNonBlockingContextInspection settings UI and show default annotations
GitOrigin-RevId: ea241b22098f6704a0fa9d82c702acbeb1f920d3
2021-08-25 17:46:31 +00:00
Bart van Helvert
9e41c51f56 [jvm] Make SerializableHasSerialVersionUidFieldInspection tests text based
GitOrigin-RevId: c7152db8b1b6c6a3fb8181db0d69ea5549ddd4ce
2021-08-23 17:35:23 +00:00
Bart van Helvert
6fe8bd39b2 [jvm] Support text based highlight and quickfix tests
GitOrigin-RevId: c00f6779b5ffdbae42d8535074ff5a67c7483f37
2021-08-23 17:35:20 +00:00
Bart van Helvert
1d4d872901 [jvm] Remove file extension override from test base
GitOrigin-RevId: 229e517662a6233ed7c8ebe06553977459042722
2021-08-23 17:35:15 +00:00
Artemiy Sartakov
f6986efbcc SourceToSinkFlowInspection: added local inference
1. local inference for methods
2. fix to mark variables as safe
3. fixed error message in case when tainted value returned from untainted method

GitOrigin-RevId: 2398b6c10883616a505d2443543528e6cc96e9dc
2021-08-18 09:46:16 +00:00
Bart van Helvert
53e7c03568 [jvm] IDEA-207232 Migrate "Serializable class without 'serialVersionUID'" to UAST
Quickfix does not work in Kotlin yet.

GitOrigin-RevId: 400f0cd6e410a8e323aef72ddb1e70cf98d8e796
2021-08-16 13:56:51 +00:00
Bart van Helvert
bceb99a5f1 [jvm] Ignore calls to super in ThreadRunInspection
GitOrigin-RevId: e79d56472118c453c0a2aca4e44a24111750ada4
2021-08-12 10:24:55 +00:00
Bart van Helvert
c2bb202092 [jvm] IDEA-274018 Migrate "ThreadRunInspection" to UAST
GitOrigin-RevId: 7fa2409aefa3718c76f6104ae950a3484b79c322
2021-08-11 09:15:32 +00:00
Bart van Helvert
e3f1638a0d [jvm] IJ-CR-12718 Add TestDataPath annotations
GitOrigin-RevId: 1246462095d381bdf5e09af8cdb4661c2b79a4a3
2021-08-09 16:26:14 +00:00
Bart van Helvert
22bb2741f4 [jvm] IJ-CR-12718 Improve UAST inspection test base
GitOrigin-RevId: 271715b5438487c77e939f8c39b80f0ff2af7b22
2021-08-09 16:26:11 +00:00
Bart van Helvert
72379c315e [jvm] IDEA-271571 Don't highlight @TestOnly usages in doc
GitOrigin-RevId: e9011bbb9d881333316563cde008af0e4ab0d954
2021-08-03 14:34:40 +00:00
Bart van Helvert
402eec8632 [jvm] IDEA-262698 Convert JUnit conversion inspections to UAST
Converts JUnit5AssertionsConverter and JUnit5Converter to UAST.

GitOrigin-RevId: 3c3cd6d7b23585e8ae9acc331aebc2ba8f8c5039
2021-08-03 12:28:25 +00:00
Artemiy Sartakov
4c26f710ff SourceToSinkFlowInspection: cr fixes (IJ-CR-10092):
1. RestrictionInfoBuilder -> RestrictionInfoFactory
2. removed redundant extends from wildcards for RestrictionInfoFactory
3. specified package for Untainted annotation in description
4. replaced 'sink' with 'safe method' in inspection descriptions
5. TaintValue#getName -> TaintValue#getAnnotationName
6. formatting

GitOrigin-RevId: d87b8aa8b39653fa18bb96efe8cd90db81764b56
2021-06-23 09:27:39 +00:00
Artemiy Sartakov
3a1d5cbeb5 SourceToSinkFlowInspection: cr fixes(IJ-CR-10092):
1. moved SourceToSinkFlowInspection to jvm-analysis-impl
2. resused annos names from UntaintedAnnotationProvider
3. javadoc for public methods
4. renamed inspection to "Unsafe string is passed to safe method"
5. do not suggest to annotate element if it is already annotated with @PolyTainted

GitOrigin-RevId: 6121aa41cf72d1fe258a8ced0752d22370d18c54
2021-06-19 08:46:16 +00:00
Bart van Helvert
32a57be862 [jvm] IDEA-207545 Convert TestFailedLine inspection to UAST
GitOrigin-RevId: 921c7fe92dd5b27b9fe0105fffd9f93ffb0a3e98
2021-05-24 20:20:30 +00:00
Bart van Helvert
e393297c0a [jvm] Fix test only inspection highlighting
Changes the highlighting on the double annotation warning from full annotation to the identifier.

GitOrigin-RevId: 6caca39e512722bae9d8441bd37378f1366e8081
2021-04-11 18:29:31 +00:00
Bart van Helvert
9a078fac63 [jvm] IJ-CR-7495 Improve double annotation warning
GitOrigin-RevId: 2355929a6fde8a87adb2ed82cd5ed621dcf29aba
2021-04-06 15:40:50 +00:00
Bart van Helvert
89000cc20d [jvm] IJ-CR-7495 TestOnly inspection improvements
Now uses TestOnlyApiUsageProcessor and correctly finds top level parents.

GitOrigin-RevId: 41789e2279fc4d4c885050f7ee475a6e8ab81e48
2021-03-30 09:58:28 +00:00
Bart
b3a6e7ebd2 [jvm] IDEA-231329 Convert @TestOnly inspection to UAST
GitOrigin-RevId: 15230423d944e7b3a236f401bdc251dabb7d5586
2021-03-23 10:35:38 +00:00
Bart van Helvert
f90009e540 [UAST] IDEA-254702 Add JUnit Rule inspection quickfix tests
GitOrigin-RevId: 78ab1bb5b47925531bdd98a1e81b718e5ebe0463
2021-01-18 21:23:54 +00:00
Bart van Helvert
d42cea8389 [UAST] IDEA-254702 Convert JUnit Rule inspection to UAST
GitOrigin-RevId: 6add679f94ffba8b972f0ae924b5547d6859ed1a
2021-01-11 21:52:58 +00:00
Bart van Helvert
3503a1a464 [UAST] IDEA-254704 Highlight FQ name in dependency inspections
Also add more tests to the illegal dependencies inspection.

GitOrigin-RevId: 590c903c60012c72cd4590d4746e12f1fa89c708
2020-11-30 17:47:23 +00:00
Bart van Helvert
5ec9459a04 [UAST] IDEA-254704 Change Java illegal package dependency highlighting
Changes the highlighting for the illegal package dependency in Java from highlighting the full import statement to only highlighting the reference name.

GitOrigin-RevId: f46ab8ad9e0697e726767744afe861f315e3fa12
2020-11-24 23:18:34 +00:00
Bart van Helvert
dbb236b166 [UAST] IDEA-254704 Convert illegal package dependencies inspection to UAST
Converts the illegal package dependencies inspection to an UAST inspection and adds tests for Kotlin and Java.

GitOrigin-RevId: 81fa5e8c4928277f9fd62b57161d2437d2604991
2020-11-23 19:08:11 +00:00
Kirill Likhodedov
4c71808b61 Don't warn that "iOS" is not capitalized: it shouldn't: IDEA-226591
GitOrigin-RevId: 6bae9cc8e16d9038cae815f9ad3231ac4bfb1ee5
2019-11-13 14:07:52 +00: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
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
Alexander Kirillin
7f3e176d1e Merge remote-tracking branch 'origin/master'
GitOrigin-RevId: 6a16531d9dd405767883a6ce82d04513098372e1
2019-05-03 02:41:27 +03:00
Vladimir Plyashkun
9f61a34973 CPP-16098 - Lags during inplace rename typing
- preserve `ensureValid` check for backward compatibility

GitOrigin-RevId: 280ddc686c2ec38c6f7b07a00c1e20d19a25523c
2019-05-03 02:40:56 +03:00
Yann Cébron
014e03b4cd [jvm-analysis] NlsCapitalizationUtil: test fixValue()
GitOrigin-RevId: 6a418dcfbfe928cb36795f0dab4b7b333707449b
2019-05-03 02:34:18 +03:00
Yann Cébron
19f717a89f [jvm-analysis] NlsCapitalizationUtil: tune Sentence validation, better tests
GitOrigin-RevId: d48ff68ede70b010d34a6b10fd300a7412780642
2019-05-03 02:26:28 +03:00
Dmitry Jemerov
bfa87abd68 Report language of current file for mouse invocations of intentions popup (IDEA-CR-46747)
GitOrigin-RevId: 65667ea92fac4bef9b9a3b620b2cae0585171b4b
2019-05-03 02:17:10 +03:00
Vladimir Plyashkun
846eeb2d37 CPP-16098 - Lags during inplace rename typing
- changed only small set of template expressions that doesn't need in committed PSI
- additional check for `isQuick`

GitOrigin-RevId: 64c7fb49cd892ab12895543c14f8b0e2cb4a5e71
2019-05-03 02:16:39 +03:00
Yann Cébron
5065e3d1f0 [jvm-analysis] extract NlsCapitalizationUtil (IDEA-203627)
GitOrigin-RevId: 8cdc4fce9912f74a3bab0461b268c3add2063e81
2019-05-03 02:07:52 +03:00