From 8a4b0dbd4ead36b9fd6a654073966ce9ebe6d44f Mon Sep 17 00:00:00 2001 From: Dom Del Nano Date: Tue, 16 Jan 2024 17:21:18 +0000 Subject: [PATCH] Fix linting issues Signed-off-by: Dom Del Nano --- .../amqp/amqp_code_generator/amqp_code_gen.py | 2 +- .../gen_templates/decode.h.jinja_template | 2 +- .../socket_tracer/protocols/amqp/decode.h | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/stirling/source_connectors/socket_tracer/protocols/amqp/amqp_code_generator/amqp_code_gen.py b/src/stirling/source_connectors/socket_tracer/protocols/amqp/amqp_code_generator/amqp_code_gen.py index 409843bdc31..43a4ba5d940 100644 --- a/src/stirling/source_connectors/socket_tracer/protocols/amqp/amqp_code_generator/amqp_code_gen.py +++ b/src/stirling/source_connectors/socket_tracer/protocols/amqp/amqp_code_generator/amqp_code_gen.py @@ -125,7 +125,7 @@ def gen_json_builder(self): The field name is used as json key to be close to the key used in spec """ if self.field_type == FieldType.table: - return f"// TODO: support KV for {self.field_name} field table type" + return f"// TODO(vsrivatsa): support KV for {self.field_name} field table type" return f'builder->WriteKV("{self.c_field_name}", {self.c_field_name});' def gen_buffer_extract(self): diff --git a/src/stirling/source_connectors/socket_tracer/protocols/amqp/amqp_code_generator/gen_templates/decode.h.jinja_template b/src/stirling/source_connectors/socket_tracer/protocols/amqp/amqp_code_generator/gen_templates/decode.h.jinja_template index 09ecf540de8..b16d5ad8620 100644 --- a/src/stirling/source_connectors/socket_tracer/protocols/amqp/amqp_code_generator/gen_templates/decode.h.jinja_template +++ b/src/stirling/source_connectors/socket_tracer/protocols/amqp/amqp_code_generator/gen_templates/decode.h.jinja_template @@ -39,7 +39,7 @@ std::string ToString(T obj) { obj.ToJSON(&json_object_builder); return json_object_builder.GetString(); } -// TODO combine with kafka ToString function +// TODO(vsrivatsa) combine with kafka ToString function Status ProcessPayload(Frame* req, BinaryDecoder* decoder); diff --git a/src/stirling/source_connectors/socket_tracer/protocols/amqp/decode.h b/src/stirling/source_connectors/socket_tracer/protocols/amqp/decode.h index dbb59188aaf..fd7c315ce71 100644 --- a/src/stirling/source_connectors/socket_tracer/protocols/amqp/decode.h +++ b/src/stirling/source_connectors/socket_tracer/protocols/amqp/decode.h @@ -41,7 +41,7 @@ struct AMQPConnectionStart { void ToJSON(utils::JSONObjectBuilder* builder) const { builder->WriteKV("version_major", version_major); builder->WriteKV("version_minor", version_minor); - // TODO: support KV for server-properties field table type + // TODO(vsrivatsa): support KV for server-properties field table type builder->WriteKV("mechanisms", mechanisms); builder->WriteKV("locales", locales); } @@ -55,7 +55,7 @@ struct AMQPConnectionStartOk { bool synchronous = 1; void ToJSON(utils::JSONObjectBuilder* builder) const { - // TODO: support KV for client-properties field table type + // TODO(vsrivatsa): support KV for client-properties field table type builder->WriteKV("mechanism", mechanism); builder->WriteKV("response", response); builder->WriteKV("locale", locale); @@ -241,7 +241,7 @@ struct AMQPExchangeDeclare { builder->WriteKV("reserved_2", reserved_2); builder->WriteKV("reserved_3", reserved_3); builder->WriteKV("no_wait", no_wait); - // TODO: support KV for arguments field table type + // TODO(vsrivatsa): support KV for arguments field table type } }; @@ -302,7 +302,7 @@ struct AMQPQueueDeclare { builder->WriteKV("exclusive", exclusive); builder->WriteKV("auto_delete", auto_delete); builder->WriteKV("no_wait", no_wait); - // TODO: support KV for arguments field table type + // TODO(vsrivatsa): support KV for arguments field table type } }; @@ -334,7 +334,7 @@ struct AMQPQueueBind { builder->WriteKV("exchange", exchange); builder->WriteKV("routing_key", routing_key); builder->WriteKV("no_wait", no_wait); - // TODO: support KV for arguments field table type + // TODO(vsrivatsa): support KV for arguments field table type } }; @@ -357,7 +357,7 @@ struct AMQPQueueUnbind { builder->WriteKV("queue", queue); builder->WriteKV("exchange", exchange); builder->WriteKV("routing_key", routing_key); - // TODO: support KV for arguments field table type + // TODO(vsrivatsa): support KV for arguments field table type } }; @@ -464,7 +464,7 @@ struct AMQPBasicConsume { builder->WriteKV("no_ack", no_ack); builder->WriteKV("exclusive", exclusive); builder->WriteKV("no_wait", no_wait); - // TODO: support KV for arguments field table type + // TODO(vsrivatsa): support KV for arguments field table type } }; @@ -651,7 +651,7 @@ struct AMQPBasicContentHeader { builder->WriteKV("property_flags", property_flags); builder->WriteKV("content_type", content_type); builder->WriteKV("content_encoding", content_encoding); - // TODO: support KV for headers field table type + // TODO(vsrivatsa): support KV for headers field table type builder->WriteKV("delivery_mode", delivery_mode); builder->WriteKV("priority", priority); builder->WriteKV("correlation_id", correlation_id); @@ -719,7 +719,7 @@ std::string ToString(T obj) { obj.ToJSON(&json_object_builder); return json_object_builder.GetString(); } -// TODO combine with kafka ToString function +// TODO(vsrivatsa) combine with kafka ToString function Status ProcessPayload(Frame* req, BinaryDecoder* decoder); } // namespace amqp