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
Fallback to counting lines when metrics fail ft 5698 #103
Fallback to counting lines when metrics fail ft 5698 #103
Conversation
this PR depends on this: #105 |
2c8f5d8
to
96977d6
Compare
}(collection.breakOut) | ||
} | ||
|
||
fileMetrics.foreach(results => formatter.addAll(results.to[List])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calculateMissingFileMetrics doing the formatter does not seem a nice thing.
|
||
val analysisFiles: Set[Path] = metricsResults.flatMap(_.files)(collection.breakOut) | ||
|
||
metricsResults.map { res => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we try something like
forEach file
getMetrics
case None => FileMetrics(loc = calculateLoc)
case Some(metrics) if metrics.loc.isEmpty => FileMetrics(loc = calculateLoc)
case Some(metrics) => metrics
analysisResultsWithMissingMetrics | ||
} | ||
|
||
private def reduceAndCalculateMissingFileMetrics( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to put this inside some post processing logic and then perform the reduce, missing and format inside.
This PR depends on this: #107 |
…bsolute paths and to improve function composition.
* Removed unnecessary clone from unit test and added local file
9b4b1be
to
851b9f3
Compare
851b9f3
to
7d1a822
Compare
No description provided.