Skip to content
This repository has been archived by the owner on Oct 18, 2018. It is now read-only.

Mechanism to add custom rules #3

Open
emillon opened this issue Jan 5, 2016 · 0 comments
Open

Mechanism to add custom rules #3

emillon opened this issue Jan 5, 2016 · 0 comments

Comments

@emillon
Copy link
Contributor

emillon commented Jan 5, 2016

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant