cryptosense / ocamllint

Detect common errors in OCaml code
BSD 2-Clause "Simplified" License
68 stars 3 forks source link

Using with ReasonML #27

Closed Eric-Arellano closed 6 years ago

Eric-Arellano commented 6 years ago

Hello, thanks for creating this great tool!

I'm curious how easy you think it would be to adapt this to Reason? [Not at all requesting you do it, only asking the feasibility because I might be interested in helping].

--

The semantics are the same between the two, but the syntax differs quite a bit.

An initial approach could be using refmt to parse Reason code into its OCaml equivalent, and then running ocamllint over the output. Although, that might lead to confusing output messages, as it would be suggesting OCaml syntax for fixes rather than Reason.

Another complication is that Reason prefers the standard library Belt from BuckleScript.

--

I'm not sure it would even make sense to run this tool over Reason code? I think it would, because you're checking for semantics like using [] instead of List.length foo == 0, right?

--

Any thoughts much appreciated!

NathanReb commented 6 years ago

Thanks for reaching out!

Unfortunately we're about to archive ocamllint as we're not using it internally and believe the future of ocaml linting is not in a standalone program but rather in a library exposing individual lint rules from which you can choose the ones you want to apply to your project using dune's lint alias.

If you're really interested in ocamllint as it is and want to take over, you might want to consider ocaml-community.

I think @emillon is better suited to answer your other questions!

Eric-Arellano commented 6 years ago

Ah okay, no worries with this being archived. I don't have the bandwidth to take this project on, unfortunately.

Thanks for the response and for making this project happen!