Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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