Skip to content

Commit

Permalink
review note
Browse files Browse the repository at this point in the history
  • Loading branch information
nulls committed Aug 22, 2022
1 parent 1430ec3 commit b611e29
Showing 1 changed file with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,19 @@ data class FixAndWarnPluginConfig(
}
}

override fun validateAndSetDefaults(): PluginConfig = FixAndWarnPluginConfig(
fix.validateAndSetDefaults(),
warn.validateAndSetDefaults()
).also {
it.configLocation = this.configLocation
override fun validateAndSetDefaults(): PluginConfig {
require(warn.resourceNamePattern.matches(fix.resourceNameTest)) {
"""
Pattern of [fix] files should match [warn] resource files.
But found [fix]: {${fix.resourceNameTest},
[warn]: {${warn.resourceNamePatternStr}
"""
}
return FixAndWarnPluginConfig(
fix.validateAndSetDefaults(),
warn.validateAndSetDefaults()
).also {
it.configLocation = this.configLocation
}
}
}

0 comments on commit b611e29

Please sign in to comment.