From 95b55f86ba456abbf5570d673de5998008b0ea22 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 23 Apr 2020 16:58:34 -0400 Subject: [PATCH] Add a VS Code task to run `sync-files.py` If you're developing one of the libraries that has muiltiple copies auto-generated by `sync-files.py`, you can now run `sync-files.py --latest` by going to the `Terminal | Run Task...` menu in VS Code and selecting the `Sync Identical Files` task. You can set a keyboard binding to run this task for quicker access. --- .gitignore | 1 - .vscode/tasks.json | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index dc932d1f5c1..b14dab0a6b1 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,3 @@ /codeql/ csharp/extractor/Semmle.Extraction.CSharp.Driver/Properties/launchSettings.json -.vscode diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000000..7cea318d0ac --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,23 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Sync Identical Files", + "type": "process", + // Non-Windows OS will usually have Python 3 already installed at /usr/bin/python3. + "command": "python3", + "args": [ + "config/sync-files.py", + "--latest" + ], + "windows": { + // On Windows, use whatever Python interpreter is configured for this workspace. The default is + // just `python`, so if Python is already on the path, this will find it. + "command": "${config:python.pythonPath}", + }, + "problemMatcher": [] + } + ] +} \ No newline at end of file