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
- Host: GitHub
- URL: https://github.com/ysqi/gcodesharp
- Owner: ysqi
- License: gpl-3.0
- Created: 2017-10-06T03:02:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-08T07:11:13.000Z (over 8 years ago)
- Last Synced: 2024-06-20T15:46:47.149Z (almost 2 years ago)
- Topics: codereview, go-tools, gofmt, golang, gotest
- Language: Go
- Size: 76.2 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GCodeSharp

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
...
```