<commit_before># Flow [![Build Status](https://travis-ci.org/facebook/flow.svg?branch=master)](https://travis-ci.org/facebook/flow) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/thyvx6i5nixtoocm/branch/master?svg=true)](https://ci.appveyor.com/project/Facebook/flow/branch/master)

Flow is a static typechecker for JavaScript. To find out more about Flow, check out [flowtype.org](http://flowtype.org/).

For a background on the project, please read our [launch blog post](https://code.facebook.com/posts/1505962329687926/flow-a-new-static-type-checker-for-javascript/).

## Requirements

Flow works with:

* Mac OS X
* Linux (64-bit)

There are binary distributions for Mac OS X and many variants of Linux; you can also build it from source on almost any 64-bit Linux variant.

## Installing Flow

Flow is simple to install: all you need is the `flow` binary on your PATH and you're good to go.

### Using Homebrew

You can install Flow via [Homebrew](http://brew.sh/) package manager. To ensure you get the latest version, update Homebrew first:

```
brew update
```

Then simply type:

```
brew install flow
```


### Using OPAM

You can also build and install flow via the OCaml [OPAM](https://opam.ocaml.org) package manager. Since Flow has some non-ocaml dependencies, you need to use the [`depext`](https://opam.ocaml.org/doc/FAQ.html#Somepackagefailduringcompilationcomplainingaboutmissingdependenciesquotm4quotquotlibgtkquotetc) package like so:

```
opam install depext
opam depext --install flowtype
```

If you don't have a new enough version of OCaml to compile Flow, you can also use OPAM to bootstrap a modern version.  Install OPAM via the [binary packages](http://opam.ocaml.org/doc/Install.html#InstallOPAMin2minutes) for your operating system and run:

```
opam init --comp=4.01.0
opam install flowtype
eval `opam config env`
flow --help
```

## Getting started

Getting started with flow is super easy.

- Initialize Flow by running the following command in the root of your project
```
flow init
```

- Add the following to the top of all the files you want to typecheck
``` javascript
/* @flow */
```

- Run and see the magic happen
```
flow check
```

More thorough documentation and many examples can be found at http://flowtype.org.

## Building Flow

Flow is written in OCaml (OCaml 4.01.0 or higher is required) and (on Linux) requires libelf. You can install OCaml on Mac OS X and Linux by following the instructions at [ocaml.org](https://ocaml.org/docs/install.html).

For example, on Ubuntu 14.04 and similar systems:

```
sudo apt-get install ocaml libelf-dev
```

On OSX, using the [brew package manager](http://brew.sh/):

```
brew install ocaml ocamlbuild libelf opam
```

Once you have these dependencies, building Flow just requires running

```
make
```

This produces a `bin` folder containing the `flow` binary.

*Note: at this time, the OCaml dependency prevents us from adding Flow to [npm](http://npmjs.org). Try [flow-bin](https://www.npmjs.org/package/flow-bin) if you need a npm binary wrapper.*

## Running the tests

To run the tests, first compile flow using `make`. Then run `bash ./runtests.sh bin/flow`

There is a `make test` target that compiles and runs tests.

To run a subset of the tests you can pass a second argument to the `runtests.sh` file.

For example: `bash runtests.sh bin/flow class | grep -v 'SKIP'`

## Join the Flow community
* Website: [http://flowtype.org/](http://flowtype.org/)
* irc: #flowtype on Freenode
* Twitter: follow [@flowtype](https://twitter.com/flowtype) and [#flowtype](https://twitter.com/hashtag/flowtype) to keep up with the latest Flow news.

## License
Flow is BSD-licensed. We also provide an additional patent grant.<commit_msg>Add Stack Overflow to the GitHub README.md<commit_after># Flow [![Build Status](https://travis-ci.org/facebook/flow.svg?branch=master)](https://travis-ci.org/facebook/flow) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/thyvx6i5nixtoocm/branch/master?svg=true)](https://ci.appveyor.com/project/Facebook/flow/branch/master)

Flow is a static typechecker for JavaScript. To find out more about Flow, check out [flowtype.org](http://flowtype.org/).

For a background on the project, please read our [launch blog post](https://code.facebook.com/posts/1505962329687926/flow-a-new-static-type-checker-for-javascript/).

## Requirements

Flow works with:

* Mac OS X
* Linux (64-bit)

There are binary distributions for Mac OS X and many variants of Linux; you can also build it from source on almost any 64-bit Linux variant.

## Installing Flow

Flow is simple to install: all you need is the `flow` binary on your PATH and you're good to go.

### Using Homebrew

You can install Flow via [Homebrew](http://brew.sh/) package manager. To ensure you get the latest version, update Homebrew first:

```
brew update
```

Then simply type:

```
brew install flow
```


### Using OPAM

You can also build and install flow via the OCaml [OPAM](https://opam.ocaml.org) package manager. Since Flow has some non-ocaml dependencies, you need to use the [`depext`](https://opam.ocaml.org/doc/FAQ.html#Somepackagefailduringcompilationcomplainingaboutmissingdependenciesquotm4quotquotlibgtkquotetc) package like so:

```
opam install depext
opam depext --install flowtype
```

If you don't have a new enough version of OCaml to compile Flow, you can also use OPAM to bootstrap a modern version.  Install OPAM via the [binary packages](http://opam.ocaml.org/doc/Install.html#InstallOPAMin2minutes) for your operating system and run:

```
opam init --comp=4.01.0
opam install flowtype
eval `opam config env`
flow --help
```

## Getting started

Getting started with flow is super easy.

- Initialize Flow by running the following command in the root of your project
```
flow init
```

- Add the following to the top of all the files you want to typecheck
``` javascript
/* @flow */
```

- Run and see the magic happen
```
flow check
```

More thorough documentation and many examples can be found at http://flowtype.org.

## Building Flow

Flow is written in OCaml (OCaml 4.01.0 or higher is required) and (on Linux) requires libelf. You can install OCaml on Mac OS X and Linux by following the instructions at [ocaml.org](https://ocaml.org/docs/install.html).

For example, on Ubuntu 14.04 and similar systems:

```
sudo apt-get install ocaml libelf-dev
```

On OSX, using the [brew package manager](http://brew.sh/):

```
brew install ocaml ocamlbuild libelf opam
```

Once you have these dependencies, building Flow just requires running

```
make
```

This produces a `bin` folder containing the `flow` binary.

*Note: at this time, the OCaml dependency prevents us from adding Flow to [npm](http://npmjs.org). Try [flow-bin](https://www.npmjs.org/package/flow-bin) if you need a npm binary wrapper.*

## Running the tests

To run the tests, first compile flow using `make`. Then run `bash ./runtests.sh bin/flow`

There is a `make test` target that compiles and runs tests.

To run a subset of the tests you can pass a second argument to the `runtests.sh` file.

For example: `bash runtests.sh bin/flow class | grep -v 'SKIP'`

## Join the Flow community
* Website: [http://flowtype.org/](http://flowtype.org/)
* irc: #flowtype on Freenode
* Twitter: follow [@flowtype](https://twitter.com/flowtype) and [#flowtype](https://twitter.com/hashtag/flowtype) to keep up with the latest Flow news.
* Stack Overflow: Ask a question with the [flowtype tag](http://stackoverflow.com/questions/tagged/flowtype)

## License
Flow is BSD-licensed. We also provide an additional patent grant.
{'fraction_non_alphanumeric': 0.11061598951507208, 'fraction_numerical': 0.00943643512450852, 'mean_word_length': 4.336363636363636, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 22, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4567089', 'n_tokens_mistral': 2423, 'n_tokens_neox': 2277, 'n_words': 922}