2025-01-02 13:29:47 -08:00
|
|
|
default_stages: [pre-commit]
|
|
|
|
|
fail_fast: true
|
|
|
|
|
repos:
|
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2026-01-19 15:25:43 -05:00
|
|
|
rev: v6.0.0
|
2025-01-02 13:29:47 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: check-yaml
|
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
|
- id: trailing-whitespace
|
2025-10-22 15:17:43 -04:00
|
|
|
|
|
|
|
|
# Python import sorting and formatting
|
2025-08-08 15:32:30 -04:00
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
2025-10-22 15:17:43 -04:00
|
|
|
# Ruff version. Check https://github.com/astral-sh/ruff-pre-commit#version-compatibility
|
2025-08-08 15:32:30 -04:00
|
|
|
# for the latest ruff version supported by the hook.
|
2026-01-19 15:25:43 -05:00
|
|
|
rev: v0.14.11
|
2025-01-02 13:29:47 -08:00
|
|
|
hooks:
|
2025-08-08 15:32:30 -04:00
|
|
|
- id: ruff-check
|
2025-10-22 15:17:43 -04:00
|
|
|
args: [--fix]
|
|
|
|
|
- id: ruff-format
|
|
|
|
|
|
|
|
|
|
# Local hook: hash consistency check
|
|
|
|
|
- repo: local
|
|
|
|
|
hooks:
|
|
|
|
|
- id: hash-check
|
|
|
|
|
name: Hash consistency check
|
2026-01-14 13:20:27 -05:00
|
|
|
entry: bash -lc 'cd projects/rocprofiler-compute && python3 src/utils/hash_checker.py'
|
2025-10-22 15:17:43 -04:00
|
|
|
language: system
|
|
|
|
|
pass_filenames: false
|
|
|
|
|
stages: [pre-commit]
|