cargo publish
should warn if it fails to detect a README
#15154
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-package
Command-publish
S-triage
Status: This issue is waiting on initial triage.
Problem
I often
cargo publish
an initial version of a crate without a README... by accident. This is because my naming convention for README files doesn't match what Cargo expects. (I'll open a second bug to ask about whether my convention is common enough to support, but, that's a different matter.)I always run
cargo publish -n
first and check for warnings. Cargo is very consistent about warning about missingrepository
,documentation
,license
, and other fields, but does not warn if it can't find a README file and none is specified in theCargo.toml
.Proposed Solution
I'd like to include the
readme
in the list of fields thatcargo publish
warns about. (This list appears to be specific topublish
, from the source code.) It would be important for this check to be performed after readme autodetection, so that users who have a README namedREADME.md
don't get hassled --- only those of us withREADME.somethingelse
.If there's a real use case for publishing (not packaging!) crates without a README, and people want to do that without a warning, then this might not make sense without a way to suppress the warning.
Notes
In case you're curious, my convention is
README.mkdn
. But that's not really material for this report.The text was updated successfully, but these errors were encountered: