21 Commits
Author SHA1 Message Date
Bart van Helvert 32c3233209 [kotlin] Port PackageDirectoryMismatchInspection to K2
#KTIJ-22914 Fixed

GitOrigin-RevId: 18855f4f0cda8c56682fe56e5a23da81c033634d
2024-03-29 21:00:39 +00:00
Alexander.Danilov 24a31725d9 add some more test data with Java interop for UnusedSymbolInspection
GitOrigin-RevId: 66b71ce5d53c7224867a6892f27e76fa5bb5452d
2023-12-01 18:27:50 +00:00
Roman Golyshev 869a81b48b KTIJ-26808 [kotlin] Enable now passing redundant qualifier inspection test
GitOrigin-RevId: 5d6e1db46c44e539034de10b8548bd100c345eb1
2023-08-31 18:21:11 +02:00
Alexander.Danilov 89d56c36a0 run multifile RemoveRedundantQualifierNameInspection tests in K2
GitOrigin-RevId: 053dc58502bcca408d76b6f73f682f77ebdc2d3e
2023-08-31 13:09:17 +00:00
Anna Kozlova 6e098c4626 [kotlin] k2: unused symbol in the editor for private only
- if private declaration has annotations, it's considered as used to avoid costly implicit usages checks
- even private companion objects are now considered as used
- operators are ignored as well

GitOrigin-RevId: 069d245017438574ddfb73df764d01fa360c688b
2023-07-28 12:59:04 +00:00
Frederik HaselmeierandMichail Zarečenskij 964aee9f61 [Kotlin] Updated bundled JPS version to 1.9.0 and adapted tests to work with new Kotlin language features
KTIJ-26250


Co-authored-by: Michail Zarečenskij <Mikhail.Zarechenskiy@jetbrains.com>


Merge-request: IJ-MR-111173
Merged-by: Frederik Haselmeier <Frederik.Haselmeier@jetbrains.com>

GitOrigin-RevId: 0f9a403c32a2ba8b8a33ccec6bf68cc7d3f67f24
2023-07-19 16:39:35 +00:00
Jaebaek Seo 92e0993831 [kotlin] implement K2 UnusedSymbolInspection
^KTIJ-25539
^KTIJ-23099

GitOrigin-RevId: 437474f05b98a181a013cf468f60055489cd2440
2023-07-19 06:38:54 +00:00
Alexander Danilov f4a23ae24f [kotlin] "Use Property Access Syntax": method is not saved in exclusion list in inspection's settings
Caused by fe8a4740, restored public visibility and added tests

^KTIJ-23647 fixed

GitOrigin-RevId: f670e44aefaef842e8c0667a726be4cc10b6668e
2022-11-21 12:29:24 +00:00
Alexey Belkov fdbc60a768 [kotlin] KotlinBundle: improve some messages
GitOrigin-RevId: f208ce74ca8f30317ea94aa3450fb0f4ee2e4f13
2022-09-20 09:50:43 +00:00
Toshiaki Kameyama a87da4ddc8 Change file's package to match directory: add space after package keyword if needed
^KT-39604 Fixed

Original commit: 1188f4617afbc691a5fb40656012af93aeaa928b

GitOrigin-RevId: 7c6175d68f64d2030525b5818857215f26aff962
2020-11-28 01:03:27 +03:00
Roman Golyshev cec57032db KT-18538 Fix inspection to detect unnecessary grand-base class qualifier
- Add separate option to enable/disable this inspection, as it is not
obvious if it should be always enabled or not
  - This option can be used to detect all unnecessary qualifiers in
  tests
- Add possibility to configure inspections via `settings.xml` in the
`AbstractMultiFileLocalInspectionTest.kt`
- ^KT-18538 Fixed

Original commit: 7fb5acc718f8e53eb2e6b5d9dadd2efb64e7b588

GitOrigin-RevId: 92b6c127d93c469907e62c485b0d8943d5fa7c23
2020-06-03 18:56:01 +03:00
Dmitry Gridin 4e1e5cd596 RemoveRedundantQualifierNameInspection: fix case with non-static java functions
GitOrigin-RevId: bd68d6b01fddf03a6232c830e3bed803f353e012
2019-06-24 11:56:30 +03:00
Dmitry Gridin 1f927eb9b1 PackageDirectoryMismatchInspection: fix visibility in editor
#KT-31816 Fixed

GitOrigin-RevId: ae65e860ca1df76e7478682c11d22751db2a0784
2019-06-21 14:40:31 +03:00
Dmitry Gridin c95ec07579 PackageDirectoryMismatchInspection should report when a package statement is missing
#KT-13549 Fixed

GitOrigin-RevId: 2d8173fd6c1af89094d2adca243f3620ac2dc002
2019-04-24 16:16:54 +03:00
Mikhail Glukhikh 7a85938091 Unused symbol: handle internal constructor used in Java #KT-27708 Fixed
GitOrigin-RevId: 04e2826af078b6455abf157e3029d189ee093770
2018-11-13 10:15:49 +03:00
Mikhail Zarechenskiy a671e0a611 Do not try building light classes for inline classes in dumb mode
Generation of inline classes is quite complicated: we mangle methods,
 add stubs and synthesized methods. So, for simplicity, to avoid
 logic duplication in dummy resolve and in the backend, currently we
 will use only the latter for light classes generation

 #KT-26843 Fixed

GitOrigin-RevId: 341b20f048275a51644c82c8d0354601e391227b
2018-09-17 16:21:04 +03:00
Mikhail Glukhikh c785a954a5 Do not mark kotlin.test.Test annotated declarations as unused
So #KT-20523 Fixed

GitOrigin-RevId: 7d5c8057997339393bb9a4f2996eb782ea020580
2018-06-26 15:36:09 +03:00
Mikhail Glukhikh ccea00231b Sealed sub-class -> object: handle equals, suggest "add equals"
Before this commit, sealed sub-class without state was considered
a style issue.
After this commit, sealed sub-class without state AND custom equals
is considered a probable bug,
because comparison of its instances is very fragile.
Alternative fix (generate equals & hashCode by identity) is added.

GitOrigin-RevId: c8303a815b56cfb1643c9a9c2804ac1b2d5354db
2018-06-19 11:20:26 +03:00
Gabryel Monteiro 6b3c5c67ed Add inspection: Refactor sealed sub-class to object #KT-20305 Fixed
GitOrigin-RevId: 1731d40dff55071784dac521465f3dac0987d9fb
2018-04-11 14:51:00 +03:00
Mikhail Glukhikh 5d009c7cd2 Improve wording for "change package" fix for source root case
GitOrigin-RevId: c02b618bdcde5f652fc1a702bdb251eb11264cff
2017-12-26 18:39:51 +03:00
Mikhail Glukhikh 14b63dacb5 Refactoring: "package matching directory" is now an inspection
GitOrigin-RevId: 829750b9412d6c056b0554779944eade5a06735e
2017-12-26 18:39:50 +03:00