Skip to content

Commit

Permalink
refactor(smlfmt): add force arg
Browse files Browse the repository at this point in the history
  • Loading branch information
hougesen committed Jun 15, 2024
1 parent ca2b8eb commit 4c5ddd1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/formatters/smlfmt.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use super::execute_command;
use crate::error::MdsfError;

#[inline]
pub fn format_using_smlfmt(
file_path: &std::path::Path,
) -> Result<(bool, Option<String>), MdsfError> {
let mut cmd = std::process::Command::new("smlfmt");

cmd.arg("--force").arg(file_path);

execute_command(&mut cmd, file_path)
}

0 comments on commit 4c5ddd1

Please sign in to comment.