protoc-lint

scaladoc protobuf linter for https://github.com/thesamet/sbt-protoc

https://developers.google.com/protocol-buffers/docs/style

sbt settings

project/plugins.sbt

libraryDependencies += "io.github.scalapb-json" %% "protoc-lint" % "0.7.0"
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.7")

or

// shaded version. you can avoid dependency conflict. only sbt Scala 2.12, sbt 1.x
libraryDependencies += "io.github.scalapb-json" %% "protoc-lint-shaded" % "0.7.0"
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.7")

build.sbt

Compile / PB.targets ++= Seq[protocbridge.Target](
  protoc_lint.ProtocLint() -> (Compile / sourceManaged).value,
  // and add another generator settings (e.g. java, scalapb)
  // see https://github.com/thesamet/sbt-protoc
)

exclude error example

Compile / PB.targets ++= Seq[protocbridge.Target](
  protoc_lint.ProtocLint({
    case _: protoc_lint.LintError.MessageNameCamel => true
    case _ => false
  }) -> (Compile / sourceManaged).value
)