Browsable Code Quality report

Problem to solve

At the time of writing this our code quality report is only viewable by either downloading a .json file or viewing the newly created issues as a diff in the MR widget.

However, as a manager of a team or a maintainer of a project, I might want to be able to browse and view files in the project repository based upon their code quality - allowing me to seek out the "worst" files and see what problems they have.

Intended users

Further details

Being able to see the file list "ranked" by "badness" in itself probably isn't helpful in the long term. The details of each problem that are raised need to be viewable as well and have context. We should also be able to view each file and see it's related challenges which would be done in #7135 (closed).

Proposal

An initial approach may be to just aggregate the .json file for the default branch in a file that looks like this:

Filename # of problems # of major issues
cell cell cell
cell cell cell

Beyond that MVC approach we may either extend the regular file tree view (Repository > Files) or add a new similar view, that includes as a column some sort of aggregation of a files quality. Code Climate does this with a letter grade A-F.

If you view an individual file, we should have a toggle which allows a user to annotate the file with an "overlay" of the code quality issues. Code Climate accomplishes this view in GitHub by using a browser extension to "enhance" the GitHub view. As we're all under the same roof here though we can do this without needing a browser extension.

Users could also navigate to this view from the MR widget.

Permissions and Security

Documentation

Testing

What does success look like, and how can we measure that?

What is the type of buyer?

The buyer for this is the Development Team Lead who wants to more information beyond coverage stats to prioritize which areas of tech debt to tackle next.

Links / references

Edited by James Heimbuck