gplugin/gplugin

Bring back the break after functions
develop
2020-02-15, Richard Laager
d87c806b1f05
Bring back the break after functions

With the AlwaysBreak style, functions with many arguments get continued
onto the next line like this:

gplugin_gtk_store_plugin_unloaded_cb(
GObject *manager,
GPluginPlugin *plugin,
gpointer data) {
gplugin_gtk_store_update_plugin_state(
GPLUGIN_GTK_STORE(data), plugin);
}

It is difficult to see where parameters stop and the body starts.

Gary suggested this formatting, which "helps (at least me) visually see
the blocks while scanning the code":

gplugin_gtk_store_plugin_unloaded_cb(
GObject *manager,
GPluginPlugin *plugin,
gpointer data
) {
gplugin_gtk_store_update_plugin_state(
GPLUGIN_GTK_STORE(data), plugin);
}

Unfortunately, that is not something that clang-format supports. We
can get almost the same output (just moving the closing paren), with
the same visual benefits, by using BraceWrapping: AfterFunction: true,
which produces this:

gplugin_gtk_store_plugin_unloaded_cb(
GObject *manager,
GPluginPlugin *plugin,
gpointer data)
{
gplugin_gtk_store_update_plugin_state(
GPLUGIN_GTK_STORE(data), plugin);
}
###############################################################################
# Options
###############################################################################
option(
'gobject-introspection',
type : 'boolean', value : true,
description : 'Whether or not to build a GObject Introspection type library'
)
option(
'nls',
type : 'boolean', value : true,
description : 'Install translation files'
)
option(
'help2man',
type : 'boolean', value : true,
description : 'Whether or not to build man pages from --help output'
)
option(
'doc',
type : 'boolean', value : true,
description : 'build documentation with gtk-doc'
)
option(
'gtk3',
type : 'boolean', value : true,
description : 'Whether or not to build the gtk3 library'
)
option(
'lua',
type : 'boolean', value : true,
description : 'Whether or not to build the Lua plugin loader'
)
option(
'perl',
type : 'boolean', value : false,
description : 'Whether or not to build the Perl plugin loader'
)
option(
'python',
type : 'boolean', value : true,
description : 'Whether or not to build the Python 3.x plugin loader'
)
option(
'tcc',
type : 'boolean', value : false,
description : 'Whether or not to build the TCC plugin loader'
)
option(
'vapi',
type : 'boolean', value : true,
description : 'Whether or not to build vapi files for gplugin'
)