Skip to content

Commit

Permalink
scoverage#210 - exclude "meta" macro generated code
Browse files Browse the repository at this point in the history
AST nodes have source == "<macro>" instead of real file path
  • Loading branch information
gslowikowski committed Nov 13, 2017
1 parent 182d26a commit 1194774
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scalac-scoverage-plugin/src/main/scala/scoverage/plugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ class ScoverageInstrumentationComponent(val global: Global, extraAfterPhase: Opt
// ignore macro expanded code, do not send to super as we don't want any children to be instrumented
case t if t.attachments.all.toString().contains("MacroExpansionAttachment") => t

// ignore "meta" macro generated code
case t if t.pos.isDefined && t.pos.source.path == "<macro>" => t

// /**
// * Object creation from new.
// * Ignoring creation calls to anon functions
Expand Down

0 comments on commit 1194774

Please sign in to comment.