<commit_before># GoAnalysis

[![Build Status](https://travis-ci.org/chrisbbe/GoAnalysis.svg?branch=master)](https://travis-ci.org/chrisbbe/GoAnalysis)

Analyse your Go source code to detect for typical common mistakes in Go and for high values of cyclomatic complecity in your code.

## Tests

GoAnalysis is developed using the Test-driven development (TDD) process where unit tests are extensively used to guarantee for the functionality in each package and the hole analysis as a unit.

Run the following command in the root folder to execute all tests in all packages.

`$ go test ./...`

or just the following command at root level in each package you want to test.

`$ go test`

## Code Style

### Indentation

**Go**
```<commit_msg>Add installation and execution<commit_after># GoAnalysis

[![Build Status](https://travis-ci.org/chrisbbe/GoAnalysis.svg?branch=master)](https://travis-ci.org/chrisbbe/GoAnalysis)

Analyse your Go source code to detect for typical common mistakes in Go and for high values of cyclomatic complecity in your code.

## Install

Requierements:
Go must be installed and $GOPATH have to be set correctly.  

`$ go get github.com/chrisbbe/GoAnalysis/analyzer`


## Execution

`$analyzer -dir="$GOPATH/src/github.com/chrisbbe/GoAnalysis"`

Exchange the example dir with the package you want to analyze.



## Tests

GoAnalysis is developed using the Test-driven development (TDD) process where unit tests are extensively used to guarantee for the functionality in each package and the hole analysis as a unit.

Run the following command in the root folder to execute all tests in all packages.

`$ go test ./...`

or just the following command at root level in each package you want to test.

`$ go test`

## Code Style

### Indentation

**Go**
```
{'fraction_non_alphanumeric': 0.08548931383577053, 'fraction_numerical': 0.0, 'mean_word_length': 4.358433734939759, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '5138056', 'n_tokens_mistral': 513, 'n_tokens_neox': 498, 'n_words': 225}