Skip to content

Code Analysis for "All File" and "Open files" will incorrectly use the active file's workspace folder settings #11561

Open
@Colengms

Description

@Colengms

In multiroot scenarios, the "All Files" and "Open Files" Code Analysis options appear to use the active file's workspace folder for code analysis settings. This results in inconsistent Code Analysis results, depending on which file is active and which workspace folder it's associated with. It may also result in a crash, if the extension was activated without a file becoming active (such as opening c_cpp_properties.json), in which case there is no active file and the workspace folder used will be null (leading to a null deference).

Currently, this issue is minimized by the fact that our active file is never cleared out properly. I need to address that in the context of other changes, to avoid invalid scenarios such as non-visible or unopen files still being considered 'active'.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions