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

Failed to run diagnostics with lintr #116

Closed
stefanocoretta opened this issue Apr 8, 2024 · 6 comments · Fixed by #117
Closed

Failed to run diagnostics with lintr #116

stefanocoretta opened this issue Apr 8, 2024 · 6 comments · Fixed by #117

Comments

@stefanocoretta
Copy link

Hi! This is the same as quarto-dev/quarto-nvim#84. I set write_to_disk = true but I am still getting the Failed to run diagnostics error with R code chunks in qmd files.

My config is here if it helps: https://github.com/stefanocoretta/kickstart-modular.nvim

🦦🤔🤷‍♂️

@jmbuhr
Copy link
Owner

jmbuhr commented Apr 8, 2024

Same linter? What's the full message?

@stefanocoretta
Copy link
Author

Yes, same linter (lintr). Here's the full message :)

Screenshot 2024-04-09 at 10 39 41

@jmbuhr
Copy link
Owner

jmbuhr commented Apr 9, 2024

Found the issue. with the config.buffer.write_to_disk option enabled, we only write out the file on save, but lintr doesn't refresh afterwards. If you save the file and then activate otter (e..g via QuartoActivate) again it should work.

But I'll see if I can make it work out of the box!

EDIT: fixed

@stefanocoretta
Copy link
Author

Fantastic thank you! 🦦 🥰

@stefanocoretta
Copy link
Author

stefanocoretta commented Apr 10, 2024

Just a quick follow up, I set write_to_disk = false and changed my .lintr file to this and now linting works (so I guess no need to write to disk)

linters: all_linters(
    object_length_linter = NULL,
    object_name_linter = NULL
  )

@jmbuhr
Copy link
Owner

jmbuhr commented Apr 10, 2024

Yes, for some reason it's only some linters of lintr that require a file on disk (no idea why).

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

Successfully merging a pull request may close this issue.

2 participants