mirror of https://github.com/sbt/sbt.git
Fix issues with Codacy
This commit is contained in:
parent
a8d644eb45
commit
69411c1876
|
|
@ -18,7 +18,7 @@ object JavaErrorParserSpec extends Specification {
|
|||
be able to parse javac errors $parseSampleJavac
|
||||
"""
|
||||
|
||||
def parseSampleLinux = {
|
||||
def parseSampleLinux: MatchResult[_] = {
|
||||
val parser = new JavaErrorParser()
|
||||
val logger = Logger.Null
|
||||
val problems = parser.parseProblems(sampleLinuxMessage, logger)
|
||||
|
|
@ -27,7 +27,7 @@ object JavaErrorParserSpec extends Specification {
|
|||
rightSize and rightFile
|
||||
}
|
||||
|
||||
def parseSampleWindows = {
|
||||
def parseSampleWindows: MatchResult[_] = {
|
||||
val parser = new JavaErrorParser()
|
||||
val logger = Logger.Null
|
||||
val problems = parser.parseProblems(sampleWindowsMessage, logger)
|
||||
|
|
@ -46,7 +46,7 @@ object JavaErrorParserSpec extends Specification {
|
|||
}
|
||||
}
|
||||
|
||||
def parseSampleJavac = {
|
||||
def parseSampleJavac: MatchResult[_] = {
|
||||
val parser = new JavaErrorParser()
|
||||
val logger = Logger.Null
|
||||
val problems = parser.parseProblems(sampleJavacMessage, logger)
|
||||
|
|
@ -55,7 +55,7 @@ object JavaErrorParserSpec extends Specification {
|
|||
rightSize and rightError
|
||||
}
|
||||
|
||||
def sampleLinuxMessage =
|
||||
def sampleLinuxMessage: String =
|
||||
"""
|
||||
|/home/me/projects/sample/src/main/Test.java:4: cannot find symbol
|
||||
|symbol : method baz()
|
||||
|
|
@ -63,7 +63,7 @@ object JavaErrorParserSpec extends Specification {
|
|||
|return baz();
|
||||
""".stripMargin
|
||||
|
||||
def sampleWindowsMessage =
|
||||
def sampleWindowsMessage: String =
|
||||
s"""
|
||||
|$windowsFile:4: cannot find symbol
|
||||
|symbol : method baz()
|
||||
|
|
@ -71,8 +71,8 @@ object JavaErrorParserSpec extends Specification {
|
|||
|return baz();
|
||||
""".stripMargin
|
||||
|
||||
def windowsFile = """C:\Projects\sample\src\main\java\Test.java"""
|
||||
def windowsFileAndLine = s"""$windowsFile:4"""
|
||||
def windowsFile: String = """C:\Projects\sample\src\main\java\Test.java"""
|
||||
def windowsFileAndLine: String = s"""$windowsFile:4"""
|
||||
|
||||
def sampleJavacMessage = "javac: invalid flag: -foobar"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue