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

Define a documentation standard #9

Open
pors opened this issue Dec 31, 2021 · 0 comments
Open

Define a documentation standard #9

pors opened this issue Dec 31, 2021 · 0 comments

Comments

@pors
Copy link

pors commented Dec 31, 2021

As we want contracts to be read and understood as easy as possible, it would be nice to support an improved documentation system for Clarity. Think pydoc or something similar.

Proposal for a very simple and effective doc standard:

  • comments are still ;;
  • use markdown in comments
  • the comment at the top is special: what is the contract about?
  • comments above constants / variables / maps are special: what do they store?
  • comments below a (define-public or any other function is special: what is the function about?

A simple parser can then generate an HTML or markdown document that is structured:

  • Contract name (how?)
  • Description
  • Each constant / variable / map with a description
  • All functions with a description

All other comments can be read by drilling down inside functions.

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

No branches or pull requests

1 participant