Skip to content

Incorrect configuration JSON/UI warnings appear when quotes are used #11955

Closed

Description

Use "" in an includePath and open the c_cpp_properties.json or the config UI.

e.g.

            "includePath": [
                "${workspaceFolder}/**",
                "\"${workspaceFolder}\\new folder\""
            ],
image

Bug: It's giving an incorrect warning message. It seems like the "correct" include path ends up getting used though, but it seems possible there could be a case in which it could be wrong.

Not found by me, but by "other internal testing".

Activity

  1. Colengms commented on Feb 13, 2024

    @Colengms
    Contributor

    Is this a bug? This seems by-design. We shouldn't do any "shell escaping" for include paths. Not only aren't they on a command line, but they aren't being interpreted in the context of command line arguments. The paths in your example should not work with quotes in them unless there are also quotes in them in the file system.

    It is legitimate to have a direct name that starts with or ends with a quote on Linux or Mac. We shouldn't incur special handling where it's not specifically required and expected.

  2. moved this from Triage to No status in cpptoolson Jun 20, 2024
  3. added this to the 1.25.1 milestone on Apr 16, 2025
  4. added
    fixedCheck the Milestone for the release in which the fix is or will be available.
    and removed
    investigate: reproThis issue's repro steps needs to be investigated/confirmed
    on Apr 16, 2025
  5. madzianka commented on May 9, 2025

    @madzianka

    Tesz chcemmm

  6. locked and limited conversation to collaborators on Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: ConfigurationAn issue related to configuring the extension or IntelliSenseLanguage ServicefixedCheck the Milestone for the release in which the fix is or will be available.

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions