ide: clang-format fix

This commit is contained in:
Mirek Fidler 2023-02-01 23:48:35 +01:00
parent 2e77d71f12
commit e3ca03b4b3

View file

@ -71,6 +71,7 @@ String Ide::FindClangFormatPath()
return p; return p;
for(String dir : GetUppDirs()) for(String dir : GetUppDirs())
for(; dir.GetCount() > 3; dir = GetFileFolder(dir))
if(Check(dir)) if(Check(dir))
return p; return p;
@ -385,6 +386,7 @@ ReformatDlg::ReformatDlg()
view.SetReadOnly(); view.SetReadOnly();
String p = TheIde()->FindClangFormatPath(); String p = TheIde()->FindClangFormatPath();
DDUMP(p);
if(p.GetCount()) if(p.GetCount())
base.Add(Null, ".clang-format file " + p); base.Add(Null, ".clang-format file " + p);
for(String id : { "LLVM", "Google", "Chromium", "Mozilla", "WebKit", "Microsoft", "GNU" }) for(String id : { "LLVM", "Google", "Chromium", "Mozilla", "WebKit", "Microsoft", "GNU" })