Skip to content

Commit

Permalink
Merge pull request #1816 from scala-steward/update/sbt-wartremover-3.1.4
Browse files Browse the repository at this point in the history
Update sbt-wartremover to 3.1.4
  • Loading branch information
blast-hardcheese authored Oct 8, 2023
2 parents 29646f6 + 3e186a2 commit 297892b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class DropwizardServerGenerator private (implicit Cl: CollectionsLibTerms[JavaLa

implicit def MonadF: Monad[Target] = Target.targetInstances

@SuppressWarnings(Array("org.wartremover.warts.TripleQuestionMark"))
private def toJaxRsAnnotationName: ContentType => Expression = {
case _: ApplicationJson => new FieldAccessExpr(new NameExpr("MediaType"), "APPLICATION_JSON")
case _: UrlencodedFormData => new FieldAccessExpr(new NameExpr("MediaType"), "APPLICATION_FORM_URLENCODED")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class SpringMvcServerGenerator private (implicit Cl: CollectionsLibTerms[JavaLan

override implicit def MonadF: Monad[Target] = Target.targetInstances

@SuppressWarnings(Array("org.wartremover.warts.TripleQuestionMark"))
private def toSpringMediaType: ContentType => Expression = {
case _: ApplicationJson => new FieldAccessExpr(new NameExpr("MediaType"), "APPLICATION_JSON_VALUE")
case _: UrlencodedFormData => new FieldAccessExpr(new NameExpr("MediaType"), "APPLICATION_FORM_URLENCODED_VALUE")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class DropwizardServerGenerator private extends ServerTerms[ScalaLanguage, Targe
Set("Boolean", "Byte", "Char", "Short", "Int", "Long", "BigInt", "Float", "Double", "BigDecimal", "String", "OffsetDateTime", "LocalDateTime")
private val CONTAINER_TYPES = Seq("Vector", "List", "Seq", "IndexedSeq", "Iterable", "Map")

@SuppressWarnings(Array("org.wartremover.warts.TripleQuestionMark"))
private def toJaxRsAnnotationName: ContentType => Term = {
case _: ApplicationJson => q"MediaType.APPLICATION_JSON"
case _: UrlencodedFormData => q"MediaType.APPLICATION_FORM_URLENCODED"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package object syntax {

implicit class RichLanguageParameter(value: LanguageParameter.type) {
import _root_.scala.meta._
@SuppressWarnings(Array("org.wartremover.warts.TripleQuestionMark"))
def fromParam(param: Term.Param, rawType: Option[String] = Some("string"), rawFormat: Option[String] = None): LanguageParameter[ScalaLanguage] =
param match {
case param @ Term.Param(_, name, decltype, _) =>
Expand Down
2 changes: 1 addition & 1 deletion project/wartremover.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.0.6")
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.1.4")

0 comments on commit 297892b

Please sign in to comment.