35 lines
1.0 KiB
YAML
35 lines
1.0 KiB
YAML
repos:
|
|
- repo: https://github.com/sqlfluff/sqlfluff
|
|
rev: 3.0.7 # Use the latest stable version
|
|
hooks:
|
|
- id: sqlfluff-lint
|
|
name: Postgres Linting
|
|
args: [--dialect, postgres]
|
|
# Only run on files in the db/ directory ending in .sql
|
|
files: ^collector/db/.*\.sql$
|
|
# Dockerfile linting
|
|
- repo: https://github.com/hadolint/hadolint
|
|
rev: v2.12.0
|
|
hooks:
|
|
- id: hadolint
|
|
name: Dockerfile Linter
|
|
files: ^collector/(db|api)/Dockerfile$
|
|
|
|
# Linting Docker Compose stuff
|
|
- repo: local
|
|
hooks:
|
|
- id: docker-compose-check
|
|
name: Docker Compose Config Check
|
|
entry: docker compose -f collector/docker-compose.yaml config --quiet
|
|
language: system
|
|
files: ^collector/docker-compose\.yaml$
|
|
pass_filenames: false
|
|
|
|
# 3. General YAML linting for Docker Compose
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: v3.1.0
|
|
hooks:
|
|
- id: prettier
|
|
types: [yaml]
|
|
files: ^collector/docker-compose\.yaml$
|