You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When placing a comment after the last annotation, I get the error
Multiple annotations should not be placed on the same line as the annotated construct
Steps to Reproduce
Create the following class
import org.junit.Ignore
import org.junit.Test
import org.junit.Assert.fail
class SomeTest {
@Test
@Ignore // foobar
fun testThisShouldBeIgnored() {
fail("This should not have ran")
}
}
Run ktLint, it will give the message Multiple annotations should not be placed on the same line as the annotated construct. When you remove // foobar or place it on its own line, no error is shown.
Your Environment
Version of ktlint used: 0.36.0
Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): org.jlleitschuh.gradle.ktlint, version 9.2.1
Version of Gradle used (if applicable): Gradle 6.2.1
Operating System and version:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
$ uname -r
5.4.0-29-generic
Link to your project (if it's a public repository): private code
The text was updated successfully, but these errors were encountered:
Expected Behavior
No lint-error should be given
Observed Behavior
When placing a comment after the last annotation, I get the error
Steps to Reproduce
Create the following class
Run ktLint, it will give the message
Multiple annotations should not be placed on the same line as the annotated construct
. When you remove// foobar
or place it on its own line, no error is shown.Your Environment
0.36.0
org.jlleitschuh.gradle.ktlint
, version9.2.1
Gradle 6.2.1
The text was updated successfully, but these errors were encountered: