MCPcopy Create free account
hub / github.com/PerroEngine/Perro / newest_mtime

Function newest_mtime

perro_website/build.rs:171–198  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

169 format!("docs validation failed:\n{}", failures.join("\n")),
170 ))
171 }
172}
173
174fn validate_generated_target(
175 source: &DocOut,
176 target: &str,
177 routes: &std::collections::BTreeMap<&str, &DocOut>,
178 failures: &mut Vec<String>,
179) {
180 if target.starts_with("http://")
181 || target.starts_with("https://")
182 || target.starts_with("mailto:")
183 {
184 return;
185 }
186 if target.contains("://") {
187 failures.push(format!("{} has malformed URL {target}", source.route_path));
188 return;
189 }
190
191 let (path, fragment) = match target.split_once('#') {
192 Some(("", fragment)) => (source.route_path.as_str(), Some(fragment)),
193 Some((path, fragment)) => (path, Some(fragment)),
194 None => (target, None),
195 };
196 if !path.starts_with("/docs") && !path.starts_with("/book") {
197 return;
198 }
199 let Some(target_doc) = routes.get(path).copied() else {
200 failures.push(format!(
201 "{} links to missing route {path}",

Callers 2

needs_demo_rebuildFunction · 0.85
newest_demo_input_mtimeFunction · 0.85

Calls 3

read_dirFunction · 0.85
okMethod · 0.80
pathMethod · 0.45

Tested by

no test coverage detected