CosmWasm / docs

https://cosmwasm-docs.vercel.app
Apache License 2.0
1 stars 2 forks source link

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

Closed aumetra closed 2 weeks ago

aumetra commented 2 weeks ago

Follow-up to https://github.com/CosmWasm/docs/pull/57#discussion_r1648851578

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)