DavyJ0nes / go-analyzer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exercism's Go Analyzer

This is Exercism's automated analyzer for the Go track.

Executing the Analyzer

The analyser takes two parameters:

  • the exercise slug, e.g. two-fer
  • the path to the solution to analize

Example to execute with binary:

analyze two-fer ~/solution-238382y7sds7fsadfasj23j/

From source with Go installed:

go run ./main.go two-fer ~/solution-238382y7sds7fsadfasj23j/

Build Executable

This will create an executable called analyze.

go generate .
go build -tags build -o analyze .

go generate is called before the build to incorporate all necessary files within the binary.

Docker

To build execute the following from the repositories root directory:

docker build -t exercism/go-analyzer .

To run from docker pass in the solutions path as a volume and execute with the necessary parameters:

docker run -v $(PATH_TO_SOLUTION):/solution exercism/go-analyzer ${SLUG} /solution

Example:

docker run -v ~/solution-238382y7sds7fsadfasj23j:/solution exercism/go-analyzer two-fer /solution

Stats

Twofer

Out of 500 real world solutions we get:

approve           34
disapprove        463
refer_to_mentor   3
ejected (failed)  0

About


Languages

Language:Go 99.0%Language:Dockerfile 1.0%