goreporter

command module
v0.0.0-...-df1b20f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

README

goreporter

goreporter Version Status

Current Release Build Status GoDoc License

A Golang tool that does static analysis, unit testing, code review and generate code quality report. This is a tool that concurrently runs a whole bunch of those linters and normalizes their output to a report:

Supported linters

  • gofmt - Checks if the code is properly formatted and could not be further simplified.
  • govet - Reports variables that may have been unintentionally shadowed.
  • golint - Golint is a linter for Go source code.
  • unittest - Golang unit test status.
  • deadcode - Finds unused code.
  • gocyclo - Computes the cyclomatic complexity of functions.
  • varcheck - Find unused global variables and constants.
  • structcheck - Find unused struct fields.
  • aligncheck - Warn about un-optimally aligned structures.
  • errcheck - Check that error return values are used.
  • copycode(dupl) - Reports potentially duplicated code.
  • gosimple - Report simplifications in code.
  • staticcheck - Statically detect bugs, both obvious and subtle ones.
  • godepgraph - Godepgraph is a program for generating a dependency graph of Go packages.
  • misspell - Correct commonly misspelled English words... quickly.
  • countcode - Count lines and files of project.
  • interfacer - Suggest narrower interfaces that can be used.
  • depth - Count the maxdepth of go functions.
  • flen - Flen provides stats on functions/methods lengths in a Golang package.

Template

  • html template file which can be loaded via -t <file>.

Todo List

  • This version will re-design the template.
  • Add interfacer and safesql and gofmt(-s),govet linter.

Installing

Requirements

Quickstart

Install goreporter (see above).

go get -u github.com/360EntSecGroup-Skylar/goreporter

Run it:

NOTE

You have to confirm that your project is operational. In particular, the problem with vendor, when the package is not found in the default path, goreporter will look again from the possible vendor path.

goreporter -p [projectRelativePath] -r [reportPath] -e [exceptPackagesName] -f [json/html/text]  {-t templatePathIfHtml}
  • -version Version of GoReporter.
  • -p Must be a valid Golang project path.
  • -r Save the path to the report.
  • -e Exceptional packages (multiple separated by commas, for example: "linters/aligncheck,linters/cyclo" ).
  • -f report format json, html OR text.
  • -t Template path,if not specified, the default template will be used.

By default, the default template is used to generate reports in html format.

Example

goreporter-display

you can see result detail:online-example-report

Credits

Logo is designed by Ri Xu

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
linters
cyclo
Gocyclo calculates the cyclomatic complexities of functions and methods in Go source code.
Gocyclo calculates the cyclomatic complexities of functions and methods in Go source code.
errorcheck
Package errcheck is the library used to implement the errcheck command-line tool.
Package errcheck is the library used to implement the errcheck command-line tool.
errorcheck/test
This file exists so that we can check that multi-file packages work
This file exists so that we can check that multi-file packages work
golint
Package lint contains a linter for Go source code.
Package lint contains a linter for Go source code.
golint/golint
golint lints the Go source files named on its command line.
golint lints the Go source files named on its command line.
simplecode/gotool
Package gotool contains utility functions used to implement the standard "cmd/go" tool, provided as a convenience to developers who want to write tools with similar semantics.
Package gotool contains utility functions used to implement the standard "cmd/go" tool, provided as a convenience to developers who want to write tools with similar semantics.
simplecode/lint
Package lint provides the foundation for tools like gosimple.
Package lint provides the foundation for tools like gosimple.
simplecode/lint/lintutil
Package lintutil provides helpers for writing linter command lines.
Package lintutil provides helpers for writing linter command lines.
simplecode/simple
Package simple contains a linter for Go source code.
Package simple contains a linter for Go source code.
simpler
Package simpler contains a linter for Go source code.
Package simpler contains a linter for Go source code.
simpler/lint
Package lint provides the foundation for tools like gosimple.
Package lint provides the foundation for tools like gosimple.
simpler/lint/lintutil
Package lintutil provides helpers for writing linter command lines.
Package lintutil provides helpers for writing linter command lines.
simpler/ssa
Package ssa defines a representation of the elements of Go programs (packages, types, functions, variables and constants) using a static single-assignment (SSA) form intermediate representation (IR) for the bodies of functions.
Package ssa defines a representation of the elements of Go programs (packages, types, functions, variables and constants) using a static single-assignment (SSA) form intermediate representation (IR) for the bodies of functions.
staticcheck
Package staticcheck contains a linter for Go source code.
Package staticcheck contains a linter for Go source code.
staticcheck/callgraph
Package callgraph defines the call graph and various algorithms and utilities to operate on it.
Package callgraph defines the call graph and various algorithms and utilities to operate on it.
staticcheck/callgraph/cha
Package cha computes the call graph of a Go program using the Class Hierarchy Analysis (CHA) algorithm.
Package cha computes the call graph of a Go program using the Class Hierarchy Analysis (CHA) algorithm.
staticcheck/callgraph/rta
This package provides Rapid Type Analysis (RTA) for Go, a fast algorithm for call graph construction and discovery of reachable code (and hence dead code) and runtime types.
This package provides Rapid Type Analysis (RTA) for Go, a fast algorithm for call graph construction and discovery of reachable code (and hence dead code) and runtime types.
staticcheck/callgraph/static
Package static computes the call graph of a Go program containing only static call edges.
Package static computes the call graph of a Go program containing only static call edges.
staticcheck/gcsizes
Package gcsizes provides a types.Sizes implementation that adheres to the rules used by the gc compiler.
Package gcsizes provides a types.Sizes implementation that adheres to the rules used by the gc compiler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL