Update: Haiku Format Bot 0.2

Note: this is a cross-post with the haiku-development mailing list.

The Haiku Format Bot is a tool that is able to pull contributions to Haiku published on Gerrit, put them through haiku-format to check them for style formatting, and to publish the outcome as suggestions on the change.

Since yesterday, the bot is running continuously, meaning that all future changes will be reviewed by the bot.

This new version has the following changes:

  • It implements the decision on removing the space after a C-Style cast.
  • After running, it now sets the haiku-format label to +1 or -1 depending on whether the bot added any suggestions.
  • If a change should not be reviewed by the bot, you can add the format-bot-skip hashtag to the Gerrit change and the bot will skip it.
  • There is some limited logic to skip doing any formatting changes on sections that overlap with class definitions, in order to reduce the number of false positives while Haiku’s class member declaration style is incompatible with the tool (see below).

It may be a bit of a surprise that the bot is back, after I announced that I would cease working on it after I had to withdraw the proposal to change the guidelines on formatting function and variable declarations (see the this message in that thread). However, the request was made to have it run, in order to get a longer term view of the benefits of automated code formatting.

What this means for me that the tool is going in maintenance mode. I’ll keep it running, I might make some minor changes (like keeping it up to date with newer versions of haiku-format), and I might even suggest some more style clarifications based on the output, but I will not be driving its adoption given the lack of consensus in the core development team about the value for this tool and the need to adjust our coding style practices to better support it.

This also means that there is a call to action for you! The tool lives in the haiku-format-bot Github repository and I am happy to review pull requests there!


Thanks for working on this, it is very useful!


Thank you for working on this @nielx !


Thank you for your work and dedication!

1 Like