Update verifyCodeStyle and applyCodeStyle to be what we really require (#30777)
Previously it included a coarse grained Java reformat which it seems was never quite worked through (reformatting generated sources etc), so go back on that, and make sure verifyCodeStyle is exactly what we require for PR validation to pass (and that it does not diverge)
This commit is contained in:
parent
93a748b952
commit
b859d9fc48
2 changed files with 3 additions and 16 deletions
17
build.sbt
17
build.sbt
|
|
@ -12,21 +12,8 @@ enablePlugins(
|
|||
JavaFormatterPlugin)
|
||||
disablePlugins(MimaPlugin)
|
||||
|
||||
// check format and headers
|
||||
TaskKey[Unit]("verifyCodeFmt") := {
|
||||
javafmtCheckAll.all(ScopeFilter(inAnyProject)).result.value.toEither.left.foreach { _ =>
|
||||
throw new MessageOnlyException(
|
||||
"Unformatted Java code found. Please run 'javafmtAll' (or use the 'applyCodeStyle' alias) and commit the reformatted code")
|
||||
}
|
||||
|
||||
scalafmtCheckAll.all(ScopeFilter(inAnyProject)).result.value.toEither.left.foreach { _ =>
|
||||
throw new MessageOnlyException(
|
||||
"Unformatted Scala code found. Please run 'scalafmtAll' (or use the 'applyCodeStyle' alias) and commit the reformatted code")
|
||||
}
|
||||
}
|
||||
|
||||
addCommandAlias("verifyCodeStyle", "headerCheckAll; verifyCodeFmt")
|
||||
addCommandAlias("applyCodeStyle", "headerCreateAll; javafmtAll; scalafmtAll")
|
||||
addCommandAlias("verifyCodeStyle", "scalafmtCheckAll; scalafmtSbtCheck; headerCheckAll")
|
||||
addCommandAlias("applyCodeStyle", "headerCreateAll; scalafmtAll; scalafmtSbtAll")
|
||||
|
||||
addCommandAlias(
|
||||
name = "fixall",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue