From c4fa87692547a25f772b3da336147b4eb9114f64 Mon Sep 17 00:00:00 2001 From: Bernd Busse Date: Sat, 3 Oct 2020 19:58:55 +0200 Subject: Never run clang-format / clang-tidy against directories `pathlib.Path.glob()` also returns directories that match source filenames (i.e. a directory named `test.h/`), but `clang-format` and `clang-tidy` fail when handed a directory. We manually skip calling `clang-format` and `clang-tidy` on those directories. --- run_unittests.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'run_unittests.py') diff --git a/run_unittests.py b/run_unittests.py index 1fd436d..0385404 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4212,9 +4212,11 @@ recommended as it is not supported on some platforms''') if is_osx(): raise unittest.SkipTest('Apple ships a broken clang-tidy that chokes on -pipe.') testdir = os.path.join(self.unit_test_dir, '70 clang-tidy') + dummydir = os.path.join(testdir, 'dummydir.h') self.init(testdir, override_envvars={'CXX': 'c++'}) out = self.run_target('clang-tidy') self.assertIn('cttest.cpp:4:20', out) + self.assertNotIn(dummydir, out) def test_identity_cross(self): testdir = os.path.join(self.unit_test_dir, '71 cross') -- cgit v1.1