Commit Graph

3282 Commits

Author SHA1 Message Date
Dmitry.Krasilschikov
197f0bd546 localize "Inspections" hardcoded literals
GitOrigin-RevId: 274c389075024728618e18c2a79804f31895c7c2
2020-02-04 17:36:32 +00:00
Tagir Valeev
aa3c4138ae NullableStuffInspectionBase: avoid reporting primitive type if annotation is inherited (IDEA-232026)
GitOrigin-RevId: 302234236e4d33882f81ed17f1cbe60ef13bea23
2020-02-04 12:37:14 +00:00
Tagir Valeev
8b6f3c1fa7 DfaBinOpValue.Factory.doCreate: more robust check (IDEA-CR-58001)
GitOrigin-RevId: 4528899a106b324f1f970ca9d48e206da5af8a41
2020-02-04 11:33:52 +00:00
Tagir Valeev
a97a32a336 Revert reporting of nullableReturns in NULLABLE methods
Fixes IDEA-232076 false positive "@Nullable method 'getLeastUpperBound' always returns a non-null value" for com.intellij.psi.GenericsUtil#getLeastUpperBound(com.intellij.psi.PsiType, com.intellij.psi.PsiType, com.intellij.psi.PsiManager)

GitOrigin-RevId: 5dbe43b56af2fc7ef1edb69a05a296db4af0b34b
2020-02-04 11:33:52 +00:00
Tagir Valeev
8012f18ad9 Ignore hardcoded contract if explicit nullability is specified (IDEA-232001)
GitOrigin-RevId: 65a2c640cb814aa5726c2c24eb0dffbea116bcb1
2020-02-04 11:06:36 +00:00
Tagir Valeev
9be22ca7e7 Do not assume that Object is assignable from any class
Class could be a primitive
Fixes IDEA-232014 False positive `Constant conditions & exceptions` inspection for `Class#isAssignableFrom(Class)`

GitOrigin-RevId: 4db7cfa10a0d2b8a2476f434db82d04d7a62cd38
2020-02-04 10:35:34 +00:00
Tagir Valeev
e51e92738d IDEA-232013 Incorrect warning "Condition ... is always false"
GitOrigin-RevId: 29d16f0b4585d6d1a40e2c24be2d66631647c3ea
2020-02-04 09:10:13 +00:00
Tagir Valeev
90a58ee75c DfaAssist: fix analysis of switch expressions (EA-221783)
GitOrigin-RevId: a721cc9c54ec3487ed87049b4f6fddb7021848a0
2020-02-04 09:10:13 +00:00
Tagir Valeev
71300a36eb Basic test-suite for codeanalysis-annotations
GitOrigin-RevId: a134aead43faf095ac3ccec4fb24af23c8f241a7
2020-02-03 09:39:27 +00:00
Tagir Valeev
1ecf89dcbf DataFlowInspectionBase internationalization
GitOrigin-RevId: 08434323329b331b72ffd07ed80fe8fe865c6ab7
2020-02-03 09:39:27 +00:00
Tagir Valeev
251f34e91f DfaPsiUtil#isEnumPredefinedMethod: use CallMatchers
GitOrigin-RevId: 2b28d1b229f2127a0f19901eb595423373ec0228
2020-02-03 09:39:27 +00:00
Tagir Valeev
2bf9fc4511 +org.hamcrest.junit.MatcherAssert (IDEA-231637)
GitOrigin-RevId: 5a7feed580c6b0fffc3e66d8e2351ba606370a01
2020-01-30 16:07:21 +00:00
Tagir Valeev
eb1143abcf DfaAssist: support while and do-while loops
GitOrigin-RevId: 2061e3ea64f9091060770c5bfa08c70f6921ad54
2020-01-30 11:03:20 +00:00
Tagir Valeev
6e12ae7e93 DfaAssist: track string length
GitOrigin-RevId: e00e205db48b0695c4309300f387649d5fdf2729
2020-01-30 11:03:20 +00:00
Tagir Valeev
c40db04b6c DfaBinOpValue: fix for float/double casts (EA-221317); more tests
GitOrigin-RevId: d9dbe0360a9427cf601eebe0b585fbfc7c45ccd8
2020-01-30 04:13:49 +00:00
Nicolay Mitropolsky
f61c5079a2 DeprecationInspection: flag kotlin.deprecation.inspection.enabled for using this inspection for Kotlin instead of annotator (KT-34877)
GitOrigin-RevId: f5b302279a2648c546d91555359d71f39e52ea12
2020-01-29 11:35:45 +00:00
Tagir Valeev
40e73aab84 ParameterNullityInference: strip parentheses & casts
GitOrigin-RevId: 9ef33b55c4fc088c214d279f198b48695a4a2fb2
2020-01-29 06:33:37 +00:00
Tagir Valeev
a75cce1c1b IDEA-231598 IDEA should detect no-op operations on bytes
GitOrigin-RevId: ec1c0322310465206d4c3cebc1dab197c7eda721
2020-01-29 05:35:20 +00:00
Tagir Valeev
b65047023a EqualsContract.java testdata fixed
GitOrigin-RevId: bf625bc165b84bb7653c8accd14fd5ce964d845f
2020-01-27 07:06:27 +00:00
Tagir Valeev
a0a2a7dd5d IDEA-231391 Evaluate 'x.contains(x)' as 'always true'
Also, restore common known type information on state merge

GitOrigin-RevId: f40b56b17c4f1f255c4533b5c8c65bfe3d0c9ebb
2020-01-27 06:33:15 +00:00
Tagir Valeev
619bfa9963 IDEA-231280 Quick fix for compare() method can be used to compare numbers generates broken code
Also declaration is joined automatically

GitOrigin-RevId: f94ddf5ae3e94edffdb44cd56ad6bf8b3a9054b4
2020-01-24 06:32:55 +00:00
Tagir Valeev
e512fa3c6a Internatinalization
GitOrigin-RevId: 54277418c48c95ac8065d4e18a65dd78f930bb3a
2020-01-24 06:32:55 +00:00
Tagir Valeev
762c20b6f5 IDEA-231238 False-positive nullability warning when using patterns
GitOrigin-RevId: 7c01148fde86284c0e1df215a39e1ef0808a1115
2020-01-23 11:08:32 +00:00
Anna Kozlova
082ef03d28 i18n
GitOrigin-RevId: 172608665bf0e4d8a2d0524c32c09f2d01765a8f
2020-01-22 20:44:44 +00:00
Tagir Valeev
21cc12500c JavaElementKind used
GitOrigin-RevId: 8fe8a3292567292fea2511e9d67a7d1a8d2ee154
2020-01-22 06:03:40 +00:00
Tagir Valeev
6bd95c28cc JavaElementKind methods renamed; more CommonQuickFixBundle and JavaElementKind usages
GitOrigin-RevId: 93f5b6e974986efb0de86566875d77dc821ffea5
2020-01-22 06:03:40 +00:00
Tagir Valeev
70d7f0d234 TrackingRunner: use JavaElementKind
GitOrigin-RevId: 1e6caec671de292091515d31c9133044853ffd37
2020-01-22 05:13:16 +00:00
Anna Kozlova
b41bd8ae8e entry points EP: mark as dynamic
GitOrigin-RevId: 90031511a88df6056295ed767e1341cbe0815418
2020-01-21 19:47:45 +00:00
Vladimir Krivosheev
ba98224912 remove author (only some, where it is ok)
GitOrigin-RevId: 7dbab7524fe4efc5d17a04b95dee88b6f80fbe8d
2020-01-21 17:36:52 +00:00
Tagir Valeev
d0f72f2f02 IDEA-231006 Throwable running 'Notnull / Nullable problems' inspection
GitOrigin-RevId: d30c8e1b6751463106d52c110ea06e02add3b8cd
2020-01-21 11:08:24 +00:00
Tagir Valeev
099d5fcf7c Prevent local value leaks via non-trivial field access
IDEA-230097 Inspection incorrectly shows "The call to 'assert true' always fails" on a Junit callback test

GitOrigin-RevId: 5ae966d139391f72c7d015297b093523dba5e5e8
2020-01-20 08:01:26 +00:00
Tagir Valeev
acd079d592 Call pushExpressionResult after field flushing so CommonDataflow (and other clients) has flushed result
Fixes IDEA-230116 Incorrect "Redundant operation on empty container" inspection result

GitOrigin-RevId: d764150c114bca699202dc39160efc084c077036
2020-01-17 08:35:20 +00:00
Tagir Valeev
78a91459c4 Array annotations changed to type-use style (not compilable now)
GitOrigin-RevId: 68aa4ba200618083684599228e13dfdba35967a4
2020-01-16 08:11:51 +00:00
Tagir Valeev
27a0e84a03 NullableStuffInspectionBase: fixed support for type-use annotations on arrays
EA-220460 - NPE: NullableStuffInspectionBase.checkOverriders

GitOrigin-RevId: 2198dd0ff91dd8b1e0a20dc6ce35abc4a26c9fca
2020-01-13 09:06:21 +00:00
Peter Gromov
3a7ab57eb2 IDEA-228079 Bad code green when dereferencing an unannotated parameter with nullable super
GitOrigin-RevId: ff3b4f3c7c01c2fb5aa90107037517653cadafa2
2020-01-08 18:34:42 +00:00
Sergey Ignatov
4591f890b2 unify bundle names: rename java error bundle
GitOrigin-RevId: 4da165583299a5a856b369700dc6ee3c21df4d3a
2020-01-06 21:06:33 +00:00
Tagir Valeev
acffc2bef9 PossibleHeapPollutionVarargsInspection: behavior changed according to new proposal:
1. Warn on compact/canonical constructor (and annotate it) when present
2. Create compact constructor and annotate it if not present
Review ID: IDEA-CR-56682

GitOrigin-RevId: 9ace593c6ae32490dd37f684054a2e17d93e81a8
2020-01-03 12:03:57 +00:00
Dmitry.Krasilschikov
184607e98e LAB-62 get rid of static *Bundle usages: replace getNAME, getTEXT, getDISPLAY_TEXT etc fields with readable names
GitOrigin-RevId: eccc5481cd2e7174f4107cf3ce456b23f502839b
2020-01-01 21:14:38 +00:00
Dmitry.Krasilschikov
89c610e27f LAB-62 get rid of static *Bundle usages: more fields with better names
GitOrigin-RevId: a45cdabe30739e10f6ae9c979819b6ee9d5afdd0
2020-01-01 16:31:42 +00:00
Dmitry.Krasilschikov
8fd0bcff95 LAB-62 get rid of static *Bundle usages: more fields with better names
GitOrigin-RevId: 7f8d93704b415e3eca55479936300cbfb2dd2cd8
2020-01-01 16:10:09 +00:00
Dmitry.Krasilschikov
38f6f13df8 LAB-62 get rid of static *Bundle usages: more fields
GitOrigin-RevId: 69ded152ad5996ae07c45dc4fd6ff20224d25572
2020-01-01 11:03:11 +00:00
Dmitry.Krasilschikov
240e2cea4c LAB-62 get rid of static *Bundle usages: fix incorrect field renames
GitOrigin-RevId: 786fac15a8a393ba91a82e3bf85270393e4383fb
2020-01-01 11:03:11 +00:00
Dmitry.Krasilschikov
81be21f0e8 LAB-62 get rid of static *Bundle usages: more "bundle" fields with readable name
GitOrigin-RevId: 6c3695d146c1a01a904d3231903cf19ceb1f743c
2019-12-31 16:31:26 +00:00
Dmitry.Krasilschikov
3d68526667 LAB-62 get rid of static *Bundle usages: replace getNAME() with more readable getName()
GitOrigin-RevId: 9fd617248e5b405d2094ce949d1810555e0bf814
2019-12-31 16:31:26 +00:00
Tagir Valeev
6b5916730d ControlFlowAnalyzer#addThrows: avoid converting back to PsiTypes (also avoid possible NPE if SDK is not set)
GitOrigin-RevId: 5a9776725d4f6d006444f25496620eac9a81b240
2019-12-31 12:33:54 +00:00
Piotr Tomiak
5dcee28701 Make extension point listeners API more robust
- explicit listener for extension point list change, which is called only once for bulk changes
- deduplication and cleanup of notification code

GitOrigin-RevId: e49d3bf23ad860d2aa129b7c1bb329d83080d47f
2019-12-30 09:08:10 +00:00
Dmitry.Krasilschikov
f0df6b34fe LAB-62 get rid of static *Bundle usages: public static fields
replace `public static String X = *Bundle.message(...)` with
```public static String getX() {
    return *Bundle.message(...)
}
```

GitOrigin-RevId: cb9d31ce0cc938d794867c9467083c9968d8cbd5
2019-12-29 19:03:50 +00:00
Dmitry.Krasilschikov
f0a9c5f83b LAB-62 get rid of static *Bundle usages: more private static fields
replace `private static String X = *Bundle.message(...)` with
```protected static String getX() {
    return *Bundle.message(...)
}
```

GitOrigin-RevId: 5de111f477a214e87d22226974c3fdf0e10fcbb0
2019-12-29 19:03:50 +00:00
Dmitry.Krasilschikov
2004fcac98 LAB-62 get rid of static *Bundle usages: private static fields
replace `private static String X = *Bundle.message(...)` with
```private static String getX() {
    return *Bundle.message(...)
}
```

GitOrigin-RevId: f7562fdda0b52c4a4b04c17b7bb43aa17310e20d
2019-12-29 19:03:50 +00:00
Tagir Valeev
755c4647e2 PossibleHeapPollutionVarargs: do not warn on compact constructor; do not warn on record if canonical constructor is present
Review ID: IDEA-CR-56682

GitOrigin-RevId: cdd1ee44e8679a374ff495d852a22c9e612149b8
2019-12-28 06:40:55 +00:00