-
Notifications
You must be signed in to change notification settings - Fork 256
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
Flycheck-rtags usage in single entry project #1382
Comments
|
I know the Go back-end does. The ones I've written (poorly) do as well. Some others do as well I'm sure, but I don't have my main dev machine for a while. By default if you return flycheck errors for other files it'll highlight line #1, still show the errors in list, and cycle to them. For some reason I was so sure that Anyway, sorry to bother you. Guess I was misremembering. Rtags is phenomenal, I'll just swap out the flycheck integration for a hackier version or try to modify yours for my own desires if I can. |
Cool, if that's possible I'll add support to the flycheck-rtags back-end. Thanks! |
Rtags seems to only populate diagnostics for the current buffer. Given the age of this project and that no one seems to have cared about this before, I worry that this is way more work than it's worth |
I had a quick look in flycheck-rtags.el, and should be straight forward to add support for it. The functions https://github.com/Andersbakken/rtags/blob/master/src/flycheck-rtags.el#L72 and https://github.com/Andersbakken/rtags/blob/master/src/flycheck-rtags.el#L101 need to be adopted. The currently operate on the current-buffer, instead of the entire rtags-diagnostics buffer content. But I will probably add a switch for it. So the user can decide whether to get flycheck errors for the current buffer only, or for the hole project.
That actually looks pretty easy. |
@mattt-b Unfortunately flycheck wasn't designed to operate on multiple buffers at the same time. Therefore, I'll not add this feature. |
I thought for sure I used to use rtags like this, but I've spent hours trying to get it to work again to no avail. Simple example:
main.c
foo.c
compile_commands.json
Two issues I have that I thought I used to not have
rtags-diagnostics
won't populate errors in the other files unless I open the file in emacs (so it's not following the includes).flycheck-list-errors
/flycheck-next-error
/etc only work for the current buffer (even whenrtags-diagnostics
shows errors in other files). I thought I used to have it do error highlighting on line 1 to indicate an error in another file, or even better, highlighted the correct#include
file. And would cycle through all errors in the project instead of just the current file.Does ^ this behavior work with rtags-flycheck somehow, or am I misremembering?
The text was updated successfully, but these errors were encountered: