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

WIP: Functions comments #5

Open
wants to merge 1 commit into
base: create-cadence-style-guide
Choose a base branch
from

Conversation

alilloig
Copy link
Contributor

@alilloig alilloig commented Jul 28, 2022

Closes: #4

Description

Discussion about the guidelines on how to comment functions


For contributor use:

  • Targeted PR against create-cadence-style-guide branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@alilloig alilloig added the SC-Eng Issues that we want to see surfaced in SC-Eng ZH Board label Jul 28, 2022
@alilloig alilloig self-assigned this Jul 28, 2022
@@ -34,6 +34,11 @@ Comments are a vital part of smart contracts, allowing users to easily understan
### High level documentation at the begining of files (contracts, transactions and scripts)
Top Level comments and comments for types, fields, events, and functions should use `///` (three slashes) because [the cadence docs generating tool](https://github.com/onflow/cadence/tree/master/tools/docgen) picks up three slash comments to auto-generate docs.
### Commenting functions
Functions should be commented with a:
Copy link
Member

Choose a reason for hiding this comment

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

Best to mention the documentation comments should follow the format the documentation generator supports: https://pkg.go.dev/github.com/onflow/cadence/tools/docgen#readme-documentation-comments-format.

Of course, we can also adjust/refine that format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SC-Eng Issues that we want to see surfaced in SC-Eng ZH Board
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants