Skip to content
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

[feature] "vim/compiler-like format" [-format=vim? =quickfix?] #25

Open
akavel opened this issue Jul 7, 2016 · 2 comments
Open

[feature] "vim/compiler-like format" [-format=vim? =quickfix?] #25

akavel opened this issue Jul 7, 2016 · 2 comments

Comments

@akavel
Copy link

akavel commented Jul 7, 2016

It would be cool if the tool supported an output format similar to "typical compilers", so that it could be easily fetched into vim's "quickfix" window, for easy jumping through the lines shown in the trace. For example:

1: running...
/foo/bar/baz/tool.go:123: (*whatever) FlavorText()
/foo/bar/baz/tool.go:55: (*whatever) Something()
/foo/bar/baz/main.go:22: CREATED BY: main()
5: ...
  ...
7: ...
  ...

When imported to vim with :cex system('panicparse -format=vim -only < foobar.log') | copen, this should make it trivial to jump between tool.go l.123, main.go l.22, etc., using :cn and :cp commands. (With properly configured :set errorformat=... in vim, the lines like 1: running... would still get displayed in the quickfix window, clearly separating the goroutines.)

edit: the Go oracle tool has it as: -format=plain

@akavel akavel changed the title [feature] "vim/compiler-like format" [feature] "vim/compiler-like format" [-format=vim? =quickfix?] Jul 7, 2016
@maruel
Copy link
Owner

maruel commented Jul 11, 2016

I'd be fine; add a flag to https://godoc.org/github.com/maruel/panicparse/stack#Palette.StackLines and send a PR.

Probably worth creating a proper enum instead of adding another argument after fullPath. This will be a breaking change.

@maruel
Copy link
Owner

maruel commented Jul 26, 2020

I can see value in this so keeping open for now albeit I don't plan to implement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants