An open API service indexing awesome lists of open source software.

https://github.com/ysqi/gcodesharp

go code review tool
https://github.com/ysqi/gcodesharp

codereview go-tools gofmt golang gotest

Last synced: 29 days ago
JSON representation

go code review tool

Awesome Lists containing this project

README

          

# GCodeSharp

![](https://api.travis-ci.org/ysqi/gcodesharp.svg?branch=master)

GCodeSharp is a CLI library for Go language code review applications.
This application is a tool to generate the report to quickly review the golang code.

# Install
```shell
go get -u github.com/ysqi/gcodesharp
```

# TODO

- [x] support go test
- [x] support go test result report to junit
- [ ] support go vet
- [x] support go fmt
- [x] support golint
- [ ] create a html report contain all thing

# Get Help
you need run application with args `-h`(-help) to get help.
```text
Usage:
gcodesharp [flags]

Flags:
-h, --help help for gcodesharp
-j, --junit string save report as junit xml file
-t, --tool stringArray specify which tool to exec (default [gtest,gfmt,glint])
```
you can add issue to ask me.

# Easy Start
run check for current and each child dictionary, and save reporter to junit.xml file.
```shell
gcodesharp -j=junit.xml ./...
```

# Get Junit Report

gcodesharp support more one golang project package path . default is current dir if not set.

```shell
gcodesharp --junit=$HOME/tmp/myjunit.xml github.com/ysqi/gcodesharp github.com/ysqi/com
```
this command will run go test for current dir and all child dir. Is actually equivalent to the following command:
```shell
go test -cover -timeout 30s -v github.com/ysqi/gcodesharp... github.com/ysqi/com...
gofmt -d -e [all go files of $GOPATH/src/github.com/ysqi/gcodesharp]
```
`github.com/ysqi/gcodesharp...` mean contains import path prefixed with `github.com/ysqi/gcodesharp`.

**Note**: gofmt result as a part of go test. and the result will write to junit file as a testsuite, such like this:
```xml







...

```