Skip to content

Instantly share code, notes, and snippets.

@ataulm
Last active July 17, 2020 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ataulm/1c3a2d97a4bd46139271dde6bbd7b712 to your computer and use it in GitHub Desktop.
Save ataulm/1c3a2d97a4bd46139271dde6bbd7b712 to your computer and use it in GitHub Desktop.
internal fun createErrorThemesAndStylesIssue(detectorClass: KClass<out Detector>, scope: EnumSet<Scope>): Issue {
return createThemesAndStylesIssue(detectorClass, Severity.ERROR, scope)
}
internal fun createWarningThemesAndStylesIssue(detectorClass: KClass<out Detector>, scope: EnumSet<Scope>): Issue {
return createThemesAndStylesIssue(detectorClass, Severity.WARNING, scope)
}
private fun createThemesAndStylesIssue(
detectorClass: KClass<out Detector>,
severity: Severity,
scope: EnumSet<Scope>
) = Issue.create(
id = detectorClass.simpleName!!,
briefDescription = "${detectorClass.simpleName}",
explanation = "Check ${detectorClass.simpleName} in the Monzo project for details.",
category = Category.create("Themes and styles", 75),
severity = severity,
implementation = Implementation(detectorClass.java, scope)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment