Function check_versions::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 failed the check, an Err
is returned that can be
used to make a test fail or pass.