-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wangguoliang
committed
May 4, 2017
1 parent
6ef5e12
commit 3c419b5
Showing
6 changed files
with
1,868 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
package engine | ||
|
||
import ( | ||
"html/template" | ||
) | ||
|
||
type Reporter struct { | ||
Project string `json:"project"` | ||
Score int `json:"score"` | ||
UnitTestx UnitTest `json:"unit_test"` | ||
Cyclox map[string]Cycloi `json:"cyclo"` | ||
SimpleTips map[string][]string `json:"simple_tips"` | ||
CopyTips [][]string `json:"copy_tips"` | ||
ScanTips map[string][]string `json:"scan_tips"` | ||
DependGraph string `json:"depend_graph"` | ||
DeadCode []string `json:"dead_code"` | ||
NoTestPkg []string `json:"no_test_package"` | ||
SpellError []string `json:"spell_error"` | ||
} | ||
|
||
type UnitTest struct { | ||
AvgCover string `json:"average_cover"` | ||
PackagesTestDetail map[string]PackageTest `json:"packages_test_detail"` | ||
PackagesRaceDetail map[string][]string `json:"packages_race_detail"` | ||
} | ||
|
||
type PackageTest struct { | ||
IsPass bool `json:"is_pass"` | ||
Coverage string `json:"coverage"` | ||
Time float64 `json:"time"` | ||
} | ||
|
||
type Cycloi struct { | ||
Average string | ||
Result []string | ||
} | ||
|
||
type Test struct { | ||
Path string | ||
Result int | ||
Time float64 | ||
Cover float64 | ||
} | ||
|
||
type File struct { | ||
Color string | ||
CycloVal string | ||
CycloInfo string | ||
} | ||
|
||
type Copycode struct { | ||
Files string | ||
Path []string | ||
} | ||
|
||
type Race struct { | ||
Pkg string | ||
Len string | ||
Leng string | ||
Info []string | ||
} | ||
|
||
type Simple struct { | ||
Path string | ||
Info string | ||
} | ||
|
||
type Scan struct { | ||
Path string | ||
Info string | ||
} | ||
|
||
type Deadcode struct { | ||
Path string | ||
Info string | ||
} | ||
type CycloInfo struct { | ||
Comp int | ||
Info string | ||
} | ||
type Cyclo struct { | ||
Pkg string | ||
Size int | ||
Info []CycloInfo | ||
} | ||
|
||
type HtmlData struct { | ||
Project string | ||
Score int | ||
Tests string | ||
TestSummaryCoverAvg string | ||
Races []Race | ||
NoTests string | ||
Simples string | ||
SimpleLevel int | ||
Deadcodes string | ||
Copycodes string | ||
Cyclos string | ||
CycloSummarysCycloAvg string | ||
CycloSummarysCyclo50 string | ||
CycloSummarysCyclo15 string | ||
DepGraph template.HTML | ||
} | ||
|
||
type ApolloMeta struct { | ||
Branch string `json:"branch"` | ||
Project string `json:"project"` | ||
CommitID string `json:"commitid"` | ||
CommitUser string `json:"commituser"` | ||
User string `json:"user"` | ||
UnintTestCover string `json:"uninttestcover"` | ||
StaticCheck string `json:"staticcheck"` | ||
CycloBig string `json:"cyclobig"` | ||
Score int `json:"score"` | ||
Starttime string `json:"starttime"` | ||
Endtime string `json:"endtime"` | ||
} | ||
|
||
// type OptionMeta struct { | ||
// Branch string `json:"branch"` | ||
// CommitID string `json:"commitID"` | ||
// CommitUser string `json:"commitUser"` | ||
// User string `json:"user"` | ||
// } | ||
|
||
// type Value struct { | ||
// Filepath string `json:"filepath"` | ||
// Meta ApolloMeta `json:"meta"` | ||
// } |
Oops, something went wrong.