microsoft / microsoft/vscode-cmake-tools

'Setting has an invalid type, expected "string". Fix in JSON.' in settings

Open
#1,230 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: configure Feature: settings quick fix
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

Issue Summary

Several options in settings have red warning boxes with the text "Setting has an invalid type, expected "string". Fix in JSON."

I think they have no harm, just look ugly in settings.

In "settings.json" these options are not assigned, they have default values.
In the file "package.json" in the repository, these options are assigned to null but their type is string. Like this:

"cmake.installPrefix": {
    "type": "string",
    "default": null,
    "description": "%cmake-tools.configuration.cmake.installPrefix.description%",
    "scope": "resource"
}

Options that shows red boxes:

  • cmake.copyCompileCommands
  • cmake.ctestPath
  • cmake.installPrefix
  • cmake.platform
  • cmake.toolset
Platform and Versions
  • Operating System: Arch Linux
  • CMake Version: 3.17.2
  • VSCode Version: 1.45.0
  • CMake Tools Extension Version: 1.3.1
  • Compiler/Toolchain: GCC 9.3.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the listed setting declarations in package.json and compare them with the corresponding defaults in settings.json. Check how VS Code renders these five settings and verify that the red invalid-type warnings disappear without changing their intended defaults.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript, vscode
Domain
build-system, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.