Commit Graph

60689 Commits

Author SHA1 Message Date
Dmitry Gridin 6c166e744a Implement TrailingCommaInspection
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin 8d37b86e82 KotlinStyleGuideCodeStyle: enable trailing comma by default
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin 481900b258 TrailingCommaPostFormatProcessor: introduce TrailingCommaVisitor
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin b9ed0706fa FormatterUtil: rename parameters in needTrailingComma functions
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin e3cbc56974 TrailingCommaPostFormatProcessor: extract API for inspections
#KT-34744
2020-01-17 21:02:55 +07:00
Dmitry Gridin 20836f5788 TrailingCommaPostFormatProcessor: allow everything except adding before 1.4
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin c5c035b67c TrailingCommaPostFormatProcessor: fix comments position before comma
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin 5a922e5cff KotlinCommonBlock: refactoring
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin d06787886a Fix tests after implementing trailing comma in formatter
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin d98794479d kotlinSpacingRules: fix cases with EOL comments and comma
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin 8142ad3f4d FormatterUtil: fix getLineCount
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin b1fc3963d2 AbstractFormatterTest: enable trailing comma by default
#KT-34744
2020-01-17 21:02:54 +07:00
Dmitry Gridin 9109f29c88 AbstractFormatterTest: cleanup code 2020-01-17 21:02:54 +07:00
Dmitry Gridin c27bf051d5 TrailingCommaPostFormatProcessor: add language feature check
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin 9511348497 TrailingCommaPostFormatProcessor: should be completed in one round
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin 8a45d2eb58 Formatter: add line break between comma and semicolon
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin bbd92a11bc TrailingCommaPostFormatProcessor: add case for empty comma owner
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin b72da6c4fc Formatter: support trailing comma in destruction declarations
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin 96a11707ca Formatter: support trailing comma in lambda value parameters & fix comments in KtParameter
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin d013fc2234 Formatter: support trailing comma in when entry
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin 4adfaab3ec Formatter: support trailing comma in lambda parameters
#KT-34744
2020-01-17 21:02:53 +07:00
Dmitry Gridin 07bda5a759 Formatter: support trailing comma in collection literal expression
#KT-34744
2020-01-17 21:02:52 +07:00
Dmitry Gridin bf92517500 KtVisitorVoid: add missing visitCollectionLiteralExpression 2020-01-17 21:02:52 +07:00
Dmitry Gridin ccd780c008 Formatter: support trailing comma in type arguments
#KT-34744
2020-01-17 21:02:52 +07:00
Dmitry Gridin b99c7f8d14 Formatter: support trailing comma in type parameters
#KT-34744
2020-01-17 21:02:52 +07:00
Dmitry Gridin 58058eef21 Formatter: support trailing comma in indexing suffix
#KT-34744
2020-01-17 21:02:52 +07:00
Dmitry Gridin c195cd46f2 Formatter: support trailing comma in value arguments
#KT-34744
2020-01-17 21:02:52 +07:00
Dmitry Gridin 13ae4a28a8 Formatter: support trailing comma in value parameters
#KT-34744
2020-01-17 21:02:52 +07:00
Alexander Udalov 463728a96a Fix compiler test on Throws+delegation for 1.4
No exceptions are generated for delegation in 1.4 (see KT-35834).
2020-01-17 12:47:20 +01:00
Alexander Udalov de683c0768 JVM IR: mute more tests after advancing language to 1.4 2020-01-17 12:47:20 +01:00
Dmitry Petrov 135cd6fd77 Enable ProperIeee754Comparisons in KOTLIN_1_4 2020-01-17 14:15:32 +03:00
Dmitry Petrov 933ac3a16b Fix nullable number comparisons in JS 2020-01-17 14:14:59 +03:00
Dmitry Petrov f8341ad7eb JVM: Update tests for IEEE 754 comparisons 2020-01-17 14:14:59 +03:00
Dmitry Petrov d5ff1047a5 JVM: Fix IEEE 754 comparison generation for boxed numbers 2020-01-17 14:14:58 +03:00
Alexander Udalov 26f435eb90 JVM IR: mute tests which fail after advancing language to 1.4 2020-01-17 12:07:30 +01:00
Alexander Udalov e7864c7351 Fix inlineCallsStaticMethodFromOtherPackage.kt by disabling related language feature
This test is not possible for 1.4, where protected calls from public
inline functions are prohibited.
2020-01-17 12:07:30 +01:00
Sergey Rostov 6ac21856cc NodeJsRootExtension, YarnRootExtension: introduce configuration phase
Some properties were calculated based on yarn and nodeJs version. So,
when version is changed properties were not updated. This change moves
calculation to the end of configuration phase and adds assertion to
ensure that version and other poperties are not changed
after configuration was done.
2020-01-17 13:44:57 +03:00
nataliya.valtman 9c08ea3bf1 Gradle: introduce CleanabeStore 2020-01-17 13:44:56 +03:00
Vladimir Dolzhenko c0c929c449 ProgressIndicatorUtils.kt for 191 is added
Relates to #KT-33939
2020-01-17 11:39:44 +01:00
Roman Golyshev 4b50fb18fb KT-35258 Add better completion for MixedNamedArgumentsInTheirOwnPosition feature
- When named parameter is on its own position, the completion of the next argument will not be limited by named arguments only
- The completion will not suggest already used arguments names
- ^KT-35258 Fixed
2020-01-17 12:06:08 +03:00
Roman Golyshev bd713db70e KT-35258 Refactor mapArgumentsToParameters
- We assume that, if method has no stable parameters names, `parametersByName` should be empty
2020-01-17 12:01:44 +03:00
pyos 82ddd700ce JVM_IR: patch parents of defaults in MemoizedInlineClassReplacements
A minor fix for #2909
2020-01-17 11:03:04 +03:00
Dmitriy Novozhilov da4807e6b8 Disable AllowNullableArrayArgsInMain in corresponding run configuration tests 2020-01-17 10:48:20 +03:00
Dmitriy Novozhilov 76b3964e96 Update testdata according to change compiler version to 1.4 2020-01-17 10:33:50 +03:00
Nikolay Krasko 5bfb92661e More version updates 2020-01-17 10:33:50 +03:00
Nikolay Krasko 7fa8c982b4 Advance version to 1.4 in libraries 2020-01-17 10:33:50 +03:00
Nikolay Krasko ca49672a7a Advance version to 1.4 2020-01-17 10:33:50 +03:00
Ilya Matveev 55e97fee09 Gradle, native: Don't use an arg file when compiler daemon is enabled
We pass compiler flags using an arg file if the compiler is executed
in a separate process because Windows limits maximal command line
length (see https://github.com/JetBrains/kotlin-native/issues/1999).

But for the compiler daemon we pass the args directly to the compiler
entry point method. So we can abandon using an arg file here.
2020-01-17 12:44:37 +07:00
Ilya Matveev 8158d34bda Gradle, native: Escape spaces in K/N compiler args
We use an argument file to pass arguments to the K/N compiler.
Earlier each line of such a file was treated by the compiler
as a separate argument. But this logic was updated some time
ago and now content for this file is treated as a space separated
list of arguments.

This patch takes this into account at the Gradle side and quotes
arguments written to the arg file.

Issue #KT-35934 Fixed
2020-01-17 12:44:37 +07:00
Vladimir Ilmov a2a3ca0558 Flaky ConcurrentModificationException in NewMultiplatformProjectImportingTest.testFileCollectionDependency fixed 2020-01-16 22:09:21 +01:00