Skip to content

Commit

Permalink
Ajoute les règles scalafix de cats (#881)
Browse files Browse the repository at this point in the history
Ajoute les règles scalafix de cats (#881)
  • Loading branch information
niladic authored Dec 2, 2020
1 parent 331f6f7 commit 54f0697
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions .scalafix.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
rules = [
DisableSyntax
"github:typelevel/cats/Cats_v2_2_0"
]
DisableSyntax.noUniversalEquality = true
DisableSyntax.noUniversalEqualityMessage = "use === instead of == and =!= instead of !="
3 changes: 1 addition & 2 deletions app/helper/StringHelper.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package helper

import cats.syntax.all._
import java.text.Normalizer

import cats.implicits.catsSyntaxOptionId
import org.apache.commons.lang3.StringUtils

object StringHelper {
Expand Down
2 changes: 1 addition & 1 deletion app/serializers/UserAndGroupCsvSerializer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package serializers
import java.time.ZonedDateTime
import java.util.UUID

import cats.implicits.catsSyntaxOptionId
import cats.syntax.all._
import com.github.tototoshi.csv.{CSVReader, DefaultCSVFormat}
import models.formModels.{UserFormData, UserGroupFormData}
import helper.{PlayFormHelper, UUIDHelper}
Expand Down
3 changes: 1 addition & 2 deletions app/views/emails/common.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package views.emails

import cats.syntax.all._
import constants.Constants
import helper.Time
import java.time.ZonedDateTime

import cats.implicits.catsSyntaxOptionId
import models._
import scalatags.Text.all._

Expand Down
8 changes: 7 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ lazy val root = (project in file("."))
buildInfoPackage := "constants"
)

scalaVersion := "2.13.3"
inThisBuild(
List(
scalaVersion := "2.13.3",
semanticdbEnabled := true, // enable SemanticDB
semanticdbVersion := scalafixSemanticdb.revision // use Scalafix compatible version
)
)

// https://docs.scala-lang.org/overviews/compiler-options/index.html
scalacOptions ++= Seq(
Expand Down
3 changes: 1 addition & 2 deletions test/browser/AnswerSpec.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package browser

import cats.syntax.all._
import helper.{Time, UUIDHelper}
import java.util.UUID

import cats.implicits.catsSyntaxOptionId
import models.{Application, Area, LoginToken, User, UserGroup}
import org.junit.runner._
import org.specs2.mutable._
Expand Down
2 changes: 1 addition & 1 deletion test/browser/ApplicationAccessSpec.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package browser

import cats.implicits.catsSyntaxOptionId
import cats.syntax.all._
import helper.{Time, UUIDHelper}
import models.{Application, Area, LoginToken, User, UserGroup}
import org.junit.runner._
Expand Down
2 changes: 1 addition & 1 deletion test/browser/ApplicationSpec.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package browser

import cats.implicits.catsSyntaxOptionId
import cats.syntax.all._
import helper.{Time, UUIDHelper}
import models.{Area, LoginToken, User, UserGroup}
import org.junit.runner._
Expand Down
3 changes: 1 addition & 2 deletions test/browser/LoginSpec.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package browser

import cats.syntax.all._
import helper.{Hash, Time, UUIDHelper}
import java.time.ZonedDateTime

import cats.implicits.catsSyntaxOptionId
import models.{Area, LoginToken, User}
import org.specs2.mutable._
import org.specs2.runner._
Expand Down

0 comments on commit 54f0697

Please sign in to comment.