# Copyright (c) 2023 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: - repo: local hooks: - id: hlint name: hlint language: system entry: "hlint -j" require_serial: true types: [haskell] - id: scalafmt name: scalafmt language: system require_serial: true entry: "scalafmt --respect-project-filters" types: [scala] - id: javafmt name: javafmt language: system require_serial: true entry: "javafmt --set-exit-if-changed --replace" types: [java] - id: buildifier name: buildifier language: system require_serial: true entry: "bazel run //:buildifier-pre-commit -- -mode=fix -v=true" types: [bazel] - id: pprettier name: pprettier language: system require_serial: true # NB: we need to pass a single argument which ends up in $0 when invoking bash -c entry: "bash -c 'yarn install --silent && yarn run pprettier --write \"$@\"' bash" types_or: [ts, tsx] - id: copyrights name: copyright headers description: Idempotently add DA copyright headers to source files. language: system pass_filenames: false entry: "dade-copyright-headers update" types: [text]