diff --git a/CHANGES.md b/CHANGES.md index bb8191d10..bdafa022a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +0.2.1 +----- + +- Allow to set the suffix of corrected files + 0.2.0 ----- diff --git a/src/driver.ml b/src/driver.ml index b10d7a887..aeff6b9aa 100644 --- a/src/driver.ml +++ b/src/driver.ml @@ -23,6 +23,7 @@ let diff_command = ref Options.diff_command let pretty = ref false let styler = ref None let output_metadata_filename = ref None +let corrected_suffix = ref ".ppx-corrected" module Lint_error = struct type t = Location.t * string @@ -869,7 +870,7 @@ let process_file (kind : Kind.t) fn ~input_name ~output_mode ~embed_errors ~outp |> String.concat ~sep:"")); let input_contents = lazy (load_source_file fn) in - let corrected = fn ^ ".ppx-corrected" in + let corrected = fn ^ !corrected_suffix in let mismatches_found = match !corrections with | [] -> @@ -1119,6 +1120,8 @@ let standalone_args = " Same as -cookie" ; "-output-metadata", Arg.String (fun s -> output_metadata_filename := Some s), "FILE Where to store the output metadata" + ; "-corrected-suffix", Arg.Set_string corrected_suffix, + "SUFFIX Suffix to happend to corrected files" ] ;;