# SPDX-FileCopyrightText: Copyright (C) 2025 Opal Health Informatics Group at the Research Institute of the McGill University Health Centre # # SPDX-License-Identifier: Apache-2.0 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: check-added-large-files - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: check-json - id: check-toml - id: check-yaml - id: double-quote-string-fixer - id: end-of-file-fixer - id: trailing-whitespace exclude: '.github/pull_request_template.md' - id: pretty-format-json args: ["--autofix", "--no-ensure-ascii", "--no-sort-keys"] exclude: "^src/Languages/appTranslationTablesViews/.+\\.json" - id: pretty-format-json name: pretty-format translation JSON files args: ["--autofix", "--no-ensure-ascii"] files: "^src/Languages/appTranslationTablesViews/.+\\.json" - repo: https://github.com/fsfe/reuse-tool rev: v6.2.0 hooks: - id: reuse-lint-file - repo: https://github.com/crate-ci/typos rev: v1.45.1 hooks: - id: typos # zizmor detects security vulnerabilities in GitHub Actions workflows. - repo: https://github.com/woodruffw/zizmor-pre-commit rev: v1.24.1 hooks: - id: zizmor - repo: https://github.com/python-jsonschema/check-jsonschema rev: 0.37.1 hooks: - id: check-github-workflows args: ["--verbose"] - id: check-renovate args: ["--verbose"] additional_dependencies: ['json5'] # `actionlint` hook, for verifying correct syntax in GitHub Actions workflows. # Some additional configuration for `actionlint` can be added in `.github/actionlint.yaml` (this file can be created if it doesn't exist yet). - repo: https://github.com/rhysd/actionlint rev: v1.7.12 hooks: - id: actionlint language: golang additional_dependencies: # actionlint has a shellcheck integration which extracts shell scripts in `run:` steps from GitHub Actions # and checks these with shellcheck. # see also: https://github.com/rhysd/actionlint/pull/482 - "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.11.1" - repo: local hooks: - id: npm-ci name: npm lockfile up to date language: node entry: npm ci --dry-run pass_filenames: false - id: check-translations name: Check translation files have the same translation keys entry: python ./.github/check_translations.py language: python pass_filenames: false