diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2016-11-30 18:06:42 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2016-11-30 18:06:42 +0000 |
commit | de666a7753f9e6d554e24ae46cf86173cad64314 (patch) | |
tree | f6086ed44c3bbeebcfb8e7a7bb658d55c1cac1fa /clang-tidy/ClangTidy.h | |
parent | b24beea8f8b8804c52127014692f8f0f0763caba (diff) |
[clang-tidy] Make format style customizable
Summary: I came across an outstanding FIXME to make the format style customizable. Inspired by the include fixer, I added an new option `-style` to configure the fallback style in case no clang-format configuration file is found. The default remains "llvm".
Reviewers: Prazek, aaron.ballman, hokein, alexfh
Subscribers: cfe-commits, malcolm.parsons
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D27142
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@288258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-tidy/ClangTidy.h')
-rw-r--r-- | clang-tidy/ClangTidy.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang-tidy/ClangTidy.h b/clang-tidy/ClangTidy.h index 41df4d7e..f30bb209 100644 --- a/clang-tidy/ClangTidy.h +++ b/clang-tidy/ClangTidy.h @@ -235,9 +235,10 @@ runClangTidy(std::unique_ptr<ClangTidyOptionsProvider> OptionsProvider, // FIXME: Implement confidence levels for displaying/fixing errors. // /// \brief Displays the found \p Errors to the users. If \p Fix is true, \p -/// Errors containing fixes are automatically applied. +/// Errors containing fixes are automatically applied and reformatted. If no +/// clang-format configuration file is found, the given \P FormatStyle is used. void handleErrors(const std::vector<ClangTidyError> &Errors, bool Fix, - unsigned &WarningsAsErrorsCount); + StringRef FormatStyle, unsigned &WarningsAsErrorsCount); /// \brief Serializes replacements into YAML and writes them to the specified /// output stream. |