Re: [GRASS-dev] Proposal for using ClangFormat, replacing GNU indent, for C/C++ code formatting

2023-01-02 Thread Markus Neteler
On Mon, Jan 2, 2023 at 7:20 PM Nicklas Larsson wrote: > On 2 Jan 2023, at 13:48, Markus Neteler wrote: >> On Wed, Dec 21, 2022 at 9:25 PM Nicklas Larsson via grass-dev >>> >>> Installing clang-format is perhaps most easily done with: >>> python -m pip install 'clang-format==15.0.6' >>> >>>

Re: [GRASS-dev] Proposal for using ClangFormat, replacing GNU indent, for C/C++ code formatting

2023-01-02 Thread Even Rouault
I'd suggest you use pre-commit so that clang-format is automatically run on git commit operations like we have done with GDAL. Then it is a no-brainer to do changes. You need to add a .pre-commit-config.yaml at the root of the repository (only the part referencing clang-format at

Re: [GRASS-dev] Proposal for using ClangFormat, replacing GNU indent, for C/C++ code formatting

2023-01-02 Thread Nicklas Larsson via grass-dev
Markus, > On 2 Jan 2023, at 13:48, Markus Neteler wrote: > > Hi Nicklas, > > On Wed, Dec 21, 2022 at 9:25 PM Nicklas Larsson via grass-dev > wrote: >> >> I understand there is agreement on using the .clang-format formatting rules >> suggested with [1], which I just merged. >> >> I have

Re: [GRASS-dev] Proposal for using ClangFormat, replacing GNU indent, for C/C++ code formatting

2023-01-02 Thread Markus Neteler
Hi Nicklas, On Wed, Dec 21, 2022 at 9:25 PM Nicklas Larsson via grass-dev wrote: > > I understand there is agreement on using the .clang-format formatting rules > suggested with [1], which I just merged. > > I have formatted the whole source base with clang-format v.15.0.6, in 7 > different