Skip to content

Commit

Permalink
#21 Make baseConfig optional
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed May 7, 2017
1 parent d5fd06a commit 5653c19
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/services/ExternalAnalyzerSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ class ExternalAnalyzerSrv(
command (__ \ "command").read[String]
absoluteCommand = analyzerPath.resolve(Paths.get(command.replaceAll("[\\/]", File.separator)))
config (__ \ "config").read[JsObject]
baseConfigKey (__ \ "baseConfig").read[String]
baseConfig = (analyzerConfig \ baseConfigKey).asOpt[JsObject].getOrElse(JsObject(Nil))
baseConfigKey (__ \ "baseConfig").readNullable[String]
baseConfig = baseConfigKey
.flatMap(bc (analyzerConfig \ bc).asOpt[JsObject])
.getOrElse(Json.obj())
} yield ExternalAnalyzer(
name,
version,
Expand Down

0 comments on commit 5653c19

Please sign in to comment.