Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 970 Bytes

File metadata and controls

44 lines (35 loc) · 970 Bytes

📐 Pre-commit

What is precommit?

Installation

pip3 install pre-commit

We are mainly using the following four repos:

Configuration

Add to project/.pre-commit-config.yaml

repos:
- repo: https://github.com/Montreal-Analytics/dbt-gloss
  rev: v1.0.0
  hooks:
  - id: check-script-semicolon
  - id: check-script-has-no-table-name
  - id: dbt-test
  - id: dbt-docs-generate
  - id: check-model-has-all-columns
    name: Check columns - core
    files: ^models/core
  - id: check-model-has-all-columns
    name: Check columns - mart
    files: ^models/mart
  - id: check-model-columns-have-desc
    files: ^models/mart

Initialization

pre-commit install