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

Make sure all code examples containing an entry point use library feature #67

Closed
aumetra opened this issue Jun 21, 2024 · 0 comments · Fixed by #71
Closed

Make sure all code examples containing an entry point use library feature #67

aumetra opened this issue Jun 21, 2024 · 0 comments · Fixed by #71

Comments

@aumetra
Copy link
Member

aumetra commented Jun 21, 2024

Follow-up to #57 (comment)

We should probably enforce the convention of having a library feature in contracts by putting them explicitly into every code sample and reinforcing that this is how it should be done.

Also, as @chipshort mentioned, people will probably copy-paste from the docs a lot, so having that library feature everywhere means that they will follow best practices.


One open question is how to enforce this in CI. An idea I had was a simple CI step that greps across the extracted tests for ^#\[entry_point\] and errors out when it gets hit (something like that)

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 a pull request may close this issue.

1 participant