forked from dbt-labs/metricflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
50 lines (46 loc) · 1.86 KB
/
.pre-commit-config.yaml
File metadata and controls
50 lines (46 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Exclude snapshots as they can represent specific output and formatting hooks may strip newlines.
exclude: "^(?:tests_metricflow|metricflow-semantics/tests_metricflow_semantics|dbt-metricflow/tests_dbt_metricflow)/snapshots/.*$"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-json
- id: trailing-whitespace
exclude_types:
- "markdown"
- id: end-of-file-fixer
- id: check-case-conflict
# Faster version of flake8 / isort / etc.
# Uses ruff.toml for configuration.
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.3.3"
hooks:
- id: ruff
verbose: true
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
verbose: true
args: ["--line-length", "120"]
# Uses mypy.ini for configuration.
- repo: https://github.com/pre-commit/mirrors-mypy
# Note: with "language: system", this version is unrelated to what's run.
rev: v1.3.0
hooks:
- id: mypy
# dbt-metricflow requires dbt-core, which is not installed in the main metricflow dev environment.
# We typecheck dbt-metricflow separately via direct invocation inside the `make lint` command
exclude: "^dbt-metricflow/"
args: [--show-error-codes]
verbose: true
# "system" means that the current environment will be used to run the hook, not the environment installed by
# pre-commit. This is set for mypy to use the specified package dependencies in Hatch (assuming pre-commit is
# run with hatch run ...). Seems like pre-commit calls the mypy on the command line with this settings.
language: system
- repo: https://github.com/rhysd/actionlint
rev: v1.7.6
hooks:
- id: actionlint
files: ^\.github/workflows/