Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: languageserver
Title: Language Server Protocol
Version: 0.3.16
Version: 0.3.16.9001
Date: 2023-08-17
Authors@R:
c(person(given = "Randy",
Expand Down
4 changes: 2 additions & 2 deletions R/diagnostics.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ diagnose_file <- function(uri, content, is_rmarkdown = FALSE, globals = NULL, ca
}

if (file.exists(path)) {
lints <- lintr::lint(path, cache = cache, text = content)
lints <- lintr::lint(path, cache = cache, text = content, parse_settings = TRUE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can omit this diff? the change in {lintr}, IIRC, is about the latter invocation (no path, just text=).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are probably right about this, would need to double check to be sure :)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just had the same problem and had to modify a local copy of languageserver to fix my .linter file not being used (actually I was going to submit a PR myself).

I can confirm this change is necessary even in this case. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, it makes sense to always be explicit to protect from future lintr changes.

} else {
lints <- lintr::lint(text = content, cache = cache)
lints <- lintr::lint(text = content, cache = cache, parse_settings = TRUE)
}

diagnostics <- lapply(lints, diagnostic_from_lint, content = content)
Expand Down