Skip to main content

Overview

In Paradime, pre-commit hooks are enforced in your CI pipeline, not on developer machines. You keep a .pre-commit-config.yaml at the root of your dbt™ repository, and a Turbo CI schedule runs the hooks against the files changed in each pull request using the Run pre-commit command, before running your dbt™ build. Because enforcement happens in CI, every contributor gets the same checks with no local setup, and a failing hook blocks the pull request instead of silently slipping through.

Getting Started

  1. Add a .pre-commit-config.yaml at the root of your dbt™ repository with the hooks you want to enforce (see the example below).
  2. Add a Run pre-commit command to your Turbo CI schedule, before your dbt™ command, so only the files changed in the pull request are checked:

Lint and Test Code Changes On Pull Requests

Full Turbo CI template with a complete pre-commit configuration and schedule YAML.

Example configuration

Paradime’s standard recommended hooks cover: Example pre commit hooks template
.pre-commit-config.yaml

Running checks on demand in the Code IDE

While Turbo CI is the enforcement point, you can run the same checks on demand from the Code IDE terminal to get feedback before you push. Pre-commit comes pre-installed, so run:
Then choose what to check:
  1. All Files: Run checks on all files in your project
  2. Staged Files: Run checks only on files staged for commit
Note: When running pre-commits for the first time, Paradime will install all necessary hooks. This initial setup might take a minute to complete as it downloads and configures the required components.
Do not install pre-commit as a commit hook in the Code IDE. Avoid running pre-commit install: commits made through the Git Lite or Git Advanced panel do not display hook output, so a failing hook blocks the commit with no visible error. Run checks on demand with paradime pre-commit instead, and let your Turbo CI schedule enforce the hooks on every pull request. If you previously ran pre-commit install, remove the commit hook with:

Best Practices

  1. Start with Paradime’s recommended hooks
  2. Enforce hooks in your Turbo CI schedule so every pull request is checked the same way
  3. Run paradime pre-commit on demand before pushing large changes
  4. Keep hook configurations in version control
  5. Gradually customize configurations as needed

Common Workflows

  1. Check your changes before pushing
  1. Enforce hooks on pull requests
Add the Run pre-commit command to your Turbo CI schedule ahead of your dbt™ command. See the Lint and Test Code Changes On Pull Requests template.
  1. Updating Hook Configurations
  • Modify .pre-commit-config.yaml
  • Auto-update the config to the latest repos’ versions by executing pre-commit autoupdate
  • Commit the change; your Turbo CI schedule picks it up on the next pull request