contrib/examples/fix.hgrc
author Raphaël Gomès <rgomes@octobus.net>
Thu, 07 May 2020 23:52:08 +0200
changeset 44891 ad1ec40975aa
parent 44232 5e84a96d865b
child 45623 426294d06ddc
permissions -rw-r--r--
rust-regex: fix issues with regex anchoring and performance It turns out that the way I tried to work around `regex`'s behavior difference with `re2` and Python's `re` was 1) buggy and 2) much more complicated than needed. In a few words: `regex` adds `.*` on either side of patterns when no start or end anchor is present. My previous workaround put `^` or `$` for every pattern, which is wrong even without the other 2 bugs on top of it. Using `^(?:<patterns>)` right at the end of the `regex` path fixes the issue. I've opened an issue to get a build option instead: https://github.com/rust-lang/regex/issues/675 Differential Revision: https://phab.mercurial-scm.org/D8506
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42967
5dfb57af1148 contrib: add new examples area and start it out with a config for `hg fix`
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
[fix]
44011
ac72e17457e5 fix: correct the clang-format example hgrc so that it actually works
Kyle Lippincott <spectral@google.com>
parents: 43927
diff changeset
     2
clang-format:command = clang-format --style file
ac72e17457e5 fix: correct the clang-format example hgrc so that it actually works
Kyle Lippincott <spectral@google.com>
parents: 43927
diff changeset
     3
clang-format:pattern = set:(**.c or **.cc or **.h) and not "include:contrib/clang-format-ignorelist"
42968
f5ad85dd5f7e examples: add sample fix integration for `rustfmt`
Augie Fackler <augie@google.com>
parents: 42967
diff changeset
     4
44103
2077ffede71f examples: refer to nightly rustfmt in Windows-compatible way
Martin von Zweigbergk <martinvonz@google.com>
parents: 44069
diff changeset
     5
rustfmt:command = rustfmt +nightly
42968
f5ad85dd5f7e examples: add sample fix integration for `rustfmt`
Augie Fackler <augie@google.com>
parents: 42967
diff changeset
     6
rustfmt:pattern = set:**.rs
43065
31c1a5376745 examples: include a sample of how to use black with fix
Augie Fackler <augie@google.com>
parents: 42968
diff changeset
     7
43351
cb0d80831ee0 contrib: fix up example fix configuration for our move to released black
Augie Fackler <augie@google.com>
parents: 43225
diff changeset
     8
black:command = black --config=black.toml -
44232
5e84a96d865b python-zstandard: blacken at 80 characters
Gregory Szorc <gregory.szorc@gmail.com>
parents: 44103
diff changeset
     9
black:pattern = set:**.py - mercurial/thirdparty/**
43927
b78795c2a294 examples: add an example configuration for go source files
Augie Fackler <augie@google.com>
parents: 43550
diff changeset
    10
b78795c2a294 examples: add an example configuration for go source files
Augie Fackler <augie@google.com>
parents: 43550
diff changeset
    11
# Mercurial doesn't have any Go code, but if we did this is how we
b78795c2a294 examples: add an example configuration for go source files
Augie Fackler <augie@google.com>
parents: 43550
diff changeset
    12
# would configure `hg fix` for Go:
b78795c2a294 examples: add an example configuration for go source files
Augie Fackler <augie@google.com>
parents: 43550
diff changeset
    13
go:command = gofmt
b78795c2a294 examples: add an example configuration for go source files
Augie Fackler <augie@google.com>
parents: 43550
diff changeset
    14
go:pattern = set:**.go