ci: Add `go fmt` check to the CI pipeline
Description
Per our code review guidelines:
Enforcing and improving code style should be primarily done through automation instead of review comments.
The checking of formatting is easily automated. This MR adds a new CI job to check that all files are properly formatted, so that formatting issues can be called out by the pipeline instead of by code reviewers.
Related Issues
N/A
How has this been tested?
- Using the CI pipeline on this merge request
- Using a branch with unformatted files: https://gitlab.com/gitlab-org/cli/-/jobs/3328458315
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms)
Edited by Brian Williams