Repository: pinterest/ktlint
Issue: Invalid annotation failure for @receiver target annotation with parameter

## Expected Behavior
<!---Tell us what should happen -->
<!-- If possible provide a link to official code style guide -->
`@receiver` annotations with parameters should not be required to be on a different line.

## Observed Behavior
<!---Tell us what happens instead of the expected behavior -->
When annotating with `@receiver:SomeAnnotation(SomeParameter)`, the [`AnnotationRule`](https://github.com/pinterest/ktlint/blob/4dda69b71fbbde261711b5424bf4846977648bac/ktlint-ruleset-experimental/src/main/kotlin/com/pinterest/ktlint/ruleset/experimental/AnnotationRule.kt) fails with the following:
> Annotations with parameters should all be placed on separate lines prior to the annotated construct

## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->

Drop this in a Kotlin file and run ktlint on it:
```kotlin
interface AnnotationExample {
  fun @receiver:ExampleAnnotation("Breaks Ktlint") ExampleClass.provideExample(): ExampleInterface
}

interface ExampleInterface
class ExampleClass : ExampleInterface

annotation class ExampleAnnotation(val arg: String)
```

You can successfully meet the criteria with the following:

```kotlin
  fun @receiver:ExampleAnnotation("Breaks Ktlint")
  ExampleClass.provideExample(): ExampleInterface
```
However this is quite unexpected as a reader, and feels inconsistent when parameter-free annotations work just fine:

```kotlin
fun @receiver:ExampleAnnotation ExampleClass.provideExample(): ExampleInterface
```

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
```
./gradlew ktlint --version

------------------------------------------------------------
Gradle 6.6.1
------------------------------------------------------------

Build time:   2020-08-25 16:29:12 UTC
Revision:     f2d1fb54a951d8b11d25748e4711bec8d128d7e3

Kotlin:       1.3.72
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM:          1.8.0_242-release (JetBrains s.r.o 25.242-b3-6222593)
OS:           Mac OS X 10.15.6 x86_64
```



Changed files:
ktlint-ruleset-experimental/src/test/kotlin/com/pinterest/ktlint/ruleset/experimental/AnnotationRuleTest.kt
ktlint-ruleset-experimental/src/main/kotlin/com/pinterest/ktlint/ruleset/experimental/AnnotationRule.kt

diff --git a/ktlint-ruleset-experimental/src/main/kotlin/com/pinterest/ktlint/ruleset/experimental/AnnotationRule.kt b/ktlint-ruleset-experimental/src/main/kotlin/com/pinterest/ktlint/ruleset/experimental/AnnotationRule.kt
index 9032cdb5..e18ec6f1 100644
--- a/ktlint-ruleset-experimental/src/main/kotlin/com/pinterest/ktlint/ruleset/experimental/AnnotationRule.kt
+++ b/ktlint-ruleset-experimental/src/main/kotlin/com/pinterest/ktlint/ruleset/experimental/AnnotationRule.kt
@@ -18,6 +18,7 @@ import org.jetbrains.kotlin.com.intellij.psi.PsiComment
 import org.jetbrains.kotlin.com.intellij.psi.PsiWhiteSpace
 import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.LeafPsiElement
 import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.PsiWhiteSpaceImpl
+import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
 import org.jetbrains.kotlin.psi.KtAnnotationEntry
 import org.jetbrains.kotlin.psi.psiUtil.children
 import org.jetbrains.kotlin.psi.psiUtil.endOffset
@@ -105,7 +106,8 @@ class AnnotationRule : Rule("annotation") {
                 doesNotEndWithAComment(whiteSpaces) &&
                 node.treeParent.elementType != VALUE_PARAMETER && // fun fn(@Ann("blah") a: String)
                 node.treeParent.elementType != VALUE_ARGUMENT && // fn(@Ann("blah") "42")
-                !node.isPartOf(TYPE_ARGUMENT_LIST) // val property: Map<@Ann("blah") String, Int>
+                !node.isPartOf(TYPE_ARGUMENT_LIST) && // val property: Map<@Ann("blah") String, Int>
+                annotations.none { it.useSiteTarget?.getAnnotationUseSiteTarget() == AnnotationUseSiteTarget.RECEIVER }
         if (annotationsWithParametersAreNotOnSeparateLines) {
             emit(
                 annotations.first().node.startOffset,
diff --git a/ktlint-ruleset-experimental/src/test/kotlin/com/pinterest/ktlint/ruleset/experimental/AnnotationRuleTest.kt b/ktlint-ruleset-experimental/src/test/kotlin/com/pinterest/ktlint/ruleset/experimental/AnnotationRuleTest.kt
index 86dad350..3ce5b4ea 100644
--- a/ktlint-ruleset-experimental/src/test/kotlin/com/pinterest/ktlint/ruleset/experimental/AnnotationRuleTest.kt
+++ b/ktlint-ruleset-experimental/src/test/kotlin/com/pinterest/ktlint/ruleset/experimental/AnnotationRuleTest.kt
@@ -935,4 +935,18 @@ class AnnotationRuleTest {
             )
         ).isEmpty()
     }
+
+    @Test
+    fun `lint receiver target annotation with parameter should not be separated line`() {
+        assertThat(
+            AnnotationRule().lint(
+                """
+                annotation class Ann(val arg: Int = 0)
+
+                fun @receiver:Ann(1) String.test() {}
+
+                """.trimIndent()
+            )
+        ).isEmpty()
+    }
 }