Commit Graph

295 Commits

Author SHA1 Message Date
Georgii Ustinov
bc8f0bf7c5 [Java. Logging] add tests for logging reference resolver
IDEA-357019

GitOrigin-RevId: 2882457613a0c5d0bc55fc2e483de2a27af6df5c
2024-09-09 18:47:39 +00:00
Bart van Helvert
362bcc4561 [java] Regenerate API lists with Java 23
The newly regenerated list is merged with the previous API list. The newly generated list uses an updated version of the generator that correctly writes canonical names for Java versions higher than 19. #IDEA-357683 Fixed

GitOrigin-RevId: 81c62964385d1daaeaf3e84306ebfbc5c77ad90a
2024-09-04 23:47:59 +00:00
Georgii Ustinov
afa40cc6b8 [Java. Logging] add tests for logging placeholder annotator
IDEA-357019

GitOrigin-RevId: 83b43d897241603418cb3a96abba67bb603fba96
2024-08-27 17:21:44 +00:00
Mikhail Pyltsin
b7d3abc522 [uast-inspections] IDEA-357019 Inspection warning 'Number of placeholders do not match number of arguments in logging call' not reported when logger not initialized inline
GitOrigin-RevId: e601f8f8c94233af84856b7be2626f71b57325eb
2024-08-15 12:29:18 +00:00
Mikhail Pyltsin
b88d49eb4c IJPF-CR-21702 [java-inspection] IDEA-337700 Improvements for logging inspections
- fix text

GitOrigin-RevId: 18aaedbc0531f144ee819d22047d33a925ee9357
2024-07-03 12:12:46 +00:00
Bart van Helvert
b291e01c7a [jvm] Enable Assert between inconvertible types inspection by default
Enable the inspection by default but disable AssertJ support because it has too many problems. #IDEA-348567

GitOrigin-RevId: 3dea62277fb224cdc5474e39b28cb4eb94aa8c3c
2024-06-29 00:21:55 +00:00
Mikhail Pyltsin
71cab9b683 [uast-inspections] IDEA-354390 Support structured logging for SLF4J
- don't highlight if last arguments are structured arguments

GitOrigin-RevId: fb0bf20ff547df4e41c5c6a50e89afe29d149f48
2024-06-04 20:10:51 +00:00
Georgii Ustinov
3a961fdccd [Java. Refactorings] Extract common base for test methods
IDEA-351758

GitOrigin-RevId: 3732c0bac541df2ae4d9a8fc103b0b9b625ed30d
2024-05-03 14:51:35 +00:00
Georgii Ustinov
8b49638252 [Java. Logging] Add tests for consecutive escape symbols for LoggingArgumentSymbolReferenceProvider
IDEA-342484

GitOrigin-RevId: 529dba46a0c31714e8c2a3b59507bf8558265319
2024-04-29 11:18:36 +00:00
Georgii Ustinov
0e73acf094 [Java. Logging] Restore support for escape symbols in LoggingArgumentSymbolReferenceProvider
IDEA-342484

GitOrigin-RevId: 68d3e58e45554128c59d0a81d4d24ad415b8b812
2024-04-25 13:58:42 +00:00
Georgii Ustinov
c25c1ba670 [Java. Logging] Properly handling with logging placeholders resolve with backslash character
IDEA-342484

GitOrigin-RevId: 70cbc9a537943dd3520282206ef8ddb20f01ad5f
2024-04-22 13:15:03 +00:00
Tagir Valeev
098214398a [java-property-tests] SourceToSinkPropertyInspectionTest fixed
Likely, the improvements in inspection were not reflected in test:
1. Later assignment to local variable overwrites the previous tainted state
2. Constant conditions like (1 == 1) are evaluated by inspection, so we need a non-constant one in test

GitOrigin-RevId: 62e373f85011b8302186cdf3b951cb8b056a7603
2024-04-19 17:41:56 +00:00
Georgii Ustinov
4fb2b2230d [Java. Logging] Add tests for placeholder highlighting for java
IDEA-342483

GitOrigin-RevId: 5894b7a35a44d19fbdfb461e3bdb45f07b5581b8
2024-04-10 14:15:19 +00:00
Georgii Ustinov
0f3b38bc6f [Java. Logging] Add extra tests for multiline strings and interpolation
IDEA-342484

GitOrigin-RevId: 9ec93ffa94d6109978ab3e219900f939427fe1a2
2024-04-05 15:21:26 +00:00
Georgii Ustinov
fee13aa547 [Java. Logging] Add tests for numbered and previous placeholders for logging resolve
IDEA-342484

GitOrigin-RevId: d711077e2cabbff3068df6e442a91b8b8ffcd852
2024-04-05 15:21:21 +00:00
Mikhail Pyltsin
6e7179de29 [uast-inspection] IDEA-349978 Inspection "Non-safe string is passed to safe method" loses track of String after IF
- process all branches if it is impossible to predict

GitOrigin-RevId: a3b0ada8753fb00c98eb02de14fc02e9fc15452c
2024-04-03 20:02:49 +00:00
Mikhail Pyltsin
719bb1619c [uast-inspection] IJ-CR-130570 IDEA-350483 New inspection LoggingGuardedByConditionInspection also deletes comments
- uast comment tracker

GitOrigin-RevId: d484939094c50bd5b7304d9703052f9841679c46
2024-04-03 20:02:45 +00:00
Mikhail Pyltsin
e84bc31482 [uast-inspection] IDEA-350483 New inspection LoggingGuardedByConditionInspection also deletes comments
- support comments

GitOrigin-RevId: b5add2dcbe56eaca7d8c90319734bacda3e68923
2024-04-03 11:41:20 +00:00
Mikhail Pyltsin
59f94d7232 [java-inspection] IJ-CR-128589 IDEA-349655 Improvements for logging inspections. new LogStatementNotGuardedByLogCondition
- delete custom settings

GitOrigin-RevId: dc3625006922b3db74c6f478a3b1ac8bf5e5ddad
2024-03-22 14:28:29 +00:00
Georgii Ustinov
72f8dd7b29 [Java. Logging] Add tests for kotlin logging resolve placeholders
IDEA-342484

GitOrigin-RevId: 80da1ccf89b4cc37813facc71d3fc389ead42869
2024-03-21 14:02:59 +00:00
Georgii Ustinov
2f4aa20792 [Java. Logging] Add tests for java logging resolve placeholders
IDEA-342484

GitOrigin-RevId: 79f8501d6742a8174806e33abadeab3919101519
2024-03-21 14:02:52 +00:00
Georgii Ustinov
0e8e1f1598 [Java. Logging] Rename JvmLoggerSymbolReferenceProvider to LoggingArgumentSymbolReferenceProvider
IDEA-342484

GitOrigin-RevId: 60c6c1efbdd4f29bad036f79ce62f8759d2e7fd2
2024-03-15 15:15:20 +00:00
Georgii Ustinov
c3bc0c82af [Java. Logging] Add base for tests for resolving logger methods in java
IDEA-342484

GitOrigin-RevId: fd2666c64933e2c82e546e20b752f2a4a4775c02
2024-03-15 15:15:15 +00:00
Bart van Helvert
f896419d92 [jvm] Split JUnit usage provider per framework
Will allow for disabling them individually. #IDEA-346510 Fixed

GitOrigin-RevId: 7b879111b92f38a7a55166d67d657520c6d9314d
2024-03-12 01:13:37 +00:00
Mikhail Pyltsin
d4b2f1f75d [java-inspection] IDEA-337700 Improvements for logging inspections
- new inspection LoggingGuardedByConditionInspection

GitOrigin-RevId: 4dc52a70105fb7bdbbf3d6ddbed5db2e6640fd0d
2024-03-08 21:31:58 +00:00
Mikhail Pyltsin
5f382bc662 [java-inspection] IDEA-337700 Improvements for logging inspections
- new LogStatementNotGuardedByLogConditionInspection

GitOrigin-RevId: e5cb767b24b33cb450597551dbbf4ece153a81e2
2024-03-07 12:05:26 +00:00
Mikhail Pyltsin
3aee4d1ab9 [uast-inspection] IJ-CR-127603 IDEA-347890 Similar logs inspection. Skip warning if they are in the same codeblock
- add case with one similar message

GitOrigin-RevId: 79c23c016c857949b91ca3cbaaf9b63e5c8243fd
2024-03-04 11:42:56 +00:00
Mikhail Pyltsin
1da47e479f [uast-inspection] IDEA-347890 Similar logs inspection. Skip warning if they are in the same codeblock
GitOrigin-RevId: 7b481eebc5196909c648b46051bfeb46feab6d59
2024-02-29 19:21:24 +00:00
Mikhail Pyltsin
3d588e6190 [java-console] IDEA-346172 Console navigation. Skip sun.awt.X11
GitOrigin-RevId: 5b213dda688f89adc603edf8e36a1ac737b9b2af
2024-02-14 20:25:40 +00:00
Mikhail Pyltsin
b76d998616 [java-console] IJ-CR-125130 IDEA-344708 JVM Log navigation doesn't support nested classes
- reformat tests

GitOrigin-RevId: 2234cfe824796383a04a66a457b34e0eb421b4e0
2024-02-05 17:45:34 +00:00
Mikhail Pyltsin
a6c3ae7d9d [java-console] IJ-CR-125130 IDEA-344708 JVM Log navigation doesn't support nested classes
- fix tests
- more tests

GitOrigin-RevId: 61d37ef812c1dd7558d5ec8324717dd207c76345
2024-02-02 15:48:41 +00:00
Mikhail Pyltsin
888a48604c [java-console] IDEA-344708 JVM Log navigation doesn't support nested classes
- support local classes

GitOrigin-RevId: 93ecd046a980980e4a25d8b2e76f72b684bb0a26
2024-02-01 17:22:37 +00:00
Mikhail Pyltsin
fd0e68a470 [java-console] IDEA-344708 JVM Log navigation doesn't support nested classes
- support double nested classes

GitOrigin-RevId: 169c1c30bc895a838bdedd941d6397fe6de5c0ef
2024-01-31 23:06:53 +00:00
Mikhail Pyltsin
199e367dbd [java-console] IDEA-344708 JVM Log navigation doesn't support nested classes
GitOrigin-RevId: 80c2c932b4630df848b7ff897a1ac50c988b8bcc
2024-01-31 18:39:52 +00:00
Tagir Valeev
0ceb02ac9a [jvm-inspections] Move Java test data for EmptyMethodInspection to JVM module; suppression top-level test
GitOrigin-RevId: 645e9ea69d7d2c81d65bfe73d6e74dc30c4e22e6
2024-01-30 11:13:43 +00:00
Tagir Valeev
0385834f13 [jvm-inspections] Fix EmptyMethod compatibility with Kotlin
1. Fix suppression handling for Kotlin in global inspections
2. Fix RefMethodImpl#hasBody for top-level Kotlin functions
3. Move to JVM module
4. Add Kotlin tests
Fixes IDEA-330737 @file:Suppress("EmptyMethod") does not work

GitOrigin-RevId: 83f383e06754f510b6a99e35751263017734bb26
2024-01-29 19:42:30 +00:00
Mikhail Pyltsin
c6e9c60193 IJ-CR-123098 [java-console] IDEA-331307 Provide navigation for logs for jvm languages
- resolve only on links
- reuse `codePointAt`

GitOrigin-RevId: 207034ef37fe94d4cbb6bbe5e3f68c7ce8c0cbdd
2024-01-29 19:41:43 +00:00
Mikhail Pyltsin
9408f6ef14 [java-inspections] IDEA-343899 Similar logs inspection
- strict rules for exceptions and additional info

GitOrigin-RevId: 6ca5ca3c64660ed14b3dbc8d9a48ca4c588615a0
2024-01-24 12:12:57 +00:00
Mikhail Pyltsin
23f1773740 [uast-inspection] IDEA-343298 LoggingSimilarMessageInspection should skip empty messages
- skip messages without certain beginnings and ends

GitOrigin-RevId: eb9ef8be4c8629712a0915a539fc7e9dac4c1238
2024-01-17 22:12:41 +00:00
Mikhail Pyltsin
dcc38e5eb7 [uast-inspection] IDEA-331308 Create inspection highlighting non-distinguishable logging sites in a single class
- skip error log levels with stacktrace

GitOrigin-RevId: 5662e1f1a5e43fdb371d6597693c0ab875040204
2024-01-17 13:46:03 +00:00
Mikhail Pyltsin
1f6272bff4 [java-inspections] IJ-CR-123360 IDEA-331308 Similar logs inspection
- extract some methods

GitOrigin-RevId: b73b6dc6ec6e3424ec31b7f869e47daa9cba429a
2024-01-12 20:45:59 +00:00
Mikhail Pyltsin
a552cad2f3 [java-console] IJ-CR-123098 IDEA-331307 Provide navigation for logs for jvm languages
- support for shortened logs

GitOrigin-RevId: ac81a1f2297b4706b0d018da47d23a855f4e5bb1
2024-01-10 13:49:54 +00:00
Mikhail Pyltsin
6959a361c2 [java-inspections] IJ-CR-123360 IDEA-331308 Similar logs inspection
- added several tests
- fixes after code review
- IDEA log supports

GitOrigin-RevId: de60fa8083b8883c98ba73b0c9741e51dbcb491a
2024-01-10 13:49:46 +00:00
Mikhail Pyltsin
cb7187787c [uast-inspections] IDEA-134025 Quickfix for "Log condition does not match logging call"
GitOrigin-RevId: 9bf9f012525aab45167daf84dd13ebd0a8c135fa
2024-01-08 20:13:25 +00:00
Mikhail Pyltsin
8efd59f2ec [java-inspections] IDEA-331308 Similar logs inspection
GitOrigin-RevId: 33b43026b651dfee14eaa91e978c0c0c2b793ba2
2024-01-08 11:12:08 +00:00
Bart van Helvert
3a5d36c5f7 [jvm] Add test case for Java API usage inspection
Adds another test case for when a method has a certain since version but its super method has a lower since version.

GitOrigin-RevId: 5962a0f2d4549b6729fe7c303798bc04b575e5c5
2024-01-05 20:01:46 +00:00
Mikhail Pyltsin
384af015b4 [java-console] IDEA-331307 Provide navigation for logs for jvm languages
GitOrigin-RevId: c827937afc1da8cdfe1cc7c1297093df284ecdc8
2024-01-03 12:11:30 +00:00
Bart van Helvert
e43e1dd876 [jvm] Clean up SuppressionAnnotationInspection
Improves inspection message and code structure. #IDEA-337709

GitOrigin-RevId: cc1fd2482724ea235a301b770abbcc02d1fcf6cc
2023-12-14 14:04:06 +00:00
Bart van Helvert
316a5db6c8 [jvm] Remove unnecessary extension point for annotation suppressions
The extension point was used to run logic for various suppression annotations. Instead of running different logic based on the language, we can run the same logic for all languages. #IDEA-337709

GitOrigin-RevId: 7c51e3774d8d0c5232d37b817d1086ba4ebdda57
2023-12-14 14:04:06 +00:00
Bart van Helvert
58298dd53c [jvm] Move JUnit inspections into JUnit plugin
#IDEA-334017 Fixed

GitOrigin-RevId: 919fb236aeb44c192944eae2bae8da621e5a0e74
2023-12-13 03:15:25 +00:00