From 1ca0c58c8152ecfb2a47f91080b64eae7710dadb Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 22 Jan 2019 09:39:05 +0000 Subject: [clangd] Support clang-tidy configuration in clangd. Summary: This patch adds some basic supports for clang-tidy configurations in clangd: - clangd will respect .clang-tidy configurations for each file - we don't aim to support all clang-tidy options in clangd, only a small subset of condfigurations (options related to which checks will be enabled) are supported. - add a `clang-tidy-checks` CLI option that can override options from .clang-tidy file Reviewers: ilya-biryukov, sammccall Reviewed By: sammccall Subscribers: javed.absar, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D55256 llvm-svn: 351792 --- clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp') diff --git a/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp b/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp index 261c9b549b9..79ee779da62 100644 --- a/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp +++ b/clang-tools-extra/unittests/clangd/TUSchedulerTests.cpp @@ -38,7 +38,8 @@ class TUSchedulerTests : public ::testing::Test { protected: ParseInputs getInputs(PathRef File, std::string Contents) { return ParseInputs{*CDB.getCompileCommand(File), - buildTestFS(Files, Timestamps), std::move(Contents)}; + buildTestFS(Files, Timestamps), std::move(Contents), + tidy::ClangTidyOptions::getDefaults()}; } void updateWithCallback(TUScheduler &S, PathRef File, -- cgit v1.2.3