Skip to content

Diagnostics: Linter shows problems when using symbols from packages not yet loaded #1325

@dfalbel

Description

@dfalbel

Positron Version: 2023.09.0 (Universal) build 139
Code - OSS Version: 1.79.0
Commit: 7f5dc8c
Date: 2023-09-13T02:39:00.220Z
Electron: 22.3.10
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.6.0

Steps to reproduce:

Write something like this in the file pane, without actually executing the code:

library(tidyverse)

select()
read_lines()
filter()
summarise()
map()

I know this is a hard problem because there's no easy way to know what packages will be loaded in the script. But it feels weird to see the linter display a bunch of problems when opening a file containing calls like this:

image

What did you expect to happen?

Maybe this linting rule should be disabled by default on non-package projects? Or if there are library()/require() calls in the script?

Metadata

Metadata

Assignees

Labels

area: diagnosticsIssues related to Diagnosticsarea: kernelsIssues related to Jupyter kernels and LSP serversbugSomething isn't workinglang: r

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions