Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from havocp/havocp-filter-problems
mima-binary-issue-filters key
- Loading branch information
Showing
6 changed files
with
83 additions
and
34 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
core/src/main/scala/com/typesafe/tools/mima/core/Filters.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.typesafe.tools.mima.core | ||
|
||
object ProblemFilters { | ||
|
||
private case class ExcludeByName[P <: ProblemRef: ClassManifest](name: String) extends ProblemFilter { | ||
override def apply(problem: Problem): Boolean = { | ||
!(implicitly[ClassManifest[P]].erasure.isAssignableFrom(problem.getClass) && | ||
Some(name) == problem.matchName) | ||
} | ||
|
||
override def toString(): String = """ExcludeByName[%s]("%s")""".format(implicitly[ClassManifest[P]].erasure.getSimpleName, name) | ||
} | ||
|
||
def exclude[P <: ProblemRef: ClassManifest](name: String): ProblemFilter = { | ||
ExcludeByName[P](name) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
core/src/main/scala/com/typesafe/tools/mima/core/package.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.typesafe.tools.mima | ||
|
||
package object core { | ||
type ProblemFilter = (Problem) => Boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters