Skip to content

Commit

Permalink
Disable AutoWrapText
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Oct 12, 2021
1 parent 9358a1f commit 7d979a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions report/diff_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type DiffTestExecutionTime struct {
func (d *DiffReport) Out(w io.Writer) {
table := tablewriter.NewWriter(w)
table.SetAutoFormatHeaders(false)
table.SetAutoWrapText(false)
table.SetCenterSeparator("")
table.SetColumnSeparator("")
table.SetRowSeparator("-")
Expand All @@ -64,6 +65,7 @@ func (d *DiffReport) Table() string {
buf := new(bytes.Buffer)
table := tablewriter.NewWriter(buf)
table.SetAutoFormatHeaders(false)
table.SetAutoWrapText(false)
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
table.SetCenterSeparator("|")
table.SetColumnAlignment([]int{tablewriter.ALIGN_LEFT, tablewriter.ALIGN_RIGHT, tablewriter.ALIGN_RIGHT, tablewriter.ALIGN_RIGHT})
Expand Down Expand Up @@ -294,6 +296,7 @@ func (d *DiffReport) FileCoveagesTable(files []*gh.PullRequestFile) string {
h := []string{"Files", "Coverage", "+/-"}
table.SetHeader(h)
table.SetAutoFormatHeaders(false)
table.SetAutoWrapText(false)
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
table.SetCenterSeparator("|")
for _, v := range rows {
Expand Down
3 changes: 3 additions & 0 deletions report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func (r *Report) Table() string {
table := tablewriter.NewWriter(buf)
table.SetHeader(h)
table.SetAutoFormatHeaders(false)
table.SetAutoWrapText(false)
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
table.SetCenterSeparator("|")
table.Append(m)
Expand All @@ -109,6 +110,7 @@ func (r *Report) Out(w io.Writer) error {
table := tablewriter.NewWriter(w)
table.SetHeader([]string{"", makeHeadTitle(r.Ref, r.Commit, r.rp)})
table.SetAutoFormatHeaders(false)
table.SetAutoWrapText(false)
table.SetCenterSeparator("")
table.SetColumnSeparator("")
table.SetRowSeparator("-")
Expand Down Expand Up @@ -181,6 +183,7 @@ func (r *Report) FileCoveagesTable(files []*gh.PullRequestFile) string {
h := []string{"Files", "Coverage"}
table.SetHeader(h)
table.SetAutoFormatHeaders(false)
table.SetAutoWrapText(false)
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
table.SetCenterSeparator("|")
for _, v := range rows {
Expand Down

0 comments on commit 7d979a4

Please sign in to comment.