It would be nice to have a way to express custom rules, tied to a particular codebase (and in particular, rules that can not be contributed to the builtin rule base itself). The mechanism described in #2 can be used for that:
let _ =
let open Ocamllint.Config in
add_rule_expr @@ function
| [%expr List.concat (List.map [%e? _] [%e? _])] ->
Some "Use MyPrivateModule.concat_map"
| _ -> None
It would be nice to have a way to express custom rules, tied to a particular codebase (and in particular, rules that can not be contributed to the builtin rule base itself). The mechanism described in #2 can be used for that: