<commit_before># anderson [![Build Status](https://travis-ci.org/xoebus/anderson.svg?branch=master)](https://travis-ci.org/xoebus/anderson)

*checks your go dependencies for contraband licenses*

![<NAME>](http://www.scifibloggers.com/wp-content/uploads/dredd-2012.jpg)

## usage

If you don't have an `.anderson.yml` in your current directory then a listing
of your dependencies and their license types are shown.

![Without Config](media/without-config.png)

If you add a `.anderson.yml` file then your dependencies will be checked for
valid licenses. The syntax of this file can be found below.

![Without Config](media/with-config.png)

Most of the package and dependency listing code was graciously taken from
[Godep](https://github.com/tools/godep).

## installation

```
go get -u github.com/xoebus/anderson
```

## configuration

You can configure *anderson* to be more or less lenient when checking you
dependencies. A file called `.anderson.yml` in the root of your Go package will
be checked when you run it.

``` yml
---
whitelist:
- MIT

blacklist:
- GPL

exceptions:
- github.com/xoebus/greylist
```

The whitelisted section is for licenses that are always allowed. Conversely,
the blacklist section is for licenses that are never allowed and will always
fail a build. Any licenses that are not explicitly mentioned are considered
to be in a "greylist" and will need to be explicitly allowed by adding the
import path to the exceptions.

<commit_msg>document new STDIN reading<commit_after># anderson [![Build Status](https://travis-ci.org/xoebus/anderson.svg?branch=master)](https://travis-ci.org/xoebus/anderson)

*checks your go dependencies for contraband licenses*

![<NAME>](http://www.scifibloggers.com/wp-content/uploads/dredd-2012.jpg)

## usage

If you don't have an `.anderson.yml` in your current directory then a listing
of your dependencies and their license types are shown.

![Without Config](media/without-config.png)

If you add a `.anderson.yml` file then your dependencies will be checked for
valid licenses. The syntax of this file can be found below.

![Without Config](media/with-config.png)

Anderson can operate in two different modes. When invoked with input on *STDIN*
it will read the packages that it should scan from there. If no input is given
then it will make a best effort attempt to scan the packages that it should
scan itself. Automatic scanning can sometimes fail if you have transitive
(often test) dependencies that you do not include.

Most of the package and dependency listing code was graciously taken from
[Godep](https://github.com/tools/godep).

## installation

```
go get -u github.com/xoebus/anderson
```

## configuration

You can configure *anderson* to be more or less lenient when checking you
dependencies. A file called `.anderson.yml` in the root of your Go package will
be checked when you run it.

``` yml
---
whitelist:
- MIT

blacklist:
- GPL

exceptions:
- github.com/xoebus/greylist
```

The whitelisted section is for licenses that are always allowed. Conversely,
the blacklist section is for licenses that are never allowed and will always
fail a build. Any licenses that are not explicitly mentioned are considered
to be in a "greylist" and will need to be explicitly allowed by adding the
import path to the exceptions.


{'fraction_non_alphanumeric': 0.08540278619018776, 'fraction_numerical': 0.0024227740763173833, 'mean_word_length': 4.4504950495049505, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '547792', 'n_tokens_mistral': 994, 'n_tokens_neox': 943, 'n_words': 420}