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

Mechanism to add custom rules #3

@emillon

Description

@emillon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions