Change NO_EXPLICIT_VISIBILITY_IN_API_MODE diagnostic range to 'declaration modifiers + name'.

Motivation: missing visibility modifier is an error in visibility modifiers list, so we should highlight this list.
Including a name in the range is convenient for using alt+enter (you don't have to move cursor from name to fun/class/val keyword)

 Also change NO_EXPLICIT_RETURN_TYPE_IN_API_MODE diagnostic range to 'declaration name' to match corresponding IDE inspection.

Fix stylistic problems and typos after review
This commit is contained in:
Leonid Startsev
2019-10-30 16:43:45 +03:00
parent 24688f3503
commit 3b100e57f2
24 changed files with 103 additions and 301 deletions
@@ -1,9 +1,11 @@
interface <!NO_EXPLICIT_VISIBILITY_IN_API_MODE!>I1<!> {
<!NO_EXPLICIT_VISIBILITY_IN_API_MODE!>fun i()<!>
// SKIP_TXT
<!NO_EXPLICIT_VISIBILITY_IN_API_MODE!>interface I1<!> {
<!NO_EXPLICIT_VISIBILITY_IN_API_MODE!>fun i<!>()
}
public interface I2 {
<!NO_EXPLICIT_VISIBILITY_IN_API_MODE!>fun i()<!>
<!NO_EXPLICIT_VISIBILITY_IN_API_MODE!>fun i<!>()
}
public interface I3 {
@@ -23,8 +25,8 @@ public class Impl: I3 {
}
public class Impl2: I4 {
<!NO_EXPLICIT_RETURN_TYPE_IN_API_MODE!>override fun i()<!> = 10
<!NO_EXPLICIT_RETURN_TYPE_IN_API_MODE!>override val v<!> = 10
override fun <!NO_EXPLICIT_RETURN_TYPE_IN_API_MODE!>i<!>() = 10
override val <!NO_EXPLICIT_RETURN_TYPE_IN_API_MODE!>v<!> = 10
}
private class PrivateImpl: I4 {