Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: factor-out repetitive documentation #394

Merged
merged 5 commits into from
Nov 5, 2024
Merged

doc: factor-out repetitive documentation #394

merged 5 commits into from
Nov 5, 2024

Conversation

Totodore
Copy link
Owner

@Totodore Totodore commented Nov 4, 2024

Motivation

Currently, the documentation for all the operators is duplicated multiple times in the codebase for the different methods in Socket, ConfOperators, BroadcastOperators, and SocketIo. This duplication makes the documentation difficult to maintain, as updates must be made in every instance.

I will also work on improving the documentation style by removing third-person verbs and consistently writing documentation in the imperative mood (e.g., "Get a socket ID" instead of "Gets a socket ID").

Solution

  • Factor out the documentation for these functions into external .md files and use #[doc = include_str!("path")] to include the corresponding documentation files.
  • Enhance the documentation by adding more examples and establishing stable style guidelines (both visual and grammatical).

@Totodore Totodore added the documentation Improvements or additions to documentation label Nov 4, 2024
@Totodore Totodore self-assigned this Nov 4, 2024
@Totodore Totodore marked this pull request as ready for review November 5, 2024 17:27
@Totodore Totodore merged commit 9a58244 into main Nov 5, 2024
14 checks passed
@Totodore Totodore deleted the doc-fix branch November 5, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant