java - Constraints on core libraries in sbt -



java - Constraints on core libraries in sbt -

is there way create constraints on core libraries in sbt?

for example:

i don't want utilize java date class, there way create compilation errors/warnings direct imports these?

use wart remover. adapting illustration readme, should (untested)

import org.brianmckenna.wartremover.{warttraverser, wartuniverse} object javadate extends warttraverser { def apply(u: wartuniverse): u.traverser = { import u.universe._ val javadate: type = typeof[java.util.date] val javacal: type = typeof[java.util.calendar] new traverser { override def traverse(tree: tree) { tree.tpe match { case javadate => u.error(tree.pos, "java.util.date not allowed") case javacal => u.error(tree.pos, "java.util.calendar not allowed") case _ => } super.traverse(tree) } } } }

java scala sbt

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -