# \[ANN\] dead\_code\_analyzer 1.0.0

**URL:** <https://discuss.ocaml.org/t/ann-dead-code-analyzer-1-0-0/17251>\
**Category:** Ecosystem\
**Tags:** announce\
**Created:** [September 14, 2025, 5:46pm UTC](https://discuss.ocaml.org/t/ann-dead-code-analyzer-1-0-0/17251 "2025-09-14T17:46:24Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![fantazio](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/fantazio/32/6183_2.png) [@fantazio](https://discuss.ocaml.org/u/fantazio)\
**Post date:** [September 14, 2025, 5:46pm UTC](https://discuss.ocaml.org/t/ann-dead-code-analyzer-1-0-0/17251/1 "2025-09-14T17:46:24Z")

</div>

Hello everyone,

Almost 10 years later, the [dead\_code\_analyzer](https://github.com/LexiFi/dead_code_analyzer) is coming back !

Thanks to all the more or less recent contributors and reviewers (I am not allowed to tag you all as a new user).

The tool has been updated to **OCaml 5.2**. It is available on `opam`.  
There is planned work to update it to OCaml 5.3.  
There is planned work to offer a version compatible with OCaml 4.14. However, there is no intent to maintain the `dead_code_analyzer` on any OCaml version other than the latest.

This static analyzer is a complement to the compiler’s warnings on unused code constructs. It reads **.cmi** and **.cmt** files, produced by using `-keep-locs` (on by default) on _.mli_ files and `-bin-annot` on _.ml_ files.

It scans a compiled OCaml project and reports various warnings about suspicious code:

- exported values never used,
- class fields never used,
- constructors and record fields never used,
- optional arguments always or never used,
- some stylistic issues.

By default, only the 3 first elements of the above list are reported.  
More details available in the project’s _[README](https://github.com/LexiFi/dead_code_analyzer/blob/master/README.md)_. A more thorough documentation is in progress.

---

_[View the full topic](https://discuss.ocaml.org/t/ann-dead-code-analyzer-1-0-0/17251)._
