Suppress ktlint:standard:comment-wrapping warning
standard:comment-wrapping does not allow annotating function argument
literals inline (since block comments must not be surrounded by code).
So the following annotations are not allowed in ktlint:
foo(1 /* bar */)
Unfortunately, there are not good alternatives. Named arguments can only
be used to call Kotlin functions and are not a general solution.
Instead, disable this linter rule for the entire file.
This also adds a suppress annotation further down in the file, since
ktlint does not like the extra space required to make the comments line
up horizontally...
Test: repo upload --dry-run
Change-Id: I62fdb0347965ee3fc43783eb07af47e95af882a5
diff --git a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt b/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
index 905655c..159af00 100644
--- a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
+++ b/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
@@ -13,6 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+// ktlint does not allow annotating function argument literals inline. Disable the specific rule
+// since this negatively affects readability.
+@file:Suppress("ktlint:standard:comment-wrapping")
+
package android.net.cts
import android.Manifest.permission.WRITE_DEVICE_CONFIG
@@ -63,6 +67,7 @@
companion object {
@BeforeClass
@JvmStatic
+ @Suppress("ktlint:standard:no-multi-spaces")
fun setupOnce() {
// TODO: check that there is no active wifi network. Otherwise, ApfFilter has already been
// created.