Frama-C / headache

Lightweight tool for managing headers in source code files. It can update in any source code files (OCaml, C, XML et al).
Other
24 stars 7 forks source link

Headache erases some lines #4

Open Halbaroth opened 1 year ago

Halbaroth commented 1 year ago

I used headache on my project but it seems to remove some lines. Let see a MRE:

The header:

  foo foo

The OCaml file:

(**************************************************************************)
(*    foo                                                                 *)
(**************************************************************************)
open Format

(* foo *)

The expected result with the command headache -h header.txt source.ml:

(**************************************************************************)
(*    foo foo                                                             *)
(**************************************************************************)
open Format

(* foo *)

The actual result:

(**************************************************************************)
(*    foo foo                                                             *)
(**************************************************************************)

(* foo *)
maroneze commented 1 year ago

Thanks for the report. Indeed, I'm afraid this is a "known issue" in the code that we never had the time to look at, and since we only use headache in very specific cases, and we work around it, there is currently not much effort to direct at fixing it.

If you are interested and you believe you might fix it, we'd be glad to integrate it!

Otherwise, the least we could do is mention it directly in the README, just after the code example using -h:

WARNING: leave an empty line after the header, otherwise headache will erase it!

Do you think this would be clear enough?