Skip to content

excludes not working #117

@HugoTigre

Description

@HugoTigre

Expected vs Actual Behaviour

I have a Method code too large! error, in a class the java runs fine. For now I don't want to change the class so I want to exclude it from instrumentation, but this is not working.

I tried several approaches in sbt, but none is working, for example

lazy val jacoco = Seq(
  jacocoReportSettings in Test := JacocoReportSettings()
    .withFileEncoding("UTF-8")
    .withFormats(JacocoReportFormats.XML),
  jacocoExcludes in Test := Seq(
    "**/*NameOfClass.*"
  )
)

then adding jacoco to project settings.

also:

jacocoExcludes in Test := Seq(
  "**/*NameOfClass.*"
)

Tried several combinations of the class to exclude, but none work. I still get the error.

It should...
Exclude class from instrumentation.

Instead it...
Includes all classes

Steps to Reproduce

> sbt jacoco

Environment

  • SBT version: 0.13.11
  • Plugin version: 3.1.0
  • Scala version(s): 2.11.7
  • Java version: 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions