Commit Graph

4 Commits

Author SHA1 Message Date
Phil Cohen
6725395931 tests cut test-check-clang-format.t from 1.2m to 5s
Summary: Same fix as the previous diffs in this stack -- the issue is a slow `hg files` path that can be better done with grep.

Reviewed By: quark-zju

Differential Revision: D8753437

fbshipit-source-id: 05655b1d8677c1e9b7c1326f3704f15412152b94
2018-07-06 17:27:25 -07:00
Adam Simpkins
bd9208583d tests: fix test-check-clang-format.t to use unique temporary names
Summary:
Update test-check-clang-format.t to put its output files in "$TESTTMP" rather
than using fixed paths in the source repository.

This should fix stress test runs of this test, which run multiple copies of
the test in parallel.  Previously running several copies of this test in
parallel would fail as they all try to use the same output path names.

Reviewed By: quark-zju

Differential Revision: D8229266

fbshipit-source-id: a3728aaae7fa8ff393835e7edf09abf2e3939b69
2018-05-31 21:04:43 -07:00
Adam Simpkins
5682d5e0db move scm/hg/.clang-format to scm/hg/mercurial/
Summary:
The clang-format file in scm/hg basically only applies to things in the
scm/hg/mercurial directory.

There are 180 C and C++ files under scm/hg, and the vast majority of them do
not follow the style specified in this clang-format file.  All but 11 of these
files were present in scm/hg/contrib/clang-format-blacklist.

Of the 11 files that do follow this style, 10 are in the scm/hg/mercurial/
directory.  (10 of the 21 files in this directory use this style.)  The 1
other file is in scm/hg/contrib/xdiff.

The majority of the C/C++ files in scm/hg/hgext/extlib and scm/hg/lib/ follow
a style closer to Facebook and Google's C++ style guidelines.

Therefore this moves the .clang-format file to scm/hg/mercurial, and lets the
main fbsource clang-format file apply to the other files under scm/hg

Reviewed By: quark-zju

Differential Revision: D8131512

fbshipit-source-id: 622a33abc39eb240eff4ca27f69a675a7ed54a89
2018-05-25 14:35:51 -07:00
Augie Fackler
89b5ee7ac3 test-clang-format: new test to verify that files stay clang-formatted
For now all .c and .h files are blacklisted. As they become
clang-formatted, we'll remove them from the blacklist,and then this
test will produce output if there are diffs.

Differential Revision: https://phab.mercurial-scm.org/D1133
2015-09-14 14:17:27 -04:00