MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _generate_settings

Method _generate_settings

tools/ng/generator.py:217–232  ·  view source on GitHub ↗

Generate settings.json.

(self, vscode_dir: str)

Source from the content-addressed store, hash-verified

215 json.dump(launch, f, indent=4)
216
217 def _generate_settings(self, vscode_dir: str) -> None:
218 """Generate settings.json."""
219 settings = {
220 "files.associations": {
221 "*.h": "c",
222 "*.c": "c",
223 "*.cpp": "cpp",
224 "*.cc": "cpp",
225 "*.cxx": "cpp"
226 },
227 "C_Cpp.errorSquiggles": "Enabled"
228 }
229
230 output_path = os.path.join(vscode_dir, 'settings.json')
231 with open(output_path, 'w') as f:
232 json.dump(settings, f, indent=4)
233
234
235class CMakeGenerator(ProjectGenerator):

Callers 1

generateMethod · 0.95

Calls 3

openFunction · 0.50
joinMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected