Introduce "add parameter names to following arguments"

This commit also refactors relevant intentions & inspections,
like "add name to argument", "add names to call arguments",
"unnamed boolean literal argument"

#KT-30622 Fixed
This commit is contained in:
Mikhail Glukhikh
2019-05-06 15:45:51 +03:00
parent f26a4e06bd
commit 955bfd6e7b
21 changed files with 189 additions and 77 deletions
@@ -1,7 +1,7 @@
// HIGHLIGHT: GENERIC_ERROR_OR_WARNING
// FIX: Add names to boolean arguments
// FIX: Add names to call arguments
fun foo(a: Boolean, b: Boolean, c: Boolean) {}
fun test() {
foo(true, true, true<caret>)
foo(true<caret>, true, true)
}
@@ -1,5 +1,5 @@
// HIGHLIGHT: GENERIC_ERROR_OR_WARNING
// FIX: Add names to boolean arguments
// FIX: Add names to call arguments
fun foo(a: Boolean, b: Boolean, c: Boolean) {}
fun test() {
@@ -1,7 +1,7 @@
// HIGHLIGHT: GENERIC_ERROR_OR_WARNING
// FIX: Add names to boolean arguments
// FIX: Add names to call arguments
fun foo(a: Boolean, b: Boolean, c: Boolean) {}
fun test() {
foo(true, <caret>true, c = true)
foo(<caret>true, true, c = true)
}
@@ -1,5 +1,5 @@
// HIGHLIGHT: GENERIC_ERROR_OR_WARNING
// FIX: Add names to boolean arguments
// FIX: Add names to call arguments
fun foo(a: Boolean, b: Boolean, c: Boolean) {}
fun test() {