190 Commits

Author SHA1 Message Date
Tagir Valeev
34192fbc95 [java-dfa] IDEA-285470 DFA: The reason of an Integer variable being always non-null after a ternary operator isn't very clear
GitOrigin-RevId: 476eb0cd257bd8bc77cf728bb65a559fdae229e4
2021-12-23 05:38:28 +00:00
Bas Leijdekkers
ed2c73e98c more consistent Java inspection names
GitOrigin-RevId: 5c958dfd8b5f55e9e5bede82be5015c3299dd16e
2021-12-20 10:55:14 +00:00
Tagir Valeev
ed69cc6401 [java-inspections] IDEA-282262 Add 'Find the cause' action to 'Redundant operation on empty container' inspection
GitOrigin-RevId: 79f33120532750b5e93ffa3d7ce40c2345d17e39
2021-11-10 14:26:03 +00:00
Bas Leijdekkers
9c6a876508 fix inspection name (IDEA-176097)
GitOrigin-RevId: ab670a3feb3a9a114f26ee90210dffb0801c73cb
2021-11-02 00:24:46 +00:00
Ilyas Selimov
6b74c12eab [java] - unused declaration rework for functional expressions
GitOrigin-RevId: e2f2188edf79fddd902c038bdfdea072eed01bfe
2021-10-11 05:51:42 +00:00
Aleksey Pivovarov
aa0a99d1e0 ui: fix incorrect encoding in bundled strings
GitOrigin-RevId: b945291d452eb90037a5b6721eefc96a7bfc7481
2021-09-30 17:12:53 +00:00
Tagir Valeev
528416102b [java-dfa] Support explanation for constructor contracts; ArrayBlockingQueueContract constructor contracts
GitOrigin-RevId: 641b8569630c8f22d0bfa806f3cd5a54c3290ba4
2021-09-14 15:25:04 +00:00
Anna Kozlova
c90e44b570 [java] remove html from properties
GitOrigin-RevId: 4af618f65397de31d2cb8f72c6ff10f2d82d4e1c
2021-09-08 16:42:15 +00:00
Tagir Valeev
5bdf9bb98a [java-dfa] IDEA-277611 Enhance enum support in Java DFA (ordinal support)
GitOrigin-RevId: 0e294d5b9e886ae786d80070bd5c30f6da085680
2021-09-08 14:55:03 +00:00
Anna Kozlova
1f0f1acfbc [java] warn on non-instantiatable intersection types (IDEA-277529)
extend for any context

GitOrigin-RevId: d6f499348c8278bcb58951900ebf116440719082
2021-09-07 07:14:24 +00:00
Kirill Kirichenko
e8735cf9df IDEA-231364 Implement Find Usages tool window. Change "base methods" to "base method" string. Postpone notification hiding.
GitOrigin-RevId: 72d35b910b02c788c412c1826d14675142e04b38
2021-08-06 10:14:53 +00:00
Anna Kozlova
d83bc47cf5 [redundant cast] do not report string format arguments where it clarifies the parameter type (IDEA-273413)
GitOrigin-RevId: 1b007e9bcbff6907cb1e81631431b0f13d6b9c36
2021-07-14 22:38:37 +00:00
Kirill Kirichenko
bbb4ac96fb IDEA-231362 Implement Show Usages popup new design. Capitalize option strings properly.
GitOrigin-RevId: 004d0040e487333d6065bec22e202d8e068a7ca4
2021-07-09 12:57:08 +00:00
Kirill Kirichenko
b0cb88eb95 IDEA-231362 Implement Show Usages popup new design. Fix option string for "usages of base method", add registry key to disable the options.
GitOrigin-RevId: 7408176f9145f75b77ef927987a70cc198b5b41b
2021-07-08 16:52:02 +00:00
Tagir Valeev
8e242ccfca [java-dfa] Find the cause: cosmetic changes in messages
GitOrigin-RevId: 01b45074f9c8adc03bc788958ecba2fde134e55d
2021-06-23 04:51:46 +00:00
Tagir Valeev
e102808d58 [java-inspections] IDEA-272016 Find the cause cannot explain why 'environmentStr.equalsIgnoreCase("rpt")' is always 'false'
Also, improved explanations in other cases

GitOrigin-RevId: de42850d4fa2e17c2c2ee0c30bbf5df22c988fa6
2021-06-23 04:51:44 +00:00
Roman Ivanov
3ff8c67c09 [java] split HighlightingFeature for patterns in switch into 2 parts
Otherwise, in the context for instanceof it looks weird

GitOrigin-RevId: 115b7552f7ad4050e7833dbb890ec3fb6048db64
2021-06-15 17:46:04 +00:00
Roman Ivanov
0f24b2a047 [java] highlight patterns in switch if level is low
GitOrigin-RevId: c22fba0aa5e31cebfd59bff164ab2df0a5d389e0
2021-06-11 17:35:43 +00:00
Kirill Kirichenko
76ed63890e IDEA-231362 Implement Show Usages popup new design
GitOrigin-RevId: cc4aefb6e54aa4392445888ab21c2eb1046e4a42
2021-06-09 11:48:12 +00:00
Tagir Valeev
0136ec1c0c [java] Unused properties removed
GitOrigin-RevId: 35bf04e774d2f3bec67006eb6068a6597dbc2bbd
2021-05-17 02:52:11 +00:00
Ilyas Selimov
a117b21680 DFA - added Boolean.TRUE/FALSE.equals() quick fix to unbox boolean nullable variable
GitOrigin-RevId: 45952b11139cf435e218ddd9c3ba57e237230eed
2021-05-13 04:38:40 +00:00
Bas Leijdekkers
f5cb2d1b2f add option to ignore records to "Class does not override 'toString()' method" inspection (IDEA-267423)
enabled by default

GitOrigin-RevId: 6f9b1c14331a38971d7b243510c66353d47d1a9a
2021-04-24 13:12:26 +00:00
Tagir Valeev
94eb1878b6 [java-dfa] Refactoring
1. Extract LongRangeSet to analysis-api (remove Java dependency)
2. Remove DfaValue.getType
3. DfaBinOpValue.Factory.create accepts LongRangeBinOp now

GitOrigin-RevId: 01f4ebd6957d76d86df46ddbbec1cef7c82b4ef0
2021-04-19 11:38:12 +03:00
Tagir Valeev
e891c7186b [java-inspections] IDEA-266735 @Range annotation should check bounds of return value
GitOrigin-RevId: 80379806d869cec3cccae4175fd4ed118eb7aae8
2021-04-15 08:59:06 +03:00
Nikita Eshkeev
41a3187b04 [java-highlight] IDEA-253796 Trying to call static method on a new-expression should offer a quickfix to remove new
When a user call a static member of a class (field or method) they might not realize that there is still the `new` keyword present in the beginning of the expression. It's might be annoying, since the user need to go back to the beginning and remove the keyword manually and then go back where they were.

This patch adds a quick-fix that removes `new` if the new expression can be treated as a valid call expression to either a method or a field of a class.

GitOrigin-RevId: eac92b3904049546d7ca3a3b93f73386a5381b2c
2021-04-01 23:46:38 +00:00
Bart
b3a6e7ebd2 [jvm] IDEA-231329 Convert @TestOnly inspection to UAST
GitOrigin-RevId: 15230423d944e7b3a236f401bdc251dabb7d5586
2021-03-23 10:35:38 +00:00
Louis Vignier
65b7f80ce4 [java] Fix quotes in inspection descriptions
GitOrigin-RevId: e227c0708730b61eae81871bb9b1013853d8b4b2
2021-03-19 12:07:46 +00:00
Tagir Valeev
e3ce663932 [java-inspections] Message update (extends/implements list -> clause)
GitOrigin-RevId: 980a0f99b085f621a4928aea4e06362a237954f5
2021-03-19 07:48:21 +00:00
Tagir Valeev
afc371e029 [java-inspections] Quick-fix for missing not-null annotation on type element
GitOrigin-RevId: 6c7d91b8f30015eb1b5f51be422951ba8ef6b36b
2021-03-19 07:27:28 +00:00
Ilyas Selimov
f03cf3c54c ClassGetClass - fix description
GitOrigin-RevId: 5b494afe8038ed665cbb8f5f27bf44366f163967
2021-03-17 14:16:28 +00:00
Ilyas Selimov
d7e459acec JavaModuleNaming - fix description
GitOrigin-RevId: 7858d81cec269aa54e73e64132b342802c5d2ba1
2021-03-17 14:16:21 +00:00
Louis Vignier
712fec98d9 [java] Update inspection descriptions
GitOrigin-RevId: 17a71e3175e73635bceeff63d0c132b1c89bcbfe
2021-03-16 19:54:03 +00:00
Louis Vignier
170c838207 [java] Update inspection descriptions
GitOrigin-RevId: 1c55fac4ca08678e76aee02962ddf12153dd51cd
2021-03-16 14:56:20 +00:00
Louis Vignier
d830ccbf28 [java] Update inspection descriptions
GitOrigin-RevId: c9f960eb87b520f47644c31cdfabf03434ee9b59
2021-03-16 14:56:18 +00:00
Bart van Helvert
e321d26a2d [java] Update inspection description
GitOrigin-RevId: b74ce5e0a81dec057cc35df07fc1fee411adf0e7
2021-03-15 20:38:45 +00:00
Tagir Valeev
a6bc8802f1 [java-analysis] Report nullability annotations on enum constants and on locals (for JSpecify)
GitOrigin-RevId: 48f21b639a1eaf3ca9c2d75e1cf846bddd726260
2021-02-11 07:05:25 +00:00
Tagir Valeev
ba33ae8bcf [java] JSpecify: initial strict mode support
GitOrigin-RevId: a387d37ac8924b8e63847eb54458424f5f690d9a
2021-02-11 05:23:59 +00:00
Tagir Valeev
aa3b987530 [java-analysis] Report incorrect locations of nullability annotations (JSpecify)
GitOrigin-RevId: bc4915321fc45458caa79dc9424467dde05a9957
2021-02-10 10:02:41 +00:00
Tagir Valeev
11771e3ba1 [java-analysis] Better support for unspecified nullness (for jspecify); report some inherently not-null places
GitOrigin-RevId: 03fdd34aa1e5d6b591478ccd65ad2279a0e69566
2021-02-10 07:09:32 +00:00
Tagir Valeev
49cd49dfa3 [java-dfa] Revise mutability: MUST_NOT_MODIFY
New level 'MUST_NOT_MODIFY' is introduced for parameters inside pure methods to signal that we should not modify these values, but we don't actually know whether they mutable or not (fixes IDEA-257286). Also, MUST_NOT_MODIFY is dropped inside nested closures, so we don't warn if parameter is modified there.

GitOrigin-RevId: f095e72be772eef8324ef2246fb0b7262beae20d
2021-02-01 08:25:58 +00:00
Tagir Valeev
5d20b5dbb9 [java-highlighting] Allow statics inside inner since Java 16 (IDEA-257410)
Also remove redundant record tests

GitOrigin-RevId: ce57189891b3df3ba4659e8e3a2ded125234911a
2020-12-25 11:59:29 +00:00
igor.kulakov
547015aee2 IDEA-249856 proofreading resources
GitOrigin-RevId: f23d92ca40f25fefadfc2941c77624f4199c29a0
2020-11-30 22:16:44 +00:00
Tagir Valeev
5e6932f3b5 [java-dfa] Check new array length to be non-negative in DFA
Fixes IDEA-254545 Inspection for allocation of array with negative size
Tests are contributed by Ivo Smid (PR#1468)

Co-authored-by: Ivo Smid <ivo.smid@gmail.com>

GitOrigin-RevId: b58f281faa6caeeb5a7fbb06b110182994369426
2020-11-19 02:39:59 +00:00
Tagir Valeev
35b14cacc7 [java-inspections] UnnecessaryToStringCall: option to report non-null qualifiers only; enable by default
Fixes IDEA-253383 "Redundant string operation" inspection should report use of toString() in string concatenation

GitOrigin-RevId: 935907a0b470503f915399947d3603c9852a440d
2020-11-12 03:28:51 +00:00
Sergey Patrikeev
3957e18003 i18n fixes in the 'execution-impl' module.
GitOrigin-RevId: af6604abe0ed2dd606e2362d3f173932ea4c4df8
2020-11-09 19:51:24 +00:00
Tagir Valeev
742ad45a22 [java-dfa] Report implicit unboxing of nullable method reference argument
Fixes IDEA-250913 Inspection "Constant conditions and exceptions" does not catch "Unboxing may produce NullPointerException" in stream operations

GitOrigin-RevId: 536668db2e1b3bb5307cccff710f3212d07bce2e
2020-09-21 09:44:52 +00:00
Anna Kozlova
a29e517758 java shebang outside of source roots;tests (IDEA-205455)
GitOrigin-RevId: 571d6c8c5bef490bb933534765a73eb030814182
2020-09-03 10:08:09 +00:00
Tagir Valeev
432a7bbb98 Messages proofreading
GitOrigin-RevId: d04913e6771f3405fff73ec814b64df06dc997fc
2020-09-02 04:27:38 +00:00
Tagir Valeev
45755a41f6 [java] i18n
GitOrigin-RevId: a192ba05b86da2fb7fe64f08ac30f5d4e18a229a
2020-08-20 16:17:23 +00:00
Tagir Valeev
cf7aed35a5 [java-analysis] i18n; HtmlChunks used
GitOrigin-RevId: 3a3fda7178ae526ee80dcbd77d2c2402c801e4f9
2020-08-19 18:27:24 +00:00