# Infer for Erlang - a static analysis tool used by WhatsApp

**URL:** <https://erlangforums.com/t/infer-for-erlang-a-static-analysis-tool-used-by-whatsapp/3049>\
**Category:** Chat / Discussions\
**Tags:** static-analysis\
**Created:** [November 23, 2023, 12:26pm UTC](https://erlangforums.com/t/infer-for-erlang-a-static-analysis-tool-used-by-whatsapp/3049 "2023-11-23T12:26:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adolfont](https://erlangforums.com/user_avatar/erlangforums.com/adolfont/32/402_2.png) [@adolfont](https://erlangforums.com/u/adolfont)\
**Post date:** [November 23, 2023, 12:26pm UTC](https://erlangforums.com/t/infer-for-erlang-a-static-analysis-tool-used-by-whatsapp/3049/1 "2023-11-23T12:26:26Z")

</div>

Infer is a static analysis tool by Meta: [GitHub - facebook/infer: A static analyzer for Java, C, C++, and Objective-C](https://github.com/facebook/infer)

By its description, “[Infer](http://fbinfer.com/) is a static analysis tool for Java, C++, Objective-C, and C. Infer is written in [OCaml](https://ocaml.org/).”

Yesterday I learned that it is being used to analyze Erlang code at WhatsApp.

[Trying Infer on Simple Erlang Code](https://github.com/facebook/infer/blob/28942ff6cf1e5abb1ee98100a1ac2944bb639887/infer/src/erlang/README.md)

---

<div class="post-metadata">

**Author:** ![adolfont](https://erlangforums.com/user_avatar/erlangforums.com/adolfont/32/402_2.png) [@adolfont](https://erlangforums.com/u/adolfont)\
**Post date:** [November 23, 2023, 6:26pm UTC](https://erlangforums.com/t/infer-for-erlang-a-static-analysis-tool-used-by-whatsapp/3049/2 "2023-11-23T18:26:30Z")

</div>

There is also this paper:  
[InfERL: Scalable and Extensible Erlang Static Analysis](https://research.facebook.com/publications/inferl-scalable-and-extensible-erlang-static-analysis/)

Thanks, [Luiz Aoki](https://twitter.com/luiz_aoqui/status/1727734544973918241).

---

<div class="post-metadata">

**Author:** ![zabrane](https://erlangforums.com/letter_avatar_proxy/v4/letter/z/7ba0ec/32.png) [@zabrane](https://erlangforums.com/u/zabrane)\
**Post date:** [November 23, 2023, 10:01pm UTC](https://erlangforums.com/t/infer-for-erlang-a-static-analysis-tool-used-by-whatsapp/3049/3 "2023-11-23T22:01:35Z")

</div>

@adolfont thanks for sharing.

I tried to build `infer` without success (nightmare Ocaml dependencies).  
Then, i tested the `Linux` (Ubuntu 22.04LTS) prebuilt version but it doesn’t support Erlang.

```bash
$ ./bin/infer --pulse-only -- erlc ex1.erl
Usage Error: Unsupported build command 'erlc'.
If this is an alias for another build system that infer supports, you can use
`--force-integration <command>` where <command> is one of the following supported build systems:
  ant
  buck
  cc
  gradle
  java
  javac
  make
  mvn
  ndk-build
  xcodebuild

```

Same on `macOS`:

```bash
$ brew install infer ─╯
==> Downloading https://formulae.brew.sh/api/formula.jws.json

==> Downloading https://formulae.brew.sh/api/cask.jws.json
################################################################################################################################ 100.0%
Error: infer has been disabled because it does not build

```

@adolfont Any chance to make prebuilt versions for `macOS` and `Linux` with `Erlang` support?

---

<div class="post-metadata">

**Author:** ![hajduakos](https://erlangforums.com/user_avatar/erlangforums.com/hajduakos/32/2165_2.png) [@hajduakos](https://erlangforums.com/u/hajduakos)\
**Post date:** [November 24, 2023, 12:09pm UTC](https://erlangforums.com/t/infer-for-erlang-a-static-analysis-tool-used-by-whatsapp/3049/4 "2023-11-24T12:09:32Z")

</div>

Hey! I’m Akos, one of the maintainers of the Erlang support in Infer at WhatsApp. Thanks for your interest! I’ll check with the core Infer team to see if they plan to do a release any time soon. The latest one is from 2021 March and we started to work on Erlang support just after that.

---

<div class="post-metadata">

**Author:** ![zabrane](https://erlangforums.com/letter_avatar_proxy/v4/letter/z/7ba0ec/32.png) [@zabrane](https://erlangforums.com/u/zabrane)\
**Post date:** [November 24, 2023, 1:33pm UTC](https://erlangforums.com/t/infer-for-erlang-a-static-analysis-tool-used-by-whatsapp/3049/5 "2023-11-24T13:33:19Z")

</div>

@hajduakos this is great. Thanks
