Merge pull request #180 from eed3si9n/wip/fatal-warnings

Fix 2.10 build
This commit is contained in:
eugene yokota 2018-09-22 00:47:22 -04:00 committed by GitHub
commit 69d6b3aeb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 8 deletions

View File

@ -3,12 +3,7 @@ jdk: oraclejdk8
scala:
- 2.11.12
- 2.12.4
matrix:
include:
- scala: 2.12.4
jdk: oraclejdk9
- 2.12.6
script: sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M
++$TRAVIS_SCALA_VERSION
@ -17,6 +12,13 @@ script: sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M
whitesourceCheckPolicies
test
matrix:
include:
- scala: 2.12.6
jdk: oraclejdk9
- scala: 2.10.6
script: sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M "++$TRAVIS_SCALA_VERSION compile"
env:
global:
- secure: JzxepvrNQIem+7MS8pBfBkcWDgt/oNKOreI3GJMJDN9P7lxCmrW0UVhpSftscjRzz9gXGQleqZ8t/I0hqysY9nO/DlxDQil6FKpsqrEKALdIsez8TjtbOlV69enDl6SBCXpg1B/rTQ/dL9mpV3WMvNkmDOhcNmbNyfO9Uk8wAAEvGQNKyE02s0gjZf6IgfOHXInBB2o3+uQFiWCABFHDWInN4t0QZVEhF/3P3iDKEfauWGwugf/YKLrwUUzNyN+J1i1goYEWZvviP+KCNbPlEsVN60In8F0t+jYuBJb0ePNcl3waT/4xBKQRidB4XRbhOXrZIATdpHLnzKzk2TPf3GxijNEscKYGdq3v6nWd128rfHGYz528pRSZ8bNOdQJotB/bJTmIEOnk5P9zU0z4z2cawMF6EyBJka7kXnC9Vz6TpifvyXDpzfmRzAkBrD6PC+diGPbyy5+4zvhpZuv31MRjMckohyNb76pR9qq70yDlomn+nVNoZ1fpp7dCqwjIxm9h2UjCWzXWY4xSByI8/CaPibq6Ma7RWHQE+4NGG2CCLQrqN4NB+BFsH3R0l5Js9khvDuEUYJkgSmJMFluXranWRV+pp/YMxk1IT4rOEPOc/hIqlQTrxasp/QxeyAfRk9OPzoz9L2kR0RH4ch3KuaARUv03WFNarfQ/ISz3P/s=

View File

@ -101,9 +101,12 @@ lazy val utilLogging = (project in internalPath / "util-logging")
crossScalaVersions := Seq(scala210, scala211, scala212),
name := "Util Logging",
libraryDependencies ++=
Seq(jline, log4jApi, log4jCore, disruptor, sjsonnewScalaJson.value, scalaReflect.value,
compilerPlugin(silencerPlugin), silencerLib),
Seq(jline, log4jApi, log4jCore, disruptor, sjsonnewScalaJson.value, scalaReflect.value),
libraryDependencies ++= Seq(scalaCheck, scalaTest),
libraryDependencies ++= (scalaVersion.value match {
case v if v.startsWith("2.12.") => List(compilerPlugin(silencerPlugin))
case _ => List()
}),
Compile / scalacOptions ++= (scalaVersion.value match {
case v if v.startsWith("2.12.") => List("-Ywarn-unused:-locals,-explicits,-privates")
case _ => List()

View File

@ -0,0 +1,10 @@
package com.github.ghik.silencer
import scala.annotation.Annotation
/**
* When silencer compiler plugin is enabled, this annotation suppresses all warnings emitted by scalac for some portion
* of source code. It can be applied on any definition (`class`, def`, `val`, `var`, etc.) or on arbitrary expression,
* e.g. {123; 456}: @silent`
*/
class silent extends Annotation

View File

@ -43,6 +43,7 @@ class BufferedAppender private[BufferedAppender] (name: String, delegate: Append
if (recording) {
buffer += event.toImmutable
} else delegate.append(event)
()
}
/** Enables buffering. */