contrib/examples/fix.hgrc
author Matt Harbison <matt_harbison@yahoo.com>
Mon, 05 Apr 2021 13:02:51 -0400
changeset 46893 3d32b9759047
parent 46774 decc3bd3f20d
permissions -rw-r--r--
contrib: restore the `hg fix` configuration in the examples After decc3bd3f20d, running `black` will DTRT, but running `hg fix` did nothing (unless the example config file was %included, in which case it truncated the file instead of formatting it). I'm not sure why that was happening, but let's not leave a code shredder laying around. Differential Revision: https://phab.mercurial-scm.org/D10311

[fix]
clang-format:command = clang-format --style file
clang-format:pattern = set:(**.c or **.cc or **.h) and not "include:contrib/clang-format-ignorelist"

rustfmt:command = rustfmt +nightly
rustfmt:pattern = set:"**.rs" - "mercurial/thirdparty/**"

black:command = black --config=pyproject.toml -
black:pattern = set:**.py - mercurial/thirdparty/**

# Mercurial doesn't have any Go code, but if we did this is how we
# would configure `hg fix` for Go:
go:command = gofmt
go:pattern = set:**.go