From f5cdf5cc7c3bd434ff7a88c73b33f96c4d3b6562 Mon Sep 17 00:00:00 2001 From: Weicao-CatilGrass <1992414357@qq.com> Date: Sat, 9 May 2026 14:31:42 +0800 Subject: Add CI tooling and cargo alias `ci` --- dev_tools/src/bin/docs-code-box-fix.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'dev_tools/src/bin/docs-code-box-fix.rs') diff --git a/dev_tools/src/bin/docs-code-box-fix.rs b/dev_tools/src/bin/docs-code-box-fix.rs index db97592..21d2cce 100644 --- a/dev_tools/src/bin/docs-code-box-fix.rs +++ b/dev_tools/src/bin/docs-code-box-fix.rs @@ -1,6 +1,8 @@ use std::fs; use std::path::Path; +use tools::println_cargo_style; + /// Docsify code blocks require that blank lines before and after code blocks are not completely empty, /// but must contain at least one space, otherwise code block rendering will have issues. /// @@ -9,7 +11,7 @@ use std::path::Path; const DOCS_DIR: &str = "./docs"; fn main() { - println!("Fixing code box empty lines in docs/**/*.md ..."); + println_cargo_style!("Fixing: code box empty lines in docs/**/*.md ..."); let repo_root = find_git_repo().expect("Cannot find git repo root"); let docs_dir = repo_root.join(DOCS_DIR); @@ -32,15 +34,16 @@ fn main() { let new_content = fix_code_box_empty_lines(&content); if new_content != content { fs::write(path, &new_content).unwrap(); - println!(" Fixed: {}", path.display()); + println_cargo_style!("Fixed: {}", path.display()); fixed_count += 1; } file_count += 1; }); - println!( - "Done. Scanned {} files, fixed {} files.", - file_count, fixed_count + println_cargo_style!( + "Done: Scanned {} files, fixed {} files.", + file_count, + fixed_count ); } -- cgit