Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple source roots in report generators (issue #104) #109

Closed
wants to merge 6 commits into from

Conversation

gslowikowski
Copy link
Member

PR for #104

IOUtils - added "relativeSource" method finding relative path based multiple source root directories,
ScoverageHtmlWriter, ScoverageXmlWriter, CoberturaXmlWriter - multiple source root directories supported,
CoberturaXmlWriter - <sources> section filled properly.
…urce root matches), this means there are some configuration problems and failing fast is better solution than generating inproper file paths (causing IOExceptions later).
)
sourceRoot match {
case Some(path: String) => src.replace(path, "")
case _ => throw new RuntimeException(s"No source root found for '$src'"); //TODO Change exception class
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to decide what exception will be the best :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe IllegalArgumentException? Method contract states src must have at least one source root in given sourcePaths.

@Kwestor
Copy link
Contributor

Kwestor commented Mar 3, 2015

Reviewed, aside from minor nitpicks LGTM.

@gslowikowski
Copy link
Member Author

I forgot to fix tests.

@gslowikowski
Copy link
Member Author

Merged manually - db86022

gslowikowski added a commit that referenced this pull request Mar 28, 2015
… specified path, shows all source root paths for easier problems detection.
gslowikowski added a commit to gslowikowski/scalac-scoverage-plugin that referenced this pull request Mar 28, 2015
…se class created and common code moved there. "IOUtils.relativeSource" moved there too, because it's reports specific and works on paths as strings, not real files.
sksamuel added a commit that referenced this pull request Mar 29, 2015
@gslowikowski gslowikowski deleted the issue104 branch October 2, 2016 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants