mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-14 20:18:39 +00:00
checkpatch: suggest to use _nm_setting_property_define_direct_*() for setting properties
We have multiple ways to define properties (like, GVariant based nm_setting_option_*() or GObject based properties). For the latter, they nowadays should all be implemented via _nm_setting_property_define_direct_*() API.
This commit is contained in:
parent
aeb2426e88
commit
3e6c18e9af
|
@ -197,6 +197,7 @@ complain ("Don't use strcmp/g_strcmp0 unless you need to sort. Consider nm_streq
|
|||
complain ("Don't use API that uses the numeric source id. Instead, use GSource and API like nm_g_idle_add(), nm_g_idle_add_source(), nm_clear_g_source_inst(), etc.") if $line =~ /\b(g_idle_add|g_idle_add_full|g_timeout_add|g_timeout_add_seconds|g_source_remove|nm_clear_g_source)\b/;
|
||||
complain ("Prefer g_snprintf() over snprintf() (for consistency)") if $line =~ /\b(snprintf)\b/;
|
||||
complain ("Avoid g_clear_pointer() and use nm_clear_pointer() (or nm_clear_g_free(), g_clear_object(), etc.)") if $line =~ /\b(g_clear_pointer)\b/;
|
||||
complain ("Define setting properties with _nm_setting_property_define_direct_*() API") if $line =~ /g_param_spec_/ and $filename =~ /\/libnm-core-impl\/nm-setting/;
|
||||
#complain ("Use spaces instead of tabs") if $line =~ /\t/;
|
||||
|
||||
# Further on we process stuff without comments.
|
||||
|
|
Loading…
Reference in a new issue