daml/.pre-commit-config.yaml
Paul Brauner 18e0e9e656
Test that canton 3.x builds with bazel hourly (#17876)
* introduce a canton2 directory

* rename to canton-3x and only keep the bazel rules

* add canton-3x to bazelignore

* fix visibility rules

* add a build-canton-3x script

* add build-canton-3x.sh temporarily to prs.yml to test it out

* try sending a message to stack when failing

* backport 243125adee

* restore prs.yml and add the job to azure-cron.yml

* restore tell-slack-failed condition

* address comments

* display the revision at which canton was cloned, to ease debugging
2023-11-23 08:54:35 +01:00

49 lines
1.4 KiB
YAML

# 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
exclude: '^canton(-3x)?/'
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]