Open vrish88 opened 3 years ago
If your CI ensures that violation stores for frozen rules are always up to date (when violations are fixed, FreezingArchRule
automatically reduces stored violations), the history of those store files already tracks the violations over time.
So far, ArchUnit didn't focus on visualizing those (you could use external tools to, e.g., count the text files' lines), but it does provide extension points that allow for custom violation stores. @stefanroeck has implemented an XmlFileBasedViolationStore
that can probably directly be used as a SonarQube metric, see #425.
What we have also done in the past is committing and pushing the violation store after each CI run. A poor man's visualization can then be achieved by a simple tracking of the text based violation store in the Git repo and counting the lines of each commit, e.g. wc -l ${STORE_VIOLATION_FILE}
. So any tool that can visualize a simple counter over time can then be used.
Hello there,
I just came across
FreezingArchRule
, it's AWESOME! One thing that's been tough with ArchUnit is that either a codebase is perfect or it's in complete violation. Codebases with existing problems were tough to wrangle in small chunks. Howeverfreeze
is one tool to take smaller steps towards that perfection.One other step I've been looking for to help get codebases better, is to show trends of violations over time. So the use cases I've encountered are something like this:
Or another one:
Do these makes sense? Is there something like this that already exists within ArchUnit that I'm missing? Or is this something that you would be open to contributions for?