New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MaxChainedCallsOnSameLine: don't count package references as chained calls #5036
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@Test | ||
fun `does not report 2 calls on a single line with a max of 3`() { | ||
val rule = MaxChainedCallsOnSameLine(TestConfig(mapOf("maxChainedCalls" to 3))) | ||
val code = "val a = 0.plus(0)" | ||
|
||
assertThat(rule.compileAndLint(code)).isEmpty() | ||
assertThat(rule.lintWithContext(env, code)).isEmpty() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use compileLintWithContext
in all this cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this also fix import statements? https://github.com/TWiStErRob/net.twisterrob.sun/security/code-scanning/275 |
That was fixed on other pr. |
Fixes #5028