Skip to content

Fix WebSocket.h declaration indentation and include-guard naming consistency - #28

Merged
mrjimenez merged 2 commits into
masterfrom
copilot/fix-indentation-in-websocket-h
Jun 9, 2026
Merged

Fix WebSocket.h declaration indentation and include-guard naming consistency#28
mrjimenez merged 2 commits into
masterfrom
copilot/fix-indentation-in-websocket-h

Conversation

Copilot AI commented Jun 9, 2026

Copy link
Copy Markdown

Summary

This PR applies the requested header hygiene fixes in src/webserver/src/WebSocket.h: one class member declaration had inconsistent indentation, and the trailing include-guard comment referenced WEBSERVER_H instead of WEBSOCKET_H. The changes are formatting/consistency-only and keep behavior unchanged.

  • Header consistency updates
    • Aligned OnRequestReceived(...) indentation with neighboring public members (tab-based class indentation).
    • Updated closing guard comment to match the file’s guard macro name.
// before
        void OnRequestReceived(char* pHeader, char* pData, uint32 dwDataLen);
...
#endif //WEBSERVER_H

// after
		void OnRequestReceived(char* pHeader, char* pData, uint32 dwDataLen);
...
#endif //WEBSOCKET_H

Test plan

Not applicable for runtime behavior (non-functional header formatting/comment consistency change only).

Original prompt
Please apply the following diffs and create a pull request.
Once the PR is ready, give it a title based on the messages of the fixes being applied.

[{"message":"The indentation for this function declaration is inconsistent with the rest of the class members. All other public member functions use a single tab for indentation, but this line appears to use spaces or a different indentation level.","fixFiles":[{"filePath":"src/webserver/src/WebSocket.h","diff":"diff --git a/src/webserver/src/WebSocket.h b/src/webserver/src/WebSocket.h\n--- a/src/webserver/src/WebSocket.h\n+++ b/src/webserver/src/WebSocket.h\n@@ -43,7 +43,7 @@\n \t\tvirtual void OnReceive(int);\n \t\tvirtual void OnLost(int);\n \n-        void OnRequestReceived(char* pHeader, char* pData, uint32 dwDataLen);\n+\t\tvoid OnRequestReceived(char* pHeader, char* pData, uint32 dwDataLen);\n \n \t\tvoid SendContent(const char* szStdResponse, const void* pContent, uint32 dwContentSize);\n \t\tvoid SendData(const void* pData, uint32 dwDataSize);\n"}]},{"message":"The include guard macro name is inconsistent with the header file name. The file is named `WebSocket.h` but the guard macro is `WEBSERVER_H`. This should be `WEBSOCKET_H` to match the file name and avoid potential conflicts if a `WebServer.h` file exists.","fixFiles":[{"filePath":"src/webserver/src/WebSocket.h","diff":"diff --git a/src/webserver/src/WebSocket.h b/src/webserver/src/WebSocket.h\n--- a/src/webserver/src/WebSocket.h\n+++ b/src/webserver/src/WebSocket.h\n@@ -73,5 +73,5 @@\n \t\tuint32 m_dwHttpContentLen;\n };\n \n-#endif //WEBSERVER_H\n+#endif //WEBSOCKET_H\n // File_checked_for_headers\n"}]}]

Copilot AI changed the title [WIP] Fix inconsistent indentation in WebSocket.h Fix WebSocket.h declaration indentation and include-guard naming consistency Jun 9, 2026
Copilot AI requested a review from mrjimenez June 9, 2026 00:43
@mrjimenez
mrjimenez marked this pull request as ready for review June 9, 2026 00:51

@mrjimenez mrjimenez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trivial change, ok.

@mrjimenez
mrjimenez merged commit 7d78c0b into master Jun 9, 2026
20 checks passed
@mrjimenez
mrjimenez deleted the copilot/fix-indentation-in-websocket-h branch June 9, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants