Sagacify / sonar-scala

Sonarqube plugin for scala analysis
GNU Lesser General Public License v3.0
58 stars 32 forks source link

fix(coverage): Hack for comma-delimited sources #10

Closed jamiely closed 7 years ago

jamiely commented 7 years ago

Make BruteForceSequenceMatcher only look at first path

Currently BruteForceSequenceMatcher doesn't handle multiple comma-delimited sources provided in sonar.sources. One might specify multiple comma-delimited source paths via sonar.sources in order to analyze both Scala and JavaScript, for example.

This hack doesn't fix the root issue but makes the behavior a little more straightforward, as right now it just treats a list of paths as a single path.

aborsu commented 7 years ago

@jamiely it would probably be better to make it handle all the given path . Do you think you could expand on what you started?

jamiely commented 7 years ago

I think the best approach would be to make the BruteForceSequenceMatcher#getSourceRelativePath lookup based on precedence. First it would perform this function on the first path in the list. If no results are found, then it would proceed to the next path. I'm not sure if I will get around to this, but just leaving this here in case someone sees this and has some time.