karma-sonarqube-unit-reporter icon indicating copy to clipboard operation
karma-sonarqube-unit-reporter copied to clipboard

testPaths is not relative to basePath, unlike outputFile

Open jimmux opened this issue 6 years ago • 0 comments

This is one possible way to add test file paths relative to basePath, to make it consistent and not break backwards compatibility of testPaths and testFilePattern. Note that I'm not a fan of my new config item name (basePathGlob) but having trouble thinking of a better one. "testFilesGlobFromBasePath" is a bit cumbersome. Naming is hard.

The gist is that config item sonarQubeUnitReporter.basePathGlob is a globbed file path, relative to basePath, that will override testPaths and testFilePattern. The path attribute that ends up in the outputFile xml is also relative to basePath.

Cheers!

jimmux avatar Sep 12 '18 08:09 jimmux