karma-runner/karma-coverage — pull request #106 by NicolaF (2014-10-08 14:48:16+00:00)
Title: Allow to use a custom basePath in coverage reports + minor fixes

* add an optionnal configuration key "coverageReporter.reportBasePath" to specify the base path used in reports. Defaults to karma's basePath. Use case: maven + SonarQube integration:
* js sources are symlinked in a temporary directory and built there to avoid source tree pollution
* paths in lcov reports are relative to this temporary directory
* SonarQube expects paths in report to be relative to ${project.basedir}
* when setting coverageReporter.reportBasePath to ${project.basedir}, SonarQube is able to find files and to follow symlinks up to the original sources.

* preprocessor: use path.resolve instead of string replace. Should be safer and cope well with gory symlinks. Update tests accordingly
* reporter: relative paths do not necessarily start with ./. Check for leading / instead.