daml/scalafmt.sh
Stefano Baghino 7c3542fc1d Use scalafmt's diff mode (#3654)
Limits the set of files scalafmt will run on to those in the
git diff with master. This should greatly speed up language
agnostic checks, especially for developers to test them before
the contribution hits CI.

Worth mentioning: we use scalafmt 1.5.x, scalafmt latest release
is 2.2.x and the option is deprecated in favor of .
2019-11-28 09:33:13 +00:00

9 lines
209 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) 2019 The DAML Authors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -eu -o pipefail
cd "${0%/*}"
scalafmt --git true --diff --config .scalafmt.conf "$@"