Skip to content

Commit 80abcdf

Browse files
committed
add headings to output, updated flag description
1 parent ead6f8d commit 80abcdf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/root.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var (
2929

3030
func init() {
3131
rootCmd.Flags().BoolVarP(&remote, "remote", "r", false, "whether or not this is a remote repository")
32-
rootCmd.Flags().IntVarP(&decayDays, "drop-off", "d", 30, "drop off duration in days")
32+
rootCmd.Flags().IntVarP(&decayDays, "decay-rate", "d", 30, "determines how long it takes for the impact of a commit to halve, based on how recently the commit was made")
3333
}
3434

3535
var rootCmd = &cobra.Command{
@@ -127,12 +127,13 @@ var rootCmd = &cobra.Command{
127127
})
128128

129129
w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', tabwriter.TabIndent)
130+
fmt.Fprintf(w, "Rank\tEmail\tName\tScore\tCommits\tImpact\n")
130131
for rank, authorEmail := range authorEmails {
131132
agg := authors[authorEmail]
132133
if agg.score < 1 {
133134
continue
134135
}
135-
fmt.Fprintf(w, "%d\t%s\t%s\t%d\t%d commits\t%d\t%f\n", rank+1, authorEmail, agg.name, int(math.Round(agg.score)), len(agg.commits), agg.impact, float64(agg.impact)/agg.score)
136+
fmt.Fprintf(w, "%d\t%s\t%s\t%d\t%d commits\t%d\n", rank+1, authorEmail, agg.name, int(math.Round(agg.score)), len(agg.commits), agg.impact)
136137
}
137138
w.Flush()
138139
},

0 commit comments

Comments
 (0)