Function version_sync::check_markdown_deps
[−]
[src]
pub fn check_markdown_deps(
path: &str,
pkg_name: &str,
pkg_version: &str
) -> Result<(), String>
Check dependencies in Markdown code blocks.
This function finds all TOML code blocks in path and looks for
dependencies on pkg_name in those blocks. A code block fails the
check if it has a dependency on pkg_name that doesn't match
pkg_version, or if it has no dependency on pkg_name at all.
Code blocks also fails the check if they cannot be parsed as TOML.
Errors
If any block fails the check, an Err is returned with a succinct
error message. Status information has then already been printed on
stdout.