|
From: Paul F. <pj...@wa...> - 2023-04-22 09:55:24
|
On 20-04-23 22:22, Bart Van Assche wrote: > On 4/17/23 20:30, Nicholas Nethercote wrote: >> Is there any appetite for clang-formatting Valgrind's code? > > Why to reformat the entire code base? Auto-formatting can be used > without reformatting the entire code base. This is how I reformat Linux > kernel and Android patches before I publish these: > > git clang-format HEAD^ > git diff # to review the changes > git commit -a --amend --no-edit # to keep the changes > git reset --hard # to discard the changes > > Plugins are available for many editors (including Emacs and vi) that > support clang-format. Yes, Qt Creator (and I expect VS code as well) has ways to beautify a file, selected text, from the current line and to insert markup to disable clang-format. I expect that's mainly how I'll be using it (on selected blocks of code). A+ Paul |