Remove trailing colons from item label names

This is a new check added to check_typed_item_calls.py --label

Ignoring cases where item type is FT_NONE, as fpr tjpse
text was appended that otherwise would lack a colon.
This commit is contained in:
Martin Mathieson 2021-08-23 09:23:00 +01:00
parent d3392ffb55
commit d3b016a365
9 changed files with 12 additions and 10 deletions

View File

@ -8420,7 +8420,7 @@ proto_register_cip(void)
{ &hf_cip_sc_mult_serv_pack_num_services, { "Number of Services", "cip.msp.num_services", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_cip_sc_mult_serv_pack_offset, { "Offset", "cip.msp.offset", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_cip_find_next_object_max_instance, { "Maximum ID", "cip.find_next_object.max_instance", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_cip_find_next_object_num_instances, { "Number of Instances:", "cip.find_next_object.num_instances", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_cip_find_next_object_num_instances, { "Number of Instances", "cip.find_next_object.num_instances", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_cip_find_next_object_instance_item, { "Instance", "cip.find_next_object.instance", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_cip_sc_group_sync_is_sync, { "IsSynchronized", "cip.group_sync.is_sync", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_cip_data, { "Data", "cip.data", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},

View File

@ -3929,17 +3929,17 @@ proto_register_fileexp (void)
NULL, HFILL}
},
{ &hf_fileexp_setcontext_rqst_epochtime,
{ "EpochTime:", "fileexp.setcontext_rqst_epochtime",
{ "EpochTime", "fileexp.setcontext_rqst_epochtime",
FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
NULL, HFILL}
},
{ &hf_fileexp_setcontext_rqst_clientsizesattrs,
{ "ClientSizeAttrs:", "fileexp.setcontext_clientsizesattrs",
{ "ClientSizeAttrs", "fileexp.setcontext_clientsizesattrs",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{ &hf_fileexp_setcontext_rqst_parm7,
{ "Parm7:", "fileexp.setcontext.parm7",
{ "Parm7", "fileexp.setcontext.parm7",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},

View File

@ -1969,7 +1969,7 @@ proto_register_fcswils(void)
#if 0
{ &hf_swils_fspfh_cmd,
{"Command:", "swils.fspf.cmd",
{"Command", "swils.fspf.cmd",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}},
#endif

View File

@ -9364,7 +9364,7 @@ void proto_register_gtpv2(void)
FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL}
},
{&hf_gtpv2_clii,
{"CLII (Change of Location Information Indication):", "gtpv2.clii",
{"CLII (Change of Location Information Indication)", "gtpv2.clii",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL}
},
{&hf_gtpv2_cpsr,

View File

@ -12775,7 +12775,7 @@ void proto_register_rtps(void) {
},
{ &hf_rtps_coherent_set_end, {
"End of coherent set sequence:",
"End of coherent set sequence",
"rtps.coherent_set.end",
FT_UINT64,
BASE_DEC,

View File

@ -5755,7 +5755,7 @@ proto_register_tn3270(void)
NULL, HFILL }
},
{ &hf_tn3270_load_format_storage_operand,
{ "Operand:",
{ "Operand",
"tn3270.load_format_storage_operand",
FT_UINT8, BASE_HEX, VALS(vals_load_storage_format_operand), 0x0,
NULL, HFILL }

View File

@ -7418,7 +7418,7 @@ proto_register_tn5250(void)
{ &hf_tn5250_field_data,
{ "Field Data", "tn5250.field_data", FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_tn5250_reserved, { "Flags (Reserved):", "tn5250.reserved",
{ &hf_tn5250_reserved, { "Flags (Reserved)", "tn5250.reserved",
FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(vals_tn5250_reserved), 0,
NULL, HFILL }},
{ &hf_tn5250_unknown_data,

View File

@ -1498,7 +1498,7 @@ void proto_register_wreth(void)
NULL, HFILL }
},
{ &hf_Wreth_IdentificationMacAddr,
{ "Client MAC address :", "wreth.IdentClientMacAddr",
{ "Client MAC address", "wreth.IdentClientMacAddr",
FT_ETHER, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},

View File

@ -242,6 +242,8 @@ class Item:
label.count('[') != label.count(']') or
label.count('{') != label.count('}')):
print('Warning: ' + filename + ': - filter "' + filter + '" label', '"' + label + '"', 'has unbalanced parens/braces/brackets')
if item_type != 'FT_NONE' and label.endswith(':'):
print('Warning: ' + filename + ': - filter "' + filter + '" label', '"' + label + '"', 'ends with an unnecessary colon')
self.item_type = item_type
self.type_modifier = type_modifier