Giter Site home page Giter Site logo

gcodesharp's Introduction

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

go get -u github.com/ysqi/gcodesharp

TODO

  • support go test
  • support go test result report to junit
  • support go vet
  • support go fmt
  • support golint
  • create a html report contain all thing

Get Help

you need run application with args -h(-help) to get help.

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.

gcodesharp -j=junit.xml  ./...

Get Junit Report

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

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:

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:

<testsuite tests="226" failures="0" errors="0" time="2.4243922" name="/usr/local/go/bin/gofmt" timestamp="2017-10-08T23:39:45">
	<properties>
		<property name="go.version" value="go1.8"></property>
		<property name="os" value="darwin"></property>
		<property name="arch" value="amd64"></property>
	</properties>
	<testcase classname="gofmt" name="gfmt/gfmt.go" time="0"></testcase>
	...
<testsuite>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.