net.twisterrob.gradle.quality.report.html.model.ViolationViewModel.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of twister-quality Show documentation
Show all versions of twister-quality Show documentation
All quality plugins bundled in one.
The newest version!
package net.twisterrob.gradle.quality.report.html.model
import net.twisterrob.gradle.quality.Violation
@Suppress("detekt.UseDataClass") // ViewModel pattern, no need for data class methods.
class ViolationViewModel(
val location: LocationViewModel,
val source: SourceViewModel,
val details: DetailsViewModel,
val specifics: Map
) {
companion object {
fun create(violation: Violation): ViolationViewModel =
ViolationViewModel(
location = LocationViewModel(violation),
source = SourceViewModel(violation),
details = DetailsViewModel(violation),
specifics = violation.specifics
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy