Commit Graph
7564 Commits
Author SHA1 Message Date
Roman.Ivanov 5076e08145 set SPACE_BEFORE_COLON_IN_FOREACH true by default, fix tests 2018-06-26 12:04:00 +07:00
Tagir Valeev c59f936afc Revert DFA refactoring in master for a while
This reverts commits 3e4cd65, a8798fc, f9bfad8, 7d78237, b3a0e44, b4d1655, fd66719, a4a8455
2018-06-26 10:25:18 +07:00
Anna Kozlova c318eb788b var -> explicit: don't register warnings twice
IDEA-CR-34042
2018-06-25 16:28:59 +03:00
Anna Kozlova 810a23812f disable surroundWith fix for var typed locals with non-denotable inferred types
IDEA-CR-33936
2018-06-25 16:28:59 +03:00
Roman Shevchenko 002f0ea6c3 Cleanup (test data formatting) 2018-06-25 14:44:25 +03:00
Pavel Dolgov 6caa2e4236 Java: Take into account writes to the field done via AtomicFieldUpdater (IDEA-152262) 2018-06-25 12:57:26 +03:00
Tagir Valeev a4a84553e4 DFA instruction visitor refactoring wave#5 fixes
ResultOfInstruction
2018-06-25 15:48:10 +07:00
Anna Kozlova b62710799a inline method: erase type for array creation (IDEA-194441) 2018-06-25 10:34:14 +03:00
Tagir Valeev fd66719ce0 DFA instruction visitor refactoring wave#5
CheckReturnValueInstruction replaced with checkReturnValue call (PSI-based)
beforeExpressionPush for typecast result
Control flow: &&/|| handling unified and simplified (less jumps, less states)
ContractChecker rewritten (now visitor-based)
2018-06-25 13:49:39 +07:00
Tagir Valeev b4d16557b3 DFA: better equals handling 2018-06-25 13:49:36 +07:00
Roman.Ivanov 9d02d556ef SortContentAction: add test for leading comments : IDEA-194456 2018-06-23 09:57:00 +07:00
peter 404c2bc891 IDEA-194439 Regression: Enum.toString() should not be externally annotated as @NotNull 2018-06-22 17:17:14 +02:00
Anna Kozlova 17095a1640 var -> explicit: fix lambdas with multiple parameters (IDEA-194414) 2018-06-22 18:15:50 +03:00
Anna Kozlova 14e65418b5 introduce field: resolve conflicts with constructor params (IDEA-91633) 2018-06-22 16:02:47 +03:00
Roman.Ivanov d52470d415 SortContentAction: preserve comments in enums before first element 2018-06-22 15:45:12 +07:00
Tagir Valeev 20b6cba1d5 "Useless" word is replaced with "redundant" or other alternatives 2018-06-22 12:39:20 +07:00
Tagir Valeev 7bc6c05c41 RedundantCastUtil#isCastRedundant: skip further checks if cast operand type equals to cast type
Fixes IDEA-194278 "Too weak variable type leads to unnecessary cast" does not detect some cases
2018-06-22 09:56:12 +07:00
Anna Kozlova 567fa3692d testdata for IDEA-128159 2018-06-21 19:36:49 +03:00
Anna Kozlova 107a789bea highlighting: mark default annotation value used for implicit calls (IDEA-71133) 2018-06-21 13:50:19 +03:00
Anna Kozlova 18c575a41d folded functional expression: compare unprocessed types (IDEA-194333) 2018-06-21 13:50:18 +03:00
Tagir Valeev dde103758e IDEA-194142 IDEA should recognize min/max usage with reversed order 2018-06-21 17:02:27 +07:00
Roman.Ivanov 19bfb9be67 SortContentAction: prevent sorting when enum entries have dependencies 2018-06-21 11:55:22 +07:00
Anna Kozlova 1a5768f1cd surround with try/catch: replace var with explicit type (IDEA-191069)
when declaration has to be split
2018-06-20 14:49:51 +03:00
Tagir Valeev ec6aefeee9 MagicConstantInspection: shorten message 2018-06-20 16:50:21 +07:00
peter 83fdd6aa7a disable parameter nullability inference in presence of container defaults (IDEA-191576) 2018-06-20 09:12:22 +02:00
Anna Kozlova 017e3e4781 fix testdata 2018-06-20 09:56:55 +03:00
Anna Kozlova 681bfe7ba6 enable explicit type -> var for diamonds (IDEA-188771)
expand diamonds and spare on explicit type declaration
2018-06-19 15:50:48 +03:00
Roman Shevchenko 4f048d886a Cleanup (test data formatting) 2018-06-19 15:09:54 +03:00
Anna Kozlova 6a85ff1fb5 resolve conflicting names when rename to 'ignored' (IDEA-184092) 2018-06-19 15:00:38 +03:00
Tagir Valeev 233c16b3e4 MagicConstantInspection: handle special case of Calendar.get()
Fixes IDEA-144891 Good code is red: "Magic Constant" with Calendar.get()
Tests modernized
2018-06-19 17:57:40 +07:00
Anna Kozlova 201de8dd01 redundant cast: trim too long messages (IDEA-182666) 2018-06-19 13:18:27 +03:00
Tagir Valeev ecb2f6c1cf Add "Replace 'compute' with 'computeIfPresent'" fix
Helps for IDEA-194058 False-positive warning of producing NullPointerException for Map.compute
2018-06-19 15:07:31 +07:00
Tagir Valeev 42b2531f09 IDEA-194143 min after useless sorted in stream 2018-06-19 14:41:10 +07:00
Anna Kozlova fad349d791 lvti: don't resolve method calls to detect self-referenced (IDEA-194104) 2018-06-19 08:18:04 +03:00
Tagir Valeev 60672d97c7 IDEA-161859 Safe delete method parameter does not update method contract 2018-06-19 11:28:18 +07:00
Tagir Valeev b5a6ac001b RedundantStreamOptionalCall: do not warn if next sorted comparator might produce different result
Fixes IDEA-194009 False "Redundant step in Stream" inspection
2018-06-19 09:53:57 +07:00
Anna Kozlova 876dd36dd9 use boxed type instead of expected primitive when NULL type is calculated
this allows int -> Integer signature changes when null is passed where primitive is expected (IDEA-164942)
2018-06-18 19:48:12 +03:00
Anna Kozlova f6853fecd7 disable wrap with Integer.parseInt for null type (IDEA-164942) 2018-06-18 19:48:11 +03:00
Anna Kozlova 6adc33ee16 make create local from fix available on full range (IDEA-141875) 2018-06-18 17:05:41 +03:00
Anna Kozlova dabef9b7b1 keep comments (IDEA-140861) 2018-06-18 17:05:41 +03:00
Anna Kozlova c647e7e306 testdata for IDEA-194093 2018-06-18 17:05:41 +03:00
Tagir Valeev f2f23f3610 LongRangeSet.RangeSet#plus: convert to simple range if number of sets exceeds 3
Fixes IDEA-193987 IDE freeze when turn on code inspection data flow for Java
2018-06-18 17:18:20 +07:00
Tagir Valeev 048abf37d7 DivideByZeroInspection: add fix for 0.0/0.0 (replace with NaN)
Fixes IDEA-117884 Inspection "Divide by zero": Recognize 0.0/0.0
2018-06-18 16:36:10 +07:00
Roman Shevchenko 0e8c2770a0 Cleanup (test data formatting) 2018-06-15 12:21:39 +03:00
Roman Shevchenko dad46c21f1 [java] returns type parameter name to "missing tag" warning 2018-06-15 12:20:17 +03:00
Anna Kozlova b5a41bc285 highlight sibling continue/break (IDEA-117109) 2018-06-15 12:08:04 +03:00
Tagir Valeev 3e4cd658e9 DFA instruction visitor refactoring wave#1
InstructionVisitor#beforeExpressionPush method which is called before every push of PsiExpression result (were it simple reference, operation or method call)
CustomMethodHandlers: do not modify states; only return resulting value (current handlers do not produce more than one value)
Xor polyadic now supports reporting for subexpressions
2018-06-15 15:24:16 +07:00
Anna Kozlova fb62ac70cd fix testdata 2018-06-14 20:35:33 +03:00
Anna Kozlova 90489c7c58 add javadoc for type parameter: insert brackets (IDEA-193915) 2018-06-14 17:54:17 +03:00
Anna Kozlova 1e7e741009 keep annotations for explicit to var fixes (IDEA-193876) 2018-06-14 12:10:52 +03:00