@@ -37,7 +37,7 @@ class MessageHelper(config: Config) {
3737 def label (key : String ): String = getMessage(key + " .label" , List ())
3838 def description (key : String ): String = getMessage(key + " .description" , List ())
3939
40- private [this ] def getMessage (key : String , args : List [String ]) = {
40+ private [this ] def getMessage (key : String , args : Seq [String ]) = {
4141 try {
4242 val pattern = config.getString(key)
4343 MessageFormat .format(pattern, args.map(_.asInstanceOf [AnyRef ]): _* )
@@ -47,7 +47,7 @@ class MessageHelper(config: Config) {
4747 }
4848 }
4949
50- def message (key : String , args : List [String ]): String =
50+ def message (key : String , args : Seq [String ]): String =
5151 // Use ClassLoader of the class from which the message came
5252 getMessage(key + " .message" , args)
5353}
@@ -65,7 +65,7 @@ case class StyleError[+T <: FileSpec](
6565 clazz : Class [_ <: Checker [_]],
6666 key : String ,
6767 level : Level ,
68- args : List [String ],
68+ args : Seq [String ],
6969 lineNumber : Option [Int ] = None ,
7070 column : Option [Int ] = None ,
7171 customMessage : Option [String ] = None
@@ -84,15 +84,10 @@ case class StyleException[+T <: FileSpec](
8484) extends Message [T ]
8585
8686sealed abstract class ScalastyleError
87- case class PositionError (position : Int , args : List [String ] = List [ String ]() , errorKey : Option [String ] = None )
87+ case class PositionError (position : Int , args : Seq [String ] = Nil , errorKey : Option [String ] = None )
8888 extends ScalastyleError
89- case class FileError (args : List [String ] = List [String ](), errorKey : Option [String ] = None )
89+ case class FileError (args : Seq [String ] = Nil , errorKey : Option [String ] = None ) extends ScalastyleError
90+ case class LineError (line : Int , args : Seq [String ] = Nil , errorKey : Option [String ] = None )
9091 extends ScalastyleError
91- case class LineError (line : Int , args : List [String ] = List [ String ]() , errorKey : Option [String ] = None )
92+ case class ColumnError (line : Int , column : Int , args : Seq [String ] = Nil , errorKey : Option [String ] = None )
9293 extends ScalastyleError
93- case class ColumnError (
94- line : Int ,
95- column : Int ,
96- args : List [String ] = List [String ](),
97- errorKey : Option [String ] = None
98- ) extends ScalastyleError
0 commit comments