# How possible is a clippy-like linter for OCaml?

**URL:** <https://discuss.ocaml.org/t/how-possible-is-a-clippy-like-linter-for-ocaml/7779>\
**Category:** Ecosystem\
**Created:** [May 4, 2021, 10:23am UTC](https://discuss.ocaml.org/t/how-possible-is-a-clippy-like-linter-for-ocaml/7779 "2021-05-04T10:23:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Kakadu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/kakadu/32/1204_2.png) [@Kakadu](https://discuss.ocaml.org/u/Kakadu)\
**Post date:** [May 4, 2021, 10:54am UTC](https://discuss.ocaml.org/t/how-possible-is-a-clippy-like-linter-for-ocaml/7779/2 "2021-05-04T10:54:17Z")

</div>

I actually thought about creating this kind of linter by myself. I think it will be very helpful for beginner students to study OCaml, because they are making same c+±like code and I’m tired to review it.

I’m not too familiar with dune, so I have a few questions/remarks:

1. Should it be executed during compilation or in another pass, like inline\_tests are implemented?
2. I think in a nearest future we will need an access to type information, so it should be supported somehow.
3. In long-run we will need libraries (that provide some kind of DSL) to export linter suggestions for this DSL. It will allow us to generate suggestions like `concat + map => concat_map` without hardcoding it into linter.

---

_[View the full topic](https://discuss.ocaml.org/t/how-possible-is-a-clippy-like-linter-for-ocaml/7779)._
