Skip to content

Useful Commands

Dominik Harmim edited this page May 9, 2023 · 17 revisions

Build

  • Complete build: ./build-infer.sh [all] [-y] and make -j [BUILD_MODE=opt/dev-noerror]
  • Only setup Opam: ./build-infer.sh --only-setup-opam [-y]

  • Complete compilation of source files: make -j -C infer/src [BUILD_MODE=opt/dev-noerror]
  • Compilation in bytecode - faster (after the complete): make byte -j -C infer/src [BUILD_MODE=opt/dev-noerror]
  • Compilation only for types checking - fast (after the complete): make check -j -C infer/src [BUILD_MODE=opt/dev-noerror]

Installation

  • Installation: sudo make install -j BUILD_MODE=opt and sudo chown -R "$USER" .

Dev Setup

  • make devsetup -j

Tests

  • Tests: make test -j NDKBUILD=no
  • Atomer's tests: ./infer/tests/atomicity/atomer/run.sh

ShellCheck

  • shellcheck infer/tests/atomicity/atomer/run.sh

Documentation

  • Generate manuals: make manuals -j
  • Generate an OCaml modules documentation (opam install odoc [-y]): [NO_BROWSE_DOC=yes] make doc -j

Code Formatting

  • make fmt -j
  • parallel ocamlformat -i ::: foo.ml bar.ml ...

Analysis

  • Full analysis: infer [run] ... -- ...
  • Capture files for an analysis: infer capture -- ...
  • The analysis itself: infer analyze ...
  • Show analysis results: infer explore
  • Generate results in the HTML format for debugging: infer -g ... -- ...

Clone this wiki locally