package
0.0.0-20200325104552-3cfaf44fd178
Repository: https://github.com/serversong/goreporter.git
Documentation: pkg.go.dev
# Functions
AbsPath is a function that will get absolute path of file.
CountPercentage will count all linters' percentage.And rule is
+--------------------------------------------------+ | issues | score | +==================================================+ | 5 | 100-issues*2 | +--------------------------------------------------+ | [5,10) | 100 - 10 - (issues-5)*4 | +--------------------------------------------------+ | [10,20) | 100 - 10 - 20 - (issues-10)*5 | +--------------------------------------------------+ | [20,40) | 100 - 10 - 20 - 50 - (issues-20)*1 | +--------------------------------------------------+ | [40,*) | 0 | +--------------------------------------------------+
It will return a float64 type score.
DirList is a function that traverse the file directory containing the specified file format according to the specified rule.
ExceptPkg is a function that will determine whether the package is an exception.
FileList is a function that traverse the file is the specified file format according to the specified rule.
GetProcessUnit provides function that will get sumProcessNumber of linter's weight and the number of current linter's case.It will return 1 if sumProcessNumber/int64(number) <= 0 or sumProcessNumber / int64(number).
PackageAbsPath will gets the absolute path of the specified package from GOPATH's [src].
PackageAbsPath will gets the absolute directory path of the specified file from GOPATH's [src].
PackageNameFromGoPath is a function that will get package's name from GOPATH.
ProjectName is a function that gets project's name.