-
Notifications
You must be signed in to change notification settings - Fork 1.5k
TLM: Upgrade to v1 tablewriter #7937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
f1e1df4 to
1aff7c5
Compare
srenatus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! That's quite an effort. I'll let @johanfylling and @sspaink have another look before merging, but I'm happy that this is resolved. 👏
|
Would you mind rebasing this? Github reports conflicts, probably due to go.sum/go.mod changes. |
|
This is great. Thank you, Jacob! @jh125486 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for looking into this 😃. Since this wasn't on a perceived critical path, it would likely have taken some time before we got around to it. Much appreciated!
Changes LGTM 👍. Just some tests that don't report failures anymore and need amending.
| t.SetAutoMergeCellsByColumnIndex([]int{0}) | ||
| t = t.Options(tablewriter.WithConfig(tablewriter.NewConfigBuilder(). | ||
| ForColumn(0).Build().Row().Formatting().WithMergeMode(tw.MergeVertical). // vertical merge column 0. | ||
| Build().Build().Build(), // build the table config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go, go, go! (sorry, couldn't help it 😄)
- Updated test fixtures and various test fixes. Signed-off-by: Jacob Hochstetler <[email protected]>
5d549f8 to
d3ddf2a
Compare
Signed-off-by: Jacob Hochstetler <[email protected]>
e16ca29 to
cae67ed
Compare
Signed-off-by: Jacob Hochstetler <[email protected]>
Signed-off-by: Jacob Hochstetler <[email protected]>
|
The out of sync branch was weird... when I updated my branch last night I think GH hadn't cached the latest :/ I rebased, bu then missed a commit on rebase, so it took me a bit to fix. Should be good to go now. |
|
@srenatus anything else I can do on this? |
|
@jh125486 nothing left to do on this, except accept my gratitude 🎈 😉 Thanks for your contribution! |
Why the changes in this PR are needed?
My company uses the OPA tooling internally, and updating the tablewriter package resolves TLM.
What are the changes in this PR?
casesto fix staticcheck SA1019Notes to assist PR review:
V1 tablewrite introduces a new syntax and also some differences in rendering, and I did my best to replicate the current outputs.
I worked with the tablewriter author to toggle some "features" for space merging, so that I could replicate the
prettyoutput line by line.I'm not sure why the max width of columns was being calculated in a few places... ideally we would let
tablewriteritself do the work.