[haiku-development] Re: haiku-format for C++ developers

  • From: Owen Pan <owenpiano@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 7 Aug 2018 12:17:48 -0700

On Tue, Aug 7, 2018 at 3:01 AM Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
wrote:

7 août 2018 11:26 "Owen Pan" <owenpiano@xxxxxxxxx> a écrit:

- Can this be integrated into Gerrit? It would be great to have a bot
there giving Code-Change: +1
or -1 on submitted patches automatically. It would save a lot of time
for those of us reviewing the
changes.

I think it's possible if Gerrit has API's that can be integrated with
clang-format API's. However,
I would think that any code submitted to Gerrit should have already
reformatted by clang-format or
haiku-format so that this would be unnecessary. :)

Gerrit has two things:
- It can trigger a buildbot (using hooks)
- There is a REST API to submit votes (and do many other things)

It would be convenient to have this done on Gerrit side, so people
submitting patches get
immediate feedback. Ideally, yes, people would always follow the coding
style, but...

I will look into integrating this into vim, too.


For vim (and other editors) integration, see here:
https://clang.llvm.org/docs/ClangFormat.html#vim-integration

Other related posts: