crosshair-vscode
Crosshair-vscode is an extension for Visual Studio Code (VS Code) that allows you to statically test your Python code using CrossHair. InstallationCrosshair-vscode has two dependencies:
ms-python.python. Use the Visual Studio marketplace to install the extension ms-python.python by following this link. crosshair-tool. The easiest way to install the package crosshair-tool is via pip3:
If you use a virtual environment, make sure that you activate it beforehand so that the package crosshair-tool is installed in it (instead of globally). You have to set up ms-python.python extension so that crosshair-vscode can access the package [crosshair-tool. crosshair-vscode. Use the Visual Studio marketplace to install the extension ms-python.python by following this link. UsageThe crosshair-vscode is automatically activated when you start your VS Code (and ms-python.python is activated). You access it through the editor context pop-up menu: Or, alternatively, through the explorer pop-up menu: The quick pick dialogue will appear, allowing you to select the command that you want to execute: The commands are executed in a terminal named "crosshair check" and "crosshair watch", respectively: (If a terminal with that name already exists, it will be closed first and then freshly re-opened. This is necessary so that we do not pollute your terminal space on many command calls.) Following commands are provided. check. Run CrossHair to check the code statically. If you run it from the editor's pop-up menu, it will check the current file. If you run it from the explorer's pop-up menu, it will check the the selected item. This can be a single file, but also a directory. check at. Run CrossHair to check statically the function under caret. This command can only be executed from an editor. Please make sure that you enabled crosshair on the given function (.g., see [section "Targeting" in crosshair docs] on how you can turn it of using comment directives). crosshair watch. Start CrossHair and check the code continuously, on every file change. If you run it from the editor's pop-up menu, it will watch the current file. Analogously to CommandsThe extension defines the following commands:
Please see Section "Usage" for more details. Known IssuesIt is hard to control terminals in VS Code (see this issue). We wait for a short delay (~1 second) till we send commands to the terminal. This might cause racing conditions in some rare cases. ContributingPlease see [CONTRIBUTING.md] for how to help us with development of the extension. VersioningWe follow a bit unusual semantic versioning schema:
Release Notes0.0.1Initial release of crosshair-vscode. |