lordgamez commented on a change in pull request #1089: URL: https://github.com/apache/nifi-minifi-cpp/pull/1089#discussion_r642539333
########## File path: extensions/coap/tests/CoapC2VerifyHeartbeat.cpp ########## @@ -152,8 +152,7 @@ class VerifyCoAPServer : public CoapIntegrationBase { minifi::coap::CoapResponse resp(500, 0, 0);; responses.try_dequeue(resp); return resp; - } - else { + } else { Review comment: Minor: The else branch could be removed altogether because of the early return above. ########## File path: extensions/windows-event-log/CollectorInitiatedSubscription.cpp ########## @@ -285,8 +284,7 @@ bool CollectorInitiatedSubscription::checkSubscriptionRuntimeStatus() { LOG_SUBSCRIPTION_WINDOWS_ERROR("EcGetObjectArrayProperty"); return false; } - } - else { + } else { Review comment: Minor: This could also be removed. ########## File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp ########## @@ -127,8 +129,8 @@ core::Property ConsumeWindowsEventLog::EventHeaderDelimiter( core::Property ConsumeWindowsEventLog::EventHeader( core::PropertyBuilder::createProperty("Event Header")-> isRequired(false)-> - withDefaultValue("LOG_NAME=Log Name, SOURCE = Source, TIME_CREATED = Date,EVENT_RECORDID=Record ID,EVENTID = Event ID,TASK_CATEGORY = Task Category,LEVEL = Level,KEYWORDS = Keywords,USER = User,COMPUTER = Computer, EVENT_TYPE = EventType")-> - withDescription("Comma seperated list of key/value pairs with the following keys LOG_NAME, SOURCE, TIME_CREATED,EVENT_RECORDID,EVENTID,TASK_CATEGORY,LEVEL,KEYWORDS,USER,COMPUTER, and EVENT_TYPE. Eliminating fields will remove them from the header.")-> + withDefaultValue("LOG_NAME=Log Name, SOURCE = Source, TIME_CREATED = Date,EVENT_RECORDID=Record ID,EVENTID = Event ID,TASK_CATEGORY = Task Category,LEVEL = Level,KEYWORDS = Keywords,USER = User,COMPUTER = Computer, EVENT_TYPE = EventType")-> // NOLINT linelength + withDescription("Comma seperated list of key/value pairs with the following keys LOG_NAME, SOURCE, TIME_CREATED,EVENT_RECORDID,EVENTID,TASK_CATEGORY,LEVEL,KEYWORDS,USER,COMPUTER, and EVENT_TYPE. Eliminating fields will remove them from the header.")-> // NOLINT linelength Review comment: Could we rather split it in multiple lines? ########## File path: extensions/windows-event-log/Bookmark.cpp ########## @@ -171,7 +179,7 @@ bool Bookmark::getBookmarkXmlFromFile(std::wstring& bookmarkXml) { return false; } - // Generically is not efficient, but bookmarkXML is small ~100 bytes. + // Generically is not efficient, but bookmarkXML is small ~100 bytes. Review comment: Minor: I think this was meant to be "Generally" not "Generically" ########## File path: extensions/windows-event-log/wel/WindowsEventLog.cpp ########## @@ -53,8 +56,7 @@ void WindowsEventLogMetadataImpl::renderMetadata() { return; } EvtRender(context, event_ptr_, EvtRenderEventValues, dwBufferSize, rendered_values.get(), &dwBufferUsed, &dwPropertyCount); - } - else { + } else { return; } Review comment: I would refactor this part to something like this: ```c++ if (!EvtRender(context, event_ptr_, EvtRenderEventValues, dwBufferSize, rendered_values.get(), &dwBufferUsed, &dwPropertyCount)) { if (ERROR_INSUFFICIENT_BUFFER != (status = GetLastError())) { return; } dwBufferSize = dwBufferUsed; rendered_values.reset((PEVT_VARIANT)(malloc(dwBufferSize))); if (!rendered_values) { return; } EvtRender(context, event_ptr_, EvtRenderEventValues, dwBufferSize, rendered_values.get(), &dwBufferUsed, &dwPropertyCount); if (ERROR_SUCCESS != (status = GetLastError())) { return; } } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org