Consider adding a checklist / lints of best practices #4095
Labels
A-diagnostics
Area: Error and warning messages generated by Cargo itself.
S-needs-mentor
Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.
Right now there are several checks done by
cargo publish
. Unfortunately there isn't a concise list of the necessary requirements for publishing a crate. The only way to tell iscargo publish
orcargo publish --dry-run
. The latter is harder to discover. And once you detect and error, it could take a while to fix (like if you're using unversioned dependencies).There are also higher-level best-practices that could be described to the user that they should follow. Ideally all of these would be checkable via lints within cargo itself. Some examples:
use_*
feature where*
is an existing crate name with underscores (from this issue)std
feature if this crate could expose functionality that made sense in ano_std
environment.Ideally this would be something that would be part of the publishing process for the first version of a crate and then could also be part of
cargo publish --dry-run
as a check in the future. I don't know ifcargo checklist
is a good name for this or it could all be contained within thecargo publish
command.The text was updated successfully, but these errors were encountered: