Debian Codegraph @

CodeFormatter/fmtClangFormat.cpp

raw
1 #include "fmtClangFormat.hpp"
2
3 #include "Platform.hpp"
4
5 fmtClangFormat::fmtClangFormat()
6 {
7 SetName("clang-format");
8 SetFileTypes({ FileExtManager::TypeSourceCpp, FileExtManager::TypeSourceC, FileExtManager::TypeHeader,
9 FileExtManager::TypeJava, FileExtManager::TypeJS });
10 SetDescription(_("A tool to format C/C++/Java/JavaScript/JSON/Objective-C/Protobuf/C# code"));
11 SetShortDescription(_("clang-format - a C/C++ formatter"));
12 SetConfigFilepath("$(WorkspacePath)/.clang-format");
13
14 // local command
15 wxString clang_format_exe;
16 ThePlatform->WhichWithVersion("clang-format", { 20, 19, 18, 17, 16, 15, 14, 13, 12 }, &clang_format_exe);
17 SetCommand({ clang_format_exe, R"#("$(CurrentFileRelPath)")#" });
18 }
19
20 fmtClangFormat::~fmtClangFormat() {}