Skip to content

Instantly share code, notes, and snippets.

@guilhermekrz
Last active June 6, 2020 11:01
Show Gist options
  • Save guilhermekrz/ad250fd718f5d5d52db4022d3f40d799 to your computer and use it in GitHub Desktop.
Save guilhermekrz/ad250fd718f5d5d52db4022d3f40d799 to your computer and use it in GitHub Desktop.
override fun getDetector(): Detector = TooManyParametersDetector()
override fun getIssues(): MutableList<Issue> = mutableListOf(TooManyParametersDetector.ISSUE)
@Test
fun `java method with 0 parameters`() {
val javaFile = java(
"""
package com.brokoli.lint;
class MyClass {
public void methodWith0Parameters() {
}
}
"""
).indented()
val lintResult = lint()
.files(javaFile)
.run()
lintResult.expectClean()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment