项目作者: hhpack

项目描述 :
Typechecker powerful wrapper for HHVM/Hack
高级语言: OCaml
项目地址: git://github.com/hhpack/typesafety-cli.git
创建时间: 2016-11-16T00:58:35Z
项目社区:https://github.com/hhpack/typesafety-cli

开源协议:MIT License

下载


typesafety-cli

Build Status

Screen Shot

Typesafety is a type checker wrapper for Hack.
Detailed report at type check, automatic generation of .hhconfig, etc.

Basis usage

Typecheck

If you do not want to create .hhconfig automatically, specify —no-hhconfig.

  1. typesafety

or

  1. typesafety --no-hhconfig

Typecheck and Github review

Using Github review api, you can post the check results as review comments.
Current version only supports Travis CI.

  1. typesafety --review

You need to specify Personal access token for environment variable GITHUB_TOKEN.
The access authority must be repo or public_repo.

Environment

The following environment is necessary to build.

  • OCaml >= 4.05.0
  • OPAM >= 1.2.2

Install

Dependent packages

You can install dependent packages with the following command.
If you use the —review option, you need to install openssl.

Debian/Ubuntu

  1. sudo apt-get install -y opam
  2. sudo apt-get install -y libssl-dev pkg-config

macOS

  1. brew install opam
  2. brew install openssl pkg-config

Install typesafety

  1. opam switch 4.05.0
  2. opam pin add typesafety https://github.com/hhpack/typesafety-cli.git

Build

Install necessary system packages.
Openssl is mandatory to use the https protocol.

Debian/Ubuntu

  1. sudo apt-get install -y opam
  2. sudo apt-get install -y libssl-dev pkg-config

macOS

  1. brew install opam
  2. brew install openssl pkg-config

Install dependent packages.

  1. opam install -y jbuilder ssl lwt lwt_ssl ocamlfind atdgen cmdliner oUnit cohttp cohttp-lwt-unix

You can build with the following command.

  1. make build

Test

You can unit test with the following command.

  1. make test

Examples

Run the example you need to install the following.

  • docker

Execute of examples

  1. Build docker image

    1. cd examples
    2. ./build
  2. Start up the build container

    1. docker build -t typesafety/example:latest .
  3. Run typesafety

    1. typesafety --verbose