pub fn format_source(source: &str, config: &Config) -> Result<String>Expand description
Format raw CMake source using the built-in command registry.
ยงExamples
use cmakefmt::{format_source, Config};
let cmake = "CMAKE_MINIMUM_REQUIRED(VERSION 3.20)\n";
let formatted = format_source(cmake, &Config::default()).unwrap();
assert_eq!(formatted, "cmake_minimum_required(VERSION 3.20)\n");