MCPcopy Index your code
hub / github.com/qax-os/goreporter

github.com/qax-os/goreporter @version3.0.2 sqlite

repository ↗ · DeepWiki ↗ · release version3.0.2 ↗
2,915 symbols 7,798 edges 408 files 716 documented · 25%
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

Extension points exported contracts — how you extend this code

Value (Interface)
A Value is an SSA value that can be referenced by an instruction. [6 implementers]
linters/simpler/ssa/ssa.go
StrategyLinter (Interface)
(no doc) [14 implementers]
engine/strategy.go
Closer (Interface)
(no doc) [10 implementers]
linters/interfacer/testdata/files/convert.go
Range (Interface)
(no doc) [4 implementers]
linters/staticcheck/vrp/vrp.go
Server (Interface)
Server is a test type.
linters/golint/testdata/var-decl.go
Token (Interface)
(no doc) [1 implementers]
linters/copycheck/suffixtree/suffixtree.go
Matcher (FuncType)
(no doc)
linters/countcode/countcode.go
Func (FuncType)
(no doc)
linters/simplecode/lint/lint.go

Core symbols most depended-on inside this repo

Errorf
called by 250
linters/simpler/lint/lint.go
Type
called by 217
linters/simpler/ssa/ssa.go
Name
called by 188
linters/simpler/ssa/ssa.go
Pos
called by 107
linters/simpler/ssa/ssa.go
Close
called by 88
linters/interfacer/testdata/files/alias.go
WriteString
called by 86
linters/spellcheck/misspell/stringreplacer/replace.go
String
called by 80
linters/simpler/ssa/ssa.go
AddChildren
called by 75
linters/copycheck/syntax/syntax.go

Shape

Method 1,192
Function 1,188
Struct 311
TypeAlias 105
Interface 104
FuncType 15

Languages

Go100%

Modules by API surface

linters/simpler/ssa/ssa.go224 symbols
linters/staticcheck/lint.go84 symbols
linters/golint/lint.go70 symbols
linters/staticcheck/vrp/int.go61 symbols
linters/staticcheck/vrp/vrp.go57 symbols
linters/simpler/ssa/print.go49 symbols
linters/simpler/lint/lint.go49 symbols
linters/simplecode/lint/lint.go46 symbols
linters/simpler/ssa/func.go44 symbols
linters/simpler/ssa/builder.go42 symbols
linters/staticcheck/vrp/slice.go39 symbols
linters/simpler/lint.go38 symbols

For agents

$ claude mcp add goreporter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact