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

Require documentation for non Public-APIs as well #6023

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Nigusu-Allehu
Copy link
Contributor

@Nigusu-Allehu Nigusu-Allehu commented Sep 11, 2024

Bug

Fixes:

Description

This PR updates our documentation guidelines to improve code clarity and maintainability:

Non-Public Methods:

  • Documentation is required for non-public methods longer than 15 lines or those with complex logic.
  • Methods shorter than 15 lines but with intricate logic must also be documented.

Benefits:

  • Enhances code clarity and maintainability.
  • Reduces ambiguity and aids future developers.
  • Makes code review process faster
  • Encourages code reviewing by making the changes more clearer

Draw backs:

  • Documentation overhead

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@Nigusu-Allehu Nigusu-Allehu requested a review from a team as a code owner September 11, 2024 22:05
@Nigusu-Allehu
Copy link
Contributor Author

Please feel free to discuss what you think. This is just an idea I had after meeting some, in order to understand, time taking/ complex private methods. I understand this could also result in a documentation overhead. However, I believe the benefit might out weight it.

@Nigusu-Allehu Nigusu-Allehu self-assigned this Sep 11, 2024
@Nigusu-Allehu
Copy link
Contributor Author

After some discussion with @kartheekp-ms :
While documenting complex private methods is useful, it often highlights the need for refactoring. Complex methods should be broken down into simpler, more manageable pieces.

Instead of focusing just on documentation, let's aim to write methods that are clear from the start. This could be done through good naming and refactoring.

@dotnet-policy-service dotnet-policy-service bot added the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Sep 19, 2024
Copy link
Contributor

This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant