I’m working on a project where some functions are duplicated in different files, but the project is a bit too big to track them manually. Also, some functions have been coded in the project before they were added to more recent versions of OCaml.
Are there tools to detect duplicated OCaml code in a project (ideally also comparing to Stdlib)?
I don’t know about a tool but here is a quick hack: format the code using OCamlformat such that the same code looks the same. Now sort lines of all files - identical lines from different files show up together.