gplugin/gplugin

Configure clang-format
develop
2020-02-10, Richard Laager
27dc57f26824
Parents ae723f053264
Children c3b9a8deabe3
Configure clang-format

This configures the clang-format utility for automated code formatting.
  • +65 -0
    .clang-format
  • +2 -0
    gplugin-gtk-viewer/gplugin-gtk-viewer.c
  • +4 -0
    gplugin-gtk/gplugin-gtk-plugin-info.c
  • +2 -0
    gplugin-gtk/gplugin-gtk-store.c
  • +2 -0
    gplugin/gplugin-native-loader.c
  • +2 -0
    gplugin/gplugin-options.c
  • +6 -6
    gplugin/gplugin-plugin-info.h
  • +4 -0
    gplugin/gplugin-query.c
  • +3 -2
    gplugin/tests/bind-local/bind-local.c
  • +3 -2
    gplugin/tests/dynamic-type/dynamic-type-user.c
  • +3 -2
    gplugin/tests/id-collision/id-collision1.c
  • +3 -2
    gplugin/tests/id-collision/id-collision2.c
  • +3 -2
    gplugin/tests/load-on-query-fail/load-on-query-fail.c
  • +3 -2
    gplugin/tests/load-on-query-pass/load-on-query-pass.c
  • +3 -2
    gplugin/tests/plugins/basic-plugin.c
  • +3 -2
    gplugin/tests/plugins/broken-dependent-plugin.c
  • +3 -2
    gplugin/tests/plugins/dependent-plugin.c
  • +1 -2
    gplugin/tests/plugins/load-exception.c
  • +14 -8
    gplugin/tests/test-plugin-info.c
  • +3 -2
    gplugin/tests/versioned-dependencies/bar.c
  • +3 -2
    gplugin/tests/versioned-dependencies/baz.c
  • +3 -2
    gplugin/tests/versioned-dependencies/exact1.c
  • +3 -2
    gplugin/tests/versioned-dependencies/exact2.c
  • +3 -2
    gplugin/tests/versioned-dependencies/fez.c
  • +3 -2
    gplugin/tests/versioned-dependencies/greater-equal.c
  • +3 -2
    gplugin/tests/versioned-dependencies/greater.c
  • +3 -2
    gplugin/tests/versioned-dependencies/less-equal.c
  • +3 -2
    gplugin/tests/versioned-dependencies/less.c
  • +3 -2
    gplugin/tests/versioned-dependencies/super-dependent.c
  • +3 -2
    lua/gplugin-lua-core.c
  • +2 -0
    lua/gplugin-lua-loader.c
  • +3 -2
    perl/gplugin-perl-core.c
  • +3 -2
    python/gplugin-python-core.c
  • +2 -0
    python/gplugin-python-loader.c
  • +3 -2
    tcc/gplugin-tcc-core.c
  • +2 -0
    tcc/gplugin-tcc-loader.c
  • +3 -2
    tcc/tests/plugins/basic-plugin.c
  • +3 -2
    tcc/tests/plugins/dependent.c
  • --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/.clang-format Mon Feb 10 21:43:50 2020 -0600
    @@ -0,0 +1,65 @@
    +BasedOnStyle: Mozilla
    +
    +# TODO: Consider changing to AlwaysBreak for shorter lines.
    +# TODO: This would also be more consistent with the manual formatting of
    +# TODO: functions like g_object_get(). If we use that, we could remove
    +# TODO: the "clang-format off" for gtk_widget_class_bind_template_child
    +# TODO: in gplugin-gtk/gplugin-gtk-plugin-info.c.
    +AlignAfterOpenBracket: Align
    +AlignConsecutiveAssignments: false
    +AlignConsecutiveDeclarations: false
    +#AlignConsecutiveMacros: true
    +AlignEscapedNewlines: DontAlign
    +AllowShortBlocksOnASingleLine: false
    +AllowShortCaseLabelsOnASingleLine: false
    +AllowShortFunctionsOnASingleLine: None
    +AllowShortIfStatementsOnASingleLine: false
    +AllowShortLoopsOnASingleLine: false
    +AlwaysBreakAfterReturnType: All
    +BinPackArguments: true
    +BraceWrapping:
    + AfterClass: false
    + AfterControlStatement: false
    + AfterEnum: false
    + # TODO: There are quite a few "true" here.
    + AfterFunction: false
    + AfterNamespace: false
    + AfterObjCDeclaration: false
    + # TODO: There are some "true" here. If changed, change Enum and Union.
    + AfterStruct: false
    + AfterUnion: false
    + AfterExternBlock: false
    + BeforeCatch: false
    + BeforeElse: false
    + IndentBraces: false
    + SplitEmptyFunction: true
    + SplitEmptyRecord: false
    + SplitEmptyNamespace: true
    +BreakBeforeBraces: Custom
    +ContinuationIndentWidth: 4
    +#DeriveLineEnding: false
    +DerivePointerAlignment: false
    +IncludeBlocks: Preserve
    +#IndentCaseBlocks: false
    +IndentCaseLabels: true
    +#IndentGotoLabels: false
    +IndentWidth: 4
    +IndentWrappedFunctionNames: false
    +MaxEmptyLinesToKeep: 2
    +PointerAlignment: Right
    +ReflowComments: true
    +SortIncludes: false
    +SpaceAfterCStyleCast: false
    +# TODO: This is roughly 50/50 with ControlStatements
    +SpaceBeforeParens: Never
    +#SpaceBeforeSquareBrackets: false
    +#SpaceInEmptyBlock: false
    +SpaceInEmptyParentheses: false
    +SpacesInCStyleCastParentheses: false
    +#SpacesInConditionalStatement: false
    +SpacesInContainerLiterals: false
    +SpacesInParentheses: false
    +SpacesInSquareBrackets: false
    +TabWidth: 4
    +#UseCRLF: false
    +UseTab: ForIndentation
    --- a/gplugin-gtk-viewer/gplugin-gtk-viewer.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin-gtk-viewer/gplugin-gtk-viewer.c Mon Feb 10 21:43:50 2020 -0600
    @@ -138,6 +138,7 @@
    /******************************************************************************
    * Main Stuff
    *****************************************************************************/
    +/* clang-format off */
    static GOptionEntry entries[] = {
    {
    "internal", 'i', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
    @@ -159,6 +160,7 @@
    NULL, 0, 0, 0, NULL, NULL, NULL,
    },
    };
    +/* clang-format on */
    gint
    main(gint argc, gchar **argv) {
    --- a/gplugin-gtk/gplugin-gtk-plugin-info.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin-gtk/gplugin-gtk-plugin-info.c Mon Feb 10 21:43:50 2020 -0600
    @@ -125,6 +125,7 @@
    g_object_unref(G_OBJECT(plugin_loader));
    }
    + /* clang-format off */
    g_object_get(G_OBJECT(plugin_info),
    "abi_version", &abi_version_uint,
    "authors", &authors,
    @@ -137,6 +138,7 @@
    "version", &version,
    "website", &website,
    NULL);
    + /* clang-format on */
    /* fanagle the plugin name */
    markup = g_markup_printf_escaped("<span font_size=\"large\" "
    @@ -266,6 +268,7 @@
    "/org/bitbucket/gplugin/gplugin-gtk/plugin-info.ui"
    );
    + /* clang-format off */
    gtk_widget_class_bind_template_child(widget_class, GPluginGtkPluginInfo, name);
    gtk_widget_class_bind_template_child(widget_class, GPluginGtkPluginInfo, version);
    gtk_widget_class_bind_template_child(widget_class, GPluginGtkPluginInfo, authors_box);
    @@ -280,6 +283,7 @@
    gtk_widget_class_bind_template_child(widget_class, GPluginGtkPluginInfo, loader);
    gtk_widget_class_bind_template_child(widget_class, GPluginGtkPluginInfo, internal);
    gtk_widget_class_bind_template_child(widget_class, GPluginGtkPluginInfo, load_on_query);
    + /* clang-format on */
    gtk_widget_class_bind_template_callback(widget_class, gplugin_gtk_plugin_info_expander_activate);
    }
    --- a/gplugin-gtk/gplugin-gtk-store.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin-gtk/gplugin-gtk-store.c Mon Feb 10 21:43:50 2020 -0600
    @@ -76,10 +76,12 @@
    GString *str = g_string_new("");
    gchar *name = NULL, *summary = NULL;
    + /* clang-format off */
    g_object_get(G_OBJECT(info),
    "name", &name,
    "summary", &summary,
    NULL);
    + /* clang-format on */
    g_string_append_printf(str, "<b>%s</b>\n",
    (name) ? name : "<i>Unnamed</i>");
    --- a/gplugin/gplugin-native-loader.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/gplugin-native-loader.c Mon Feb 10 21:43:50 2020 -0600
    @@ -226,6 +226,7 @@
    g_object_ref_sink(G_OBJECT(info));
    /* now create the actual plugin instance */
    + /* clang-format off */
    plugin = g_object_new(GPLUGIN_TYPE_NATIVE_PLUGIN,
    "module", module,
    "info", info,
    @@ -234,6 +235,7 @@
    "loader", loader,
    "filename", filename,
    NULL);
    + /* clang-format on */
    /* now that the plugin instance owns the info, remove our ref */
    g_object_unref(G_OBJECT(info));
    --- a/gplugin/gplugin-options.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/gplugin-options.c Mon Feb 10 21:43:50 2020 -0600
    @@ -51,6 +51,7 @@
    return TRUE;
    }
    +/* clang-format off */
    static GOptionEntry entries[] = {
    {
    "no-default-paths", 'D', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
    @@ -65,6 +66,7 @@
    NULL, 0, 0, 0, NULL, NULL, NULL
    },
    };
    +/* clang-format on */
    static gboolean
    gplugin_options_post_parse_cb(G_GNUC_UNUSED GOptionContext *ctx,
    --- a/gplugin/gplugin-plugin-info.h Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/gplugin-plugin-info.h Mon Feb 10 21:43:50 2020 -0600
    @@ -40,13 +40,13 @@
    gpointer reserved[4];
    };
    +/* clang-format off */
    #define gplugin_plugin_info_new(id, abi_version, ...) \
    - GPLUGIN_PLUGIN_INFO( \
    - g_object_new(GPLUGIN_TYPE_PLUGIN_INFO, \
    - "id", (id), \
    - "abi-version", (abi_version), \
    - __VA_ARGS__) \
    - )
    + GPLUGIN_PLUGIN_INFO(g_object_new(GPLUGIN_TYPE_PLUGIN_INFO, \
    + "id", (id), \
    + "abi-version", (abi_version), \
    + __VA_ARGS__))
    +/* clang-format on */
    const gchar *gplugin_plugin_info_get_id(GPluginPluginInfo *info);
    guint32 gplugin_plugin_info_get_abi_version(GPluginPluginInfo *info);
    --- a/gplugin/gplugin-query.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/gplugin-query.c Mon Feb 10 21:43:50 2020 -0600
    @@ -130,6 +130,7 @@
    header_output = TRUE;
    }
    + /* clang-format off */
    g_object_get(G_OBJECT(info),
    "abi-version", &abi_version,
    "load-on-query", &loq,
    @@ -146,6 +147,7 @@
    "website", &website,
    "dependencies", &dependencies,
    NULL);
    + /* clang-format on */
    if(!first)
    printf("\n");
    @@ -246,6 +248,7 @@
    /******************************************************************************
    * Main Stuff
    *****************************************************************************/
    +/* clang-format off */
    static GOptionEntry entries[] = {
    {
    "internal", 'i', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
    @@ -271,6 +274,7 @@
    NULL, 0, 0, 0, NULL, NULL, NULL,
    }
    };
    +/* clang-format on */
    gint
    main(gint argc, gchar **argv) {
    --- a/gplugin/tests/bind-local/bind-local.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/bind-local/bind-local.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/bind-local",
    0x04030201,
    "bind-local", TRUE,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/dynamic-type/dynamic-type-user.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/dynamic-type/dynamic-type-user.c Mon Feb 10 21:43:50 2020 -0600
    @@ -29,12 +29,13 @@
    NULL
    };
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/dynamic-type-user",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    "dependencies", dependencies,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/id-collision/id-collision1.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/id-collision/id-collision1.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/id-collision",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    "name", "first",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/id-collision/id-collision2.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/id-collision/id-collision2.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/id-collision",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    "name", "second",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/load-on-query-fail/load-on-query-fail.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/load-on-query-fail/load-on-query-fail.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/load-on-query-fail",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    "load-on-query", TRUE,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/load-on-query-pass/load-on-query-pass.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/load-on-query-pass/load-on-query-pass.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/load-on-query",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    "load-on-query", TRUE,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/plugins/basic-plugin.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/plugins/basic-plugin.c Mon Feb 10 21:43:50 2020 -0600
    @@ -25,6 +25,7 @@
    NULL
    };
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/native-basic-plugin",
    0x01020304,
    @@ -36,8 +37,8 @@
    "description", "description",
    "authors", authors,
    "website", "website",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/plugins/broken-dependent-plugin.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/plugins/broken-dependent-plugin.c Mon Feb 10 21:43:50 2020 -0600
    @@ -25,12 +25,13 @@
    NULL
    };
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/broken-dependent-native-plugin",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    "dependencies", dependencies,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/plugins/dependent-plugin.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/plugins/dependent-plugin.c Mon Feb 10 21:43:50 2020 -0600
    @@ -26,12 +26,13 @@
    NULL
    };
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/native-dependent-plugin",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    "dependencies", dependencies,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/plugins/load-exception.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/plugins/load-exception.c Mon Feb 10 21:43:50 2020 -0600
    @@ -23,8 +23,7 @@
    return gplugin_plugin_info_new(
    "gplugin/native-load-exception",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    - NULL
    - );
    + NULL);
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/test-plugin-info.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/test-plugin-info.c Mon Feb 10 21:43:50 2020 -0600
    @@ -86,6 +86,7 @@
    const gchar * const r_authors[] = { "author", NULL };
    const gchar * const r_dependencies[] = { "dependency", NULL };
    + /* clang-format off */
    info = g_object_new(GPLUGIN_TYPE_PLUGIN_INFO,
    "id", "gplugin-test/plugin-info-test",
    "abi_version", GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    @@ -104,11 +105,12 @@
    "help", "help",
    "website", "website",
    "dependencies", r_dependencies,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    g_assert_true(GPLUGIN_IS_PLUGIN_INFO(info));
    + /* clang-format off */
    g_object_get(G_OBJECT(info),
    "id", &id,
    "abi_version", &abi_version,
    @@ -127,8 +129,8 @@
    "help", &help,
    "website", &website,
    "dependencies", &dependencies,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    test_string(id, "gplugin-test/plugin-info-test");
    test_uint(abi_version, GPLUGIN_NATIVE_PLUGIN_ABI_VERSION);
    @@ -161,10 +163,12 @@
    g_assert_true(GPLUGIN_IS_PLUGIN_INFO(info));
    + /* clang-format off */
    g_object_get(G_OBJECT(info),
    "id", &id,
    "abi-version", &abi_version,
    NULL);
    + /* clang-format on */
    test_string(id, "empty");
    test_uint(abi_version, 1);
    @@ -185,6 +189,7 @@
    const gchar * const r_authors[] = { "author", NULL };
    const gchar * const r_dependencies[] = { "dependency", NULL };
    + /* clang-format off */
    info = gplugin_plugin_info_new(
    "gplugin-test/plugin-info-test",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    @@ -203,11 +208,12 @@
    "help", "help",
    "website", "website",
    "dependencies", r_dependencies,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    g_assert_true(GPLUGIN_IS_PLUGIN_INFO(info));
    + /* clang-format off */
    g_object_get(G_OBJECT(info),
    "id", &id,
    "abi_version", &abi_version,
    @@ -226,8 +232,8 @@
    "help", &help,
    "website", &website,
    "dependencies", &dependencies,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    test_string(id, "gplugin-test/plugin-info-test");
    test_uint(abi_version, GPLUGIN_NATIVE_PLUGIN_ABI_VERSION);
    --- a/gplugin/tests/versioned-dependencies/bar.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/versioned-dependencies/bar.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/bar",
    0x04030201,
    "version", "2.0",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/versioned-dependencies/baz.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/versioned-dependencies/baz.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/baz",
    0x04030201,
    "version", "2.0",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/versioned-dependencies/exact1.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/versioned-dependencies/exact1.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/test-exact1",
    0x04030201,
    "version", "1.0",
    - NULL
    - );
    + NULL;
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/versioned-dependencies/exact2.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/versioned-dependencies/exact2.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/test-exact2",
    0x04030201,
    "version", "1.0",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/versioned-dependencies/fez.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/versioned-dependencies/fez.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/fez",
    0x04030201,
    "version", "1.8",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/versioned-dependencies/greater-equal.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/versioned-dependencies/greater-equal.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/test-greater-equal",
    0x04030201,
    "version", "2.0",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/versioned-dependencies/greater.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/versioned-dependencies/greater.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/test-greater",
    0x04030201,
    "version", "2.0",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/versioned-dependencies/less-equal.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/versioned-dependencies/less-equal.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/test-less-equal",
    0x04030201,
    "version", "1.0",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/versioned-dependencies/less.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/versioned-dependencies/less.c Mon Feb 10 21:43:50 2020 -0600
    @@ -20,12 +20,13 @@
    G_MODULE_EXPORT GPluginPluginInfo *
    gplugin_query(G_GNUC_UNUSED GError **error) {
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/test-less",
    0x04030201,
    "version", "0.9",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/gplugin/tests/versioned-dependencies/super-dependent.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/gplugin/tests/versioned-dependencies/super-dependent.c Mon Feb 10 21:43:50 2020 -0600
    @@ -34,13 +34,14 @@
    NULL
    };
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/super-dependent",
    0x04030201,
    "name", "super dependent",
    "dependencies", dependencies,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/lua/gplugin-lua-core.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/lua/gplugin-lua-core.c Mon Feb 10 21:43:50 2020 -0600
    @@ -31,6 +31,7 @@
    NULL
    };
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/lua-loader",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    @@ -45,8 +46,8 @@
    "authors", authors,
    "website", GPLUGIN_WEBSITE,
    "category", "loaders",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/lua/gplugin-lua-loader.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/lua/gplugin-lua-loader.c Mon Feb 10 21:43:50 2020 -0600
    @@ -131,12 +131,14 @@
    info = lua_touserdata(L, -1);
    lua_pop(L, 1);
    + /* clang-format off */
    plugin = g_object_new(GPLUGIN_LUA_TYPE_PLUGIN,
    "filename", filename,
    "loader", loader,
    "lua-state", L,
    "info", info,
    NULL);
    + /* clang-format on */
    return plugin;
    }
    --- a/perl/gplugin-perl-core.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/perl/gplugin-perl-core.c Mon Feb 10 21:43:50 2020 -0600
    @@ -28,6 +28,7 @@
    NULL,
    };
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/perl-loader",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    @@ -42,8 +43,8 @@
    "authors", authors,
    "website", GPLUGIN_WEBSITE,
    "category", "loaders",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/python/gplugin-python-core.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/python/gplugin-python-core.c Mon Feb 10 21:43:50 2020 -0600
    @@ -30,6 +30,7 @@
    NULL
    };
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/python-loader",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    @@ -44,8 +45,8 @@
    "authors", authors,
    "website", GPLUGIN_WEBSITE,
    "category", "loaders",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/python/gplugin-python-loader.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/python/gplugin-python-loader.c Mon Feb 10 21:43:50 2020 -0600
    @@ -169,6 +169,7 @@
    info = pygobject_get(pyinfo);
    /* now that we have everything, create the plugin */
    + /* clang-format off */
    plugin = g_object_new(GPLUGIN_PYTHON_TYPE_PLUGIN,
    "filename", filename,
    "loader", loader,
    @@ -177,6 +178,7 @@
    "load-func", load,
    "unload-func", unload,
    NULL);
    + /* clang-format on */
    Py_DECREF(pyinfo);
    Py_DECREF(module);
    --- a/tcc/gplugin-tcc-core.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/tcc/gplugin-tcc-core.c Mon Feb 10 21:43:50 2020 -0600
    @@ -31,6 +31,7 @@
    NULL
    };
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/tcc-loader",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    @@ -44,8 +45,8 @@
    "authors", authors,
    "website", GPLUGIN_WEBSITE,
    "category", "loaders",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/tcc/gplugin-tcc-loader.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/tcc/gplugin-tcc-loader.c Mon Feb 10 21:43:50 2020 -0600
    @@ -98,6 +98,7 @@
    return NULL;
    }
    + /* clang-format off */
    plugin = g_object_new(GPLUGIN_TCC_TYPE_PLUGIN,
    "filename", filename,
    "loader", loader,
    @@ -105,6 +106,7 @@
    "memory", memneeded,
    "info", info,
    NULL);
    + /* clang-format on */
    return plugin;
    }
    --- a/tcc/tests/plugins/basic-plugin.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/tcc/tests/plugins/basic-plugin.c Mon Feb 10 21:43:50 2020 -0600
    @@ -24,6 +24,7 @@
    NULL
    };
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/native-basic-plugin",
    0x01020304,
    @@ -35,8 +36,8 @@
    "description", "description",
    "authors", authors,
    "website", "website",
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean
    --- a/tcc/tests/plugins/dependent.c Mon Feb 10 02:28:15 2020 -0600
    +++ b/tcc/tests/plugins/dependent.c Mon Feb 10 21:43:50 2020 -0600
    @@ -25,12 +25,13 @@
    NULL
    };
    + /* clang-format off */
    return gplugin_plugin_info_new(
    "gplugin/native-dependent-plugin",
    GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    "dependencies", dependencies,
    - NULL
    - );
    + NULL);
    + /* clang-format on */
    }
    G_MODULE_EXPORT gboolean