Quality Hooks

Overview

Quality hooks are part of the git-flow process and tie in linting and unit tests to be automatically performed with each check-in by a developer.
Fortunately, the SFDX provides a number of tools for both linting, security, and unit testing to be introduced into the DevOps pipeline.
The guidance that follows illustrates how to incorporate the items into Azure Pipelines.
Static Analysis In order to ensure quality code, static analysis should performed on all source code. SonarQube and SonarCloud are great tools to help make this happen
Salesforce specific checks are provided by:
Automated Testing All unit tests should be executed for any code written. (Apex) as well as monitor code coverage with each commit
  • Apex
    • Unit Tests
      • Running as part of build: sfdx force:apex:test:run --resultformat human
      • Mocks link
    • Lightning
      • Linting link - ensure consistent quality code (code analysis / validation)
      • ESLint Rules link
      • Lightning Tests Link
Resources:
Last modified 2yr ago
Export as PDF
Copy link