mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 18:44:27 +02:00
Keep custom "unwantedRecommendations" when generating projects for VSCode // Resolve #4383
This commit is contained in:
@@ -20,7 +20,8 @@ PlatformIO Core 6
|
|||||||
* Improved device port finder when using dual channel UART converter (`issue #4367 <https://github.com/platformio/platformio-core/issues/4367>`_)
|
* Improved device port finder when using dual channel UART converter (`issue #4367 <https://github.com/platformio/platformio-core/issues/4367>`_)
|
||||||
* Improved project dependency resolving when using the `pio project init --ide <https://docs.platformio.org/en/latest/core/userguide/project/cmd_init.html>`__ command
|
* Improved project dependency resolving when using the `pio project init --ide <https://docs.platformio.org/en/latest/core/userguide/project/cmd_init.html>`__ command
|
||||||
* Upgraded build engine to the SCons 4.4.0 (`release notes <https://github.com/SCons/scons/releases/tag/4.4.0>`__)
|
* Upgraded build engine to the SCons 4.4.0 (`release notes <https://github.com/SCons/scons/releases/tag/4.4.0>`__)
|
||||||
* Do not resolve project dependencies on for the ``cleanall`` target (`issue #4344 <https://github.com/platformio/platformio-core/issues/4344>`_)
|
* Keep custom "unwantedRecommendations" when generating projects for VSCode (`issue #4383 <https://github.com/platformio/platformio-core/issues/4383>`_)
|
||||||
|
* Do not resolve project dependencies for the ``cleanall`` target (`issue #4344 <https://github.com/platformio/platformio-core/issues/4344>`_)
|
||||||
* Warn about calling "env.BuildSources" in a POST-type script (`issue #4385 <https://github.com/platformio/platformio-core/issues/4385>`_)
|
* Warn about calling "env.BuildSources" in a POST-type script (`issue #4385 <https://github.com/platformio/platformio-core/issues/4385>`_)
|
||||||
* Fixed an issue when escaping macros/defines for IDE integration (`issue #4360 <https://github.com/platformio/platformio-core/issues/4360>`_)
|
* Fixed an issue when escaping macros/defines for IDE integration (`issue #4360 <https://github.com/platformio/platformio-core/issues/4360>`_)
|
||||||
|
|
||||||
|
@@ -3,13 +3,20 @@
|
|||||||
% import re
|
% import re
|
||||||
%
|
%
|
||||||
% recommendations = set(["platformio.platformio-ide"])
|
% recommendations = set(["platformio.platformio-ide"])
|
||||||
|
% unwantedRecommendations = set(["ms-vscode.cpptools-extension-pack"])
|
||||||
% previous_json = os.path.join(project_dir, ".vscode", "extensions.json")
|
% previous_json = os.path.join(project_dir, ".vscode", "extensions.json")
|
||||||
% if os.path.isfile(previous_json):
|
% if os.path.isfile(previous_json):
|
||||||
% fp = open(previous_json)
|
% fp = open(previous_json)
|
||||||
% contents = re.sub(r"^\s*//.*$", "", fp.read(), flags=re.M).strip()
|
% contents = re.sub(r"^\s*//.*$", "", fp.read(), flags=re.M).strip()
|
||||||
% fp.close()
|
% fp.close()
|
||||||
% if contents:
|
% if contents:
|
||||||
% recommendations |= set(json.loads(contents).get("recommendations", []))
|
% try:
|
||||||
|
% data = json.loads(contents)
|
||||||
|
% recommendations |= set(data.get("recommendations", []))
|
||||||
|
% unwantedRecommendations |= set(data.get("unwantedRecommendations", []))
|
||||||
|
% except ValueError:
|
||||||
|
% pass
|
||||||
|
% end
|
||||||
% end
|
% end
|
||||||
% end
|
% end
|
||||||
{
|
{
|
||||||
@@ -21,6 +28,8 @@
|
|||||||
% end
|
% end
|
||||||
],
|
],
|
||||||
"unwantedRecommendations": [
|
"unwantedRecommendations": [
|
||||||
"ms-vscode.cpptools-extension-pack"
|
% for i, item in enumerate(sorted(unwantedRecommendations)):
|
||||||
|
"{{ item }}"{{ ("," if (i + 1) < len(unwantedRecommendations) else "") }}
|
||||||
|
% end
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user