Usage
Enter the following code into the terminal:
go run code_coverage.go
The following output appears:
Successfully Opened config.json
[project]
Ready to check coverage for project [project]
Found [number of tests] tests
Custom parameters
go run code_coverage.go -h
Usage of /code_coverage:
-c create missing specs
-config string
custom config file (default "config.json")
-f fetch latest
-i install NPM
-j execute Jest
-m create missing meta files
Working example for custom config file
go run code_coverage.go -f -c -m -i -j -config config_custom.json
Custom config file
go run code_coverage.go -config=config_custom.json
Force fetching latest version of the repository
go run code_coverage.go -f
Create missing specs
go run code_coverage.go -c
go run code_coverage.go -m
Install NPM
go run code_coverage.go -i
Execute Jest
go run code_coverage.go -j
Installation
Setup
# Go development
export GOPATH="${HOME}/.go"
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
test -d "${GOPATH}" || mkdir "${GOPATH}"
test -d "${GOPATH}/src/github.com" || mkdir -p "${GOPATH}/src/github.com"
Then finally install go, with Homebrew.
brew install go
Also a bunch of dev tools!
go get golang.org/x/tools/cmd/godoc
go get github.com/golang/lint/golint
Copy the config.dist.json
to config.json
cp config.dist.json config.json
Configure projects directory, report file and list of projects to include
Update Wiki Page
Upload the json file found in reports folder to your Wiki page.