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
I have some classes containing variables with SQL queries and I want to disable the MaxLineLength check for them, I added the annotation at file level but detekt seems to ignore it.
Example class to use to reproduce the issue
@Suppress("MaxLineLength")
classMaxLineLengthSuppress {
funtest() {
val query ="select field1,field2,field3,field4,field5 from a_long_table_name where a_very_very_long_column_name=2 and another_column=5"
}
}
Hey, you're right, it does now work on CLASS level not file level :)
Please try @file:Suppress("MaxLineLength").
It's correct behaviour because the check does not work on KtElement's but on lines. We can't suppress it on class level (annotation over class) :)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics.
lockbot
locked as resolved and limited conversation to collaborators
Jun 20, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have some classes containing variables with SQL queries and I want to disable the
MaxLineLength
check for them, I added the annotation at file level but detekt seems to ignore it.Example class to use to reproduce the issue
detekt version used: commit # f7b1dd9
The text was updated successfully, but these errors were encountered: