Quality Gates

2023-09-27

A quality gate is a critical checkpoint in the software development lifecycle that assesses whether software meets specific criteria. Its primary goal is to identify and fix as many issues as possible before releasing the software. Quality gates may include, but are not limited to, the following checks:

  • Build: Checking if the software builds and compiles without any errors.
  • Linting: Ensuring that the codebase adheres to accepted best practices.
  • Tests: Including both functional tests and coverage reports.

Typical locations for implementing quality gates are:

  • Local Environment: Usually implemented with pre-commit hooks, this allows for early issue detection during code commit. Among other checks, it's an excellent place to enforce code style using tools like Prettier and validate naming conventions for the branch.

  • PR Validation: These checks duplicate those in the local environment, in case a developer skips pre-commit hooks using the --no-verify option. They also add PR-specific validations. For example, Azure can check if the associated work item was created or if a description was provided for the PR.

  • Main Branch Actions: This is the best place to run extensive integration and automation tests in addition to the previous checks. It ensures that the software continues to meet quality standards after merging into the main branch.

This setup works exceptionally well with temporary teams, such as contractors or outsourcers, to ensure that the codebase complies with defined standards.

Subscribe for daily updates on software development, productivity, and more.