• Stars
    star
    477
  • Rank 88,632 (Top 2 %)
  • Language
    Erlang
  • License
    Apache License 2.0
  • Created almost 2 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A type-checker for Erlang

eqWAlizer

A type-checker for Erlang.

eqWAlizer logo

Using it with rebar3 projects

  1. Use OTP 25

  2. Download the elp binary for your system from https://github.com/WhatsApp/erlang-language-platform/releases

    On Mac you will probably get the following message when trying to run the executable the first time: "elp cannot be opened because the developer cannot be verified.". To solve this, go to Preferences > Security and Privacy and add an exception. Alternatively, you can build elp from source.

  3. Add eqwalizer_support dependency and eqwalizer_rebar3 plugin to your rebar3 project definition (see below)

  4. From the project directory run:

  • elp eqwalize <module> to type-check a single module
  • elp eqwalize-all to type-check all src modules in the project

Adding eqwalizer_support and eqwalizer_rebar3:

{deps, [
  {eqwalizer_support,
    {git_subdir,
        "https://github.com/whatsapp/eqwalizer.git",
        {branch, "main"},
        "eqwalizer_support"}}
]}.

{project_plugins, [
  {eqwalizer_rebar3,
    {git_subdir,
        "https://github.com/whatsapp/eqwalizer.git",
        {branch, "main"},
        "eqwalizer_rebar3"}}
]}.

Using it with non-rebar projects

  1. Use OTP 25 (it will be detected automatically by eqWAlizer)
  2. Download the elp binary for your system from https://github.com/WhatsApp/erlang-language-platform/releases
  3. Write a project.json file describing your project, see below for the file structure. Ensure eqwalizer_support is added as a dependency, and that its ebin folder is reachable and populated with .beam files.
  4. From the project directory, assuming your .json file is called project.json run:
  • elp eqwalize <module> --project project.json to type-check a single module
  • elp eqwalize-all --project project.json to type-check all src modules in the project

The .json file should be structured in this way:

{
  "apps": [app list],
  "deps": [app list],      // 3rd party dependencies (not type-checked), defaults to []
}

where an app is a map structured as such:

{
  "name": "app_name",
  "dir": "path/to/app",                         // Relative to project root
  "src_dirs": ["path/to/src", ...],             // Relative to app dir, defaults to ["src"]
  "extra_src_dirs": ["path/to/extra_src", ...], // Relative to app dir, defaults to []
  "ebin": "path/to/ebin",                       // Relative to app dir, defaults to "ebin"
  "include_dirs": ["include", ...],             // Relative to app dir, defaults to []
  "macros": ["MACRO", ...],                     // Defaults to []
}

FAQ

Please refer to the FAQ document for answers to some common questions, including:

  • What's the difference between eqWAlizer and Dialyzer?
  • Why not extend Dialyzer, rather than creating a new tool?
  • What about Elixir?

Where can I learn more about eqWAlizer, its technical principles, its relation to dialyzer and elixir support feasibility?

here.

License

eqWAlizer is Apache licensed.

More Repositories

1

stickers

This repository contains the iOS and Android sample apps and API for creating third party sticker packs for WhatsApp.
Java
2,651
star
2

proxy

This repository contains the WhatsApp proxy implementation for users to host their own proxy infrastructure to connect to WhatsApp for chat (VoIP is not currently supported)
Shell
1,163
star
3

waraft

An Erlang implementation of RAFT from WhatsApp
Erlang
508
star
4

erlfmt

An automated code formatter for Erlang
Erlang
391
star
5

WhatsApp-Business-API-Setup-Scripts

The scripts related to setting up WhatsApp business API
373
star
6

erlt

Early prototype of ErlT, an experimental Erlang dialect with first-class support for static typing.
Erlang
127
star
7

StringPacks

Extracts localized strings from an Android app and stores it in a much more efficient format.
Java
124
star
8

erlfuzz

erlfuzz is a fuzzer for the Erlang ecosystem
Rust
112
star
9

WhatsApp-Nodejs-SDK

The official Meta Business Messaging WhatsApp Cloud API Node.js SDK.
TypeScript
102
star
10

erlang-language-platform

Erlang Language Platform. LSP server and CLI.
Rust
77
star
11

power_shell

Erlang shell with advanced features: evaluating non-exported functions and shortcuts for frequently used functions.
Erlang
74
star
12

tree-sitter-erlang

Tree-sitter Grammar for Erlang
C
65
star
13

WADebug

WhatsApp Debug - A command-line tool that will be used to troubleshoot installation of WhatsApp Business API.
Python
30
star
14

whatsapp-business-api-deployment-templates

This repo hosts the cloud templates which enable one-click deployment of their WhatsApp Business Platform On-Premise API on different cloud platforms with stable high messaging throughput.
HCL
24
star
15

erldist_filter

erldist_filter NIF for filtering and logging Erlang Dist Protocol messages
C
13
star
16

WhatsApp-OTP-Sample-App

Sample app that integrates with WhatsApp OTP (One-Time Password) copy code and "one-tap" autofill features. This project shows how to send and receive OTP code from WhatsApp and best practices around integration.
Swift
10
star
17

WhatsApp-Android-OTP-SDK

WhatsApp Android OTP SDK helps you integrate with one-time password solution provided by WhatsApp.It provides handy functions that simplifies the integration work.
Java
4
star
18

WhatsApp-Flows-Tools

Tools and examples to help you create WhatsApp Flows https://developers.facebook.com/docs/whatsapp/flows
1
star