Before we start...:
Branch/Commit:
main branch
Problem:
When using the -b option, the SkunkScore average doesn't change if you improve code coverage for your application/library.
Solution:
As a developer using skunk -b stable-branch
I want to see the right SkunkScore delta
So that I can quickly see how much I've improved my project by paying off tech debt
It could work like this:
skunk -b main
Switched to branch 'main'
running flay smells
...
running flog smells
.......................
running reek smells
.......................
running complexity
.......................
running attributes
.......................
running churn
.......................
running simple_cov
.......................
Switched to branch 'poc/compare-issue'
running flay smells
...
running flog smells
.......................
running reek smells
.......................
running complexity
.......................
running attributes
.......................
running churn
.......................
running simple_cov
.......................
Base branch (main) average skunk score: 32.21
Feature branch (poc/compare-issue) average skunk score: 27.21
**Code coverage average improved by 7.27%**
**Skunk score average is 15% better**
Notes:
It might be necessary to run the entire test suite "all over again" for one of the branches, so that we can compare two different result sets from SimpleCov.
I imagine it could work like this:
- Save a copy of the files for the current branch's
coverage directory in a .skunk local directory
- Run all calculations for the current branch
- Switch to the "compared branch"
- Run the entire test suite using
COVERAGE=true
- Save a copy of the files for the "compared branch" directory in a
.skunk local directory
- Compare all results
- Output delta information
Before we start...:
Branch/Commit:
mainbranchProblem:
When using the
-boption, the SkunkScore average doesn't change if you improve code coverage for your application/library.Solution:
It could work like this:
Notes:
It might be necessary to run the entire test suite "all over again" for one of the branches, so that we can compare two different result sets from SimpleCov.
I imagine it could work like this:
coveragedirectory in a.skunklocal directoryCOVERAGE=true.skunklocal directory