mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-03-24 18:12:25 +01:00
Initial commit
This commit is contained in:
21
app/controllers/warnings.scala
Normal file
21
app/controllers/warnings.scala
Normal file
@@ -0,0 +1,21 @@
|
||||
package controllers
|
||||
|
||||
import controllers.WarningSeverity.WarningSeverity
|
||||
import play.twirl.api.Html
|
||||
|
||||
object WarningSeverity extends Enumeration {
|
||||
type WarningSeverity = Value
|
||||
// Order is important
|
||||
val Info = Value("info")
|
||||
val Warning = Value("warning")
|
||||
val Error = Value("error")
|
||||
}
|
||||
|
||||
sealed abstract class Warning {
|
||||
def html: Html
|
||||
def id: String
|
||||
def allowSnoozes = true
|
||||
def severity: WarningSeverity
|
||||
}
|
||||
|
||||
final case class IdentifiedWarning(id: String, html: Html, severity: WarningSeverity) extends Warning
|
||||
Reference in New Issue
Block a user