rules:
  - id: ocamllint-ref-incr
    pattern: $X := ! $X + 1
    message: You should use `incr`
    languages: [ocaml]
    severity: WARNING
    metadata:
      category: best-practice
      technology:
        - ocaml
      references:
        - https://v2.ocaml.org/api/Stdlib.html#VALincr
        - https://v2.ocaml.org/api/Atomic.html#VALincr
  - id: ocamllint-ref-decr
    pattern: $X := ! $X - 1
    message: You should use `decr`
    languages: [ocaml]
    severity: WARNING
    metadata:
      category: best-practice
      technology:
        - ocaml
      references:
        - https://v2.ocaml.org/api/Stdlib.html#VALdecr
        - https://v2.ocaml.org/api/Atomic.html#VALdecr
