File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
src/main/scala/org/scalastyle Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ class CheckerUtils(classLoader: Option[ClassLoader] = None) {
146
146
def readFile (file : String , encoding : Option [String ])(implicit codec : Codec ): String = {
147
147
@ tailrec
148
148
def readFileWithEncoding (file : String , encodings : List [String ]): Option [String ] = {
149
- if (encodings.size == 0 ) {
149
+ if (encodings.isEmpty ) {
150
150
None
151
151
} else {
152
152
val encoding = encodings(0 )
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ object Main {
80
80
}
81
81
}
82
82
83
- if (! config.config.isDefined || config.directories.size == 0 ) {
83
+ if (! config.config.isDefined || config.directories.isEmpty ) {
84
84
config = config.copy(error = true )
85
85
}
86
86
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ object ScalastyleConfiguration {
96
96
97
97
private def contentsOf (node : Node , n : String ) = {
98
98
val ns = (node \\ n)
99
- if (ns.size == 0 ) None else (Some (ns(0 ).text))
99
+ if (ns.isEmpty ) None else (Some (ns(0 ).text))
100
100
}
101
101
102
102
def toCheck (node : Node ): ConfigurationChecker = {
You can’t perform that action at this time.
0 commit comments