GithubHelp home page GithubHelp logo

golang-kit / goreporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qax-os/goreporter

0.0 1.0 0.0 12.23 MB

A Golang tool that does static analysis, unit testing, code review and generate code quality report.

License: Apache License 2.0

Go 74.37% Shell 0.01% Makefile 0.05% HTML 25.57%

goreporter's Introduction

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

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

Supported template

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

Todo List

  • There are still many shortcomings in the presentation of the report, showing that the model is not perfect, and hope that someone can help optimize it.
  • Bad Practice:the code violates the accepted best practice standards
  • Malicious code vulnerbility
  • Performance
  • Security

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}
  • -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 -p ../goreporter -r ../goreporter -t ./templates/template.html

you can see result detail:online-example-report

example:github.com/wgliang/logcool

github.com/wgliang/logcool

Credits

Logo is designed by Ri Xu

goreporter's People

Contributors

bhageena avatar jgeiger avatar kentokento avatar vincenthou avatar wgliang avatar

Watchers

 avatar

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.