Commit Graph

7471 Commits

Author SHA1 Message Date
Mikhail Pyltsin
d806c4c420 [java-inspection] IJ-CR-119988 IDEA-264141 Warn if compact constructor calls methods that access fields
GitOrigin-RevId: 350232d305b02b49689b18eed113bdbdad108671
2023-11-27 17:22:11 +00:00
Aleksey Dobrynin
bf11fe39ed [java, inspections, fix] IDEA-322244 IJ-CR-114846
check JUnit version

GitOrigin-RevId: ac865d315224bd11650b8aa0f88f60b8242da000
2023-11-27 15:11:52 +00:00
Elena Shaverdova
17e66e639b Clean-up: improve grammar and provide generics
GitOrigin-RevId: deb89d2910dcdacf8f27025639a9b3bda50ae309
2023-11-22 20:56:52 +00:00
Elena Shaverdova
9e77f9bb03 IDEA-331326 Create FUS event for stub index inconsistency
GitOrigin-RevId: 8194bd9128dd7639655b335bed6747d6ce046b14
2023-11-22 20:56:50 +00:00
Tagir Valeev
a8914e5c86 [java-inspections] IDEA-338478 Pattern variable can be used: support more narrow casts
Also, support the same in SimplifyBooleanExpressionFix (IDEA-336123)

GitOrigin-RevId: 240383f6ca67d8b7734ac51a6fe8781538e4f254
2023-11-22 20:31:30 +00:00
Dmitry Kichinsky
dc25e16021 [Workspace Model] IDEA-308190 store all manifest attributes in java module settings
GitOrigin-RevId: 211cc59375651ef4674c5e2500a05f389eba9e28
2023-11-20 22:22:30 +00:00
Michail Plushnikov
e2eaabf6b8 [lombok] IDEA-302513 fix usage with lombok producing IncorrectOperationException
GitOrigin-RevId: 6dc7b9e1c13a988dbeff3fc1f01d564a3e6df290
2023-11-18 21:26:14 +00:00
Tagir Valeev
2a4ceade93 [java-dfa] Cosmetic
GitOrigin-RevId: 8d8d8c2f21330d7faee8f357acedee070e9cbe05
2023-11-17 18:10:55 +00:00
Mikhail Pyltsin
f02fd0e658 [java-inspection] IDEA-264141 Warn if compact constructor calls methods that access fields
- added in DFA logic to check if it is possible to have initialized variable if there is a call in constructor

GitOrigin-RevId: b5b1647df7e4ed116fef095037f48441c36f71a8
2023-11-17 11:27:48 +00:00
Bas Leijdekkers
9bcb2a6194 Java: remove workaround hack now that UAST supports resource expressions (IJ-CR-119831)
GitOrigin-RevId: 803dadd65b91ac5c0c4ab9ad7aeef2c5c6ab3d5a
2023-11-17 02:23:59 +00:00
Tagir Valeev
dfeffcd033 [java-analysis] IDEA-328240 Dummy android jar is not recognized when located in .m2 repo
GitOrigin-RevId: 0f30ec1df8c68dbcdbc162c72bf16ea3201b13bc
2023-11-15 21:43:28 +00:00
Tagir Valeev
ff15d064cd [java-inspections] SimplifyBooleanExpressionFix: try to move pattern variable to another instanceof when possible
Fixes IDEA-336123 "Constant values" fix produces red code when pattern variable is removed

GitOrigin-RevId: 7faf8dd77569c21d69a9a7226d6db1b0097f9231
2023-11-15 21:43:24 +00:00
Tagir Valeev
c49a062434 [mod-commands] ModShowConflicts: exclude next step
Simply continue execution of the outer ModCommand

GitOrigin-RevId: a4ed40d46114c25f5502305567355b3419b3524e
2023-11-15 21:43:21 +00:00
Tagir Valeev
9141de103f [mod-commands] Better API for ModUpdateSystemOptions
GitOrigin-RevId: 6a7ea0edf7cb2725dc8b45887450d5aa078fe85d
2023-11-15 21:43:10 +00:00
Tagir Valeev
af0c7f16eb [java-intentions] RemoveAllUnusedImportsFix: ModCommand
GitOrigin-RevId: 15068d5353483fc34f81ec535d074c953cae9328
2023-11-15 21:43:03 +00:00
Dmitry Kichinsky
a113b039a1 [java] IDEA-308190 get Automatic-Module-Name manifest attribute from java module settings
GitOrigin-RevId: cf1fa15f7e98934c814db3e866e1194980e3ca70
2023-11-15 20:42:29 +00:00
Bas Leijdekkers
2d6294fd9f Java: avoid CCE (EA-940311)
GitOrigin-RevId: 24299d5741665a14bdd5e58f832ae9eca93bb71d
2023-11-15 18:28:32 +00:00
Tagir Valeev
9c34f534f0 Warnings fixed; use assert methods instead of assert statement in IndexTest
GitOrigin-RevId: 3dd424a70347aa82025aae9047818b2b6cc11667
2023-11-14 11:01:20 +00:00
Tagir Valeev
17a223b66d [mod-command] NullableNotNullManagerImpl: OptionController; used in ChangeNullableDefaultsFix
GitOrigin-RevId: 66d6128248cd06e81cb3ec7826265ea4a23b7dbf
2023-11-14 11:01:16 +00:00
Tagir Valeev
34479d8af2 [mod-command] EntryPointsManagerBase as OptionControllerProvider
The corresponding intention actions converted to ModCommand now
Part of IDEA-337707 Create a uniform API to read/update various persistent settings

GitOrigin-RevId: 3a508e2a97fd2f1967c78aef2e82b661d1d8325a
2023-11-14 11:01:07 +00:00
Tagir Valeev
dfc7b6c5ce [mod-command] Experimentally prefix inspection options with inspection itself
Also: make BaseInspection.formatString robust against separate field changes

GitOrigin-RevId: 0211c954c6496ae92f894b032baeac616a6c9f1c
2023-11-13 21:00:44 +00:00
Aleksey Dobrynin
e5b2194515 [java, inspection] new inspection "while can be do-while" IDEA-250650
GitOrigin-RevId: bd2bd0053500b98a316330b08481018825e9211f
2023-11-13 17:41:19 +00:00
Mikhail Pyltsin
87dc3f3fbf [java-highlighting] IDEA-289314 Missing highlighting for nested type annotations on static types
- annotations are checked recursively

GitOrigin-RevId: a8343f6bbfbf2dd39b29dad8ce1e989e71a0e549
2023-11-13 17:04:49 +00:00
Mikhail Pyltsin
8adeaf3193 [java-highlighting] IDEA-306108 Assignment to a variable with non-denotable type: confusing error message and useless quick-fix
- add `anonymous` when it is not clear what type is used

GitOrigin-RevId: f3395a590fd4a48a5570fdf9ace540845e5f3879
2023-11-13 17:04:45 +00:00
Tagir Valeev
eb8ca83ed2 [java-inspections] ReplaceAnnotationByForRemovalAttributeFix: ModCommand
GitOrigin-RevId: fa4217892f613bbc0f2d22ae985a9d15a61b41d3
2023-11-13 13:46:33 +00:00
Bas Leijdekkers
8a3ec7ba0d Java: Unused Declaration - recognize resource expressions in batch mode (IDEA-330141)
GitOrigin-RevId: b382042eeb7b90301f4de90456da51026e045200
2023-11-12 18:00:11 +00:00
Bas Leijdekkers
6631881072 Java: Unused Declaration - recognize operator assignment as read access (IDEA-330149)
GitOrigin-RevId: 5561bd503c9f7bfe0fc5e6eca209d0f272ed50ec
2023-11-10 15:57:27 +00:00
Bas Leijdekkers
9ca17ef673 Java: more accurate serializable field detection
GitOrigin-RevId: a8d9b035a02c0605dd5ed14d26cbe1c935f101a2
2023-11-10 15:57:26 +00:00
Bas Leijdekkers
96ed95f42e Java: use UnusedSymbolUtil instead of accessing ImplicitUsageProvider extensions directly
GitOrigin-RevId: ed806f9bd758b2122830c6dd614c038dfcd3e7a1
2023-11-09 21:59:25 +00:00
Tagir Valeev
cf5ac92ec3 [java-inspections] ReplaceAssignmentFromVoidWithStatementIntentionAction: use smart-pointer
GitOrigin-RevId: 5123449b69df5f81a350e3eaca31a1ec64d0b080
2023-11-08 19:40:47 +00:00
Alexey Kudravtsev
9b4cc7a05d new inspection: "missorted imports" with quick-fix-only severity, to fix IDEA-334084 No "Optimize imports" action is displayed
GitOrigin-RevId: 92028252fc0b4c8ab05b7236de15ff44090a7183
2023-11-08 14:55:31 +00:00
Alexey Kudravtsev
a273cc34c0 cleanup
GitOrigin-RevId: fc34d05b947fc47549aae445f30eebc680b52165
2023-11-08 14:55:29 +00:00
Tagir Valeev
97496c8307 [java-dfa] FindDfaProblemCauseFix: ModCommand
GitOrigin-RevId: 28012d658bb4e6f6a90aeca08d8a7c3beac995c4
2023-11-08 13:22:16 +00:00
Tagir Valeev
e02ca66620 [java-inspections] ReflectionForUnavailableAnnotationInspection: separate annotation fix
No need to support external annotations here

GitOrigin-RevId: 36ab31a07852d479db333c43920d4383a5db6bb1
2023-11-08 09:40:44 +00:00
Tagir Valeev
d6298ca866 [java-intentions] RemoveSuppressWarningAction: fix for external annotations
GitOrigin-RevId: ede95d4f0588c9de51337886cc138b3772967fde
2023-11-07 13:10:02 +00:00
Alexey Kudravtsev
d9a3efc3dd "remove unused imports" quick fix to alleviate pain of IDEA-334084 No "Optimize imports" action is displayed
GitOrigin-RevId: 1c39342f6012a129605f662c427a4b9456f1114f
2023-11-07 12:59:15 +00:00
Tagir Valeev
6f746db858 [java-intentions] MakeExternalAnnotationExplicit: ModCommand
GitOrigin-RevId: 19d415d397bb38eba2ef60943a8c712c416d56e8
2023-11-06 21:41:22 +00:00
Tagir Valeev
35f25e81e7 [java-analysis] Delete external annotation via ModCommand; used in RemoveAnnotationQuickFix
GitOrigin-RevId: 9f753e7b4d2a0714a763bd7f260998ce82d0ec92
2023-11-06 19:11:56 +00:00
Bas Leijdekkers
60a6cb2a00 Java: Provide better error message - illegal forward reference (IDEA-337031)
GitOrigin-RevId: 789b0bca6e6b1f9d0d366cd20a011c194cf1af0d
2023-11-06 11:16:57 +00:00
Bas Leijdekkers
8cbdbab21a Java: move old check to quirks inspection
GitOrigin-RevId: f1201462a504c09c1d4ca10e813c343d03be55ac
2023-11-06 11:16:53 +00:00
Michail Plushnikov
5e78a09c70 [lombok] IDEA-330582 Use 'requires static' keywords for lombok module dependency
GitOrigin-RevId: c715c214adc14069bad65b810ec00e66ee6c8322
2023-11-06 09:33:07 +00:00
Tagir Valeev
fcd92a7fcd [java-refactoring] IDEA-235656 Automatically expand composite assignment when inlining variable
GitOrigin-RevId: 797f4121214eadfe1df74aadae0c2299dc178a02
2023-11-03 20:18:24 +00:00
Tagir Valeev
b3e227dc43 [java-inspections] AnnotateAsSafeVarargsQuickFix: mod-command; combined with MakeFinalAndAnnotateQuickFix
No need for complex logic with external annotations for @SafeVarargs annotation

GitOrigin-RevId: e0a9e8c48a5b646b13c42613d3f05e900a8d80fd
2023-11-03 18:11:01 +00:00
Tagir Valeev
04985625f1 [java-inspections] AbstractMethodOverridesAbstractMethodFix: mod-command
GitOrigin-RevId: a104a3352837006e2efcbc8e9ac6ec3ea2311f54
2023-11-03 18:10:54 +00:00
Tagir Valeev
1a3dd4a6bb [java-inspections] AutoCloseableResourceInspection.AutoCloseableResourceFix: mod-command, preview, test
GitOrigin-RevId: 4cbd950abb071866e6f511b5743372f6d60051be
2023-11-03 18:10:50 +00:00
Tagir Valeev
19af94075b [java-inspections] Suppression fixes moved to ModCommands
Support for external suppressions is dropped (probably temporarily)

GitOrigin-RevId: 0b7ab4a1ec9c9551dadfb091a91f32f82de11d2d
2023-11-03 18:10:43 +00:00
Tagir Valeev
a996424f81 [java-inspections] MyAddExplicitTypeArgumentsFix: do not add the suppression annotation
It's unnecessary after IDEA-252040, and in fact 'redundant suppression' warning appears after that

GitOrigin-RevId: 94c93806c6c5a5b24087133c2b81001fdca463db
2023-11-03 18:10:36 +00:00
Artem.Bukhonov
746fed4bf3 RDCT-555 Sync language level to the client
Improve per file reporting

(cherry picked from commit fc2155d8743ee9da93b79921e30466208cf68b95)

IJ-MR-116786

GitOrigin-RevId: f3da21fdea6ea72a9f389b93f0c4ace607c0d737
2023-11-03 15:16:48 +00:00
vladimir.petrenko
00f4fbda86 RDCT-555 sync java level for virtual files to thin client
(cherry picked from commit 8ecc3301571b39ebbcbe9149278c2b0b49025b21)

IJ-MR-116786

GitOrigin-RevId: bc2b9991146b8ede984eeb70f2667fc6caee1290
2023-11-03 15:16:42 +00:00
Mikhail Pyltsin
19eded43f9 [java-highlighting] IJ-CR-118438 IDEA-315469 Quickfixes for switch labels with 'default'
- rebased to ModCommandAction

GitOrigin-RevId: dbb4b099ba7fbd0d8bc57068ade1cea5e77f40bb
2023-11-03 12:40:03 +00:00