github.com/360EntSecGroup-skylar/goreporter@v0.0.0-20180902115603-df1b20f7c5d0/README.md (about)

     1  ![goreporter](./logo.png)
     2  
     3  # goreporter [![Version Status](https://img.shields.io/badge/v3.0-release-blue.svg)](https://github.com/360EntSecGroup-Skylar/goreporter/releases/tag/version3.0)
     4  
     5  [![Current Release](https://img.shields.io/github/release/360EntSecGroup-Skylar/goreporter.svg)](https://github.com/360EntSecGroup-Skylar/goreporter/releases/latest)
     6  [![Build Status](https://travis-ci.org/360EntSecGroup-Skylar/goreporter.svg?branch=master)](https://travis-ci.org/360EntSecGroup-Skylar/goreporter)
     7  [![GoDoc](https://godoc.org/github.com/360EntSecGroup-Skylar/goreporter?status.svg)](https://godoc.org/github.com/360EntSecGroup-Skylar/goreporter)
     8  [![License](https://img.shields.io/badge/LICENSE-Apache2.0-ff69b4.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
     9  
    10  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:
    11  
    12  <!-- MarkdownTOC -->
    13  
    14  - [Supported linters](#supported-linters)
    15  - [Supported template](#supported-template)
    16  - [Todo List](#todo-list)
    17  - [Installing](#installing)
    18    - [Requirements](#requirements)
    19  - [Run it](#run-it)
    20  - [Quickstart](#quickstart)
    21  - [Example](#example)
    22  - [Report-example](#report-example)
    23  - [Credits](#credits)
    24  
    25  <!-- /MarkdownTOC -->
    26  
    27  ## Supported linters
    28  
    29  - [gofmt](https://golang.org/cmd/gofmt) - Checks if the code is properly formatted and could not be further simplified.
    30  - [govet](https://golang.org/cmd/vet/#hdr-Shadowed_variables) - Reports variables that may have been unintentionally shadowed.
    31  - [golint](https://github.com/golang/lint) - Golint is a linter for Go source code.
    32  - [unittest](https://github.com/360EntSecGroup-Skylar/goreporter/tree/master/linters/unittest) - Golang unit test status.
    33  - [deadcode](https://github.com/tsenart/deadcode) - Finds unused code.
    34  - [gocyclo](https://github.com/alecthomas/gocyclo) - Computes the cyclomatic complexity of functions.
    35  - [varcheck](https://github.com/opennota/check) - Find unused global variables and constants.
    36  - [structcheck](https://github.com/opennota/check) - Find unused struct fields.
    37  - [aligncheck](https://github.com/opennota/check) - Warn about un-optimally aligned structures.
    38  - [errcheck](https://github.com/kisielk/errcheck) - Check that error return values are used.
    39  - ~~[copycode(dupl)](https://github.com/mibk/dupl) - Reports potentially duplicated code.~~
    40  - [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) - Report simplifications in code.
    41  - [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) - Statically detect bugs, both obvious and subtle ones.
    42  - [godepgraph](https://github.com/kisielk/godepgraph) - Godepgraph is a program for generating a dependency graph of Go packages.
    43  - [misspell](https://github.com/client9/misspell) - Correct commonly misspelled English words... quickly.
    44  - [countcode](https://github.com/bytbox/sloc) - Count lines and files of project.
    45  - [interfacer](https://github.com/mvdan/interfacer) - Suggest narrower interfaces that can be used.
    46  - [depth](https://github.com/360EntSecGroup-Skylar/goreporter/tree/feature-3.0/linters/depth) - Count the maxdepth of go functions.
    47  - [flen](https://github.com/lafolle/flen) - Flen provides stats on functions/methods lengths in a Golang package.
    48  
    49  ## Template
    50  
    51  - html template file which can be loaded via `-t <file>`.
    52  
    53  ## Todo List
    54  
    55  - This version will re-design the template.
    56  - Add interfacer and safesql and gofmt(-s),govet linter.
    57  
    58  ## Installing
    59  
    60  ### Requirements
    61  
    62  - [Go](https://golang.org/dl/) 1.6+
    63  - [Graphviz](http://www.graphviz.org/download/)
    64  
    65  ## Quickstart
    66  
    67  Install goreporter (see above).
    68  
    69  ```bash
    70  go get -u github.com/360EntSecGroup-Skylar/goreporter
    71  ```
    72  
    73  ## Run it:
    74  
    75  ### NOTE
    76  
    77  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.
    78  
    79  ```bash
    80  goreporter -p [projectRelativePath] -r [reportPath] -e [exceptPackagesName] -f [json/html/text]  {-t templatePathIfHtml}
    81  ```
    82  
    83  - -version Version of GoReporter.
    84  - -p Must be a valid Golang project path.
    85  - -r Save the path to the report.
    86  - -e Exceptional packages (multiple separated by commas, for example: "linters/aligncheck,linters/cyclo" ).
    87  - -f report format json, html OR text.
    88  - -t Template path,if not specified, the default template will be used.
    89  
    90  By default, the default template is used to generate reports in html format.
    91  
    92  ## Example
    93  
    94  ![goreporter-display](./DISPLAY.gif)
    95  
    96  you can see result detail:[online-example-report](http://wgliang.github.io/pages/goreporter-report.html)
    97  
    98  ## Credits
    99  
   100  Logo is designed by [Ri Xu](https://github.com/xuri)