-
Notifications
You must be signed in to change notification settings - Fork 35
Contributing Guide
You will need the following tools and packages:
-
Create a fork of this repo and clone your fork locally.
-
Create virtual environment, activate it, and install packages:
-
python -m venv .venv
, select this environment after creation. In VS Code, if you have the Python extension installed you can use the commandPython: Create Environment
from the command pallete. - Open a terminal and activate the selected environment. If using VS Code terminal, and you have selected the
.venv
environment, it should auto activate. python -m pip install nox
-
nox --session setup
if you're using Python 3.7. Otherwise, runpython -m pip install -t ./bundled/libs --no-cache-dir --implementation py --no-deps --upgrade -r ./requirements.txt
python -m pip install -r src/test/python_tests/requirements.txt
-
-
Install npm packages by running
npm install
Your project should now be ready to run and debug.
Most of the linting code is in bundled/tool/server.py
, look in that file for examples on how to work with Language Server Protocol. This file is launched by VS Code, this launch configuration is in src/common/server.ts
. These two files are the main files needed for this project to work.
Settings needed for this project are defined in package.json
. These settings are generically read and passed to server.py
via language server protocol. This is done in src/extension.ts
To test the linter server, we have a custom LSP client. See src/test/python_tests/test_linting.py
for examples on how to write tests for this project.
Run the following commands from the terminal and address any reported issues:
python -m nox --session tests
python -m nox --session lint
After the above commands are successful, push your changes to your fork, and create a pull request against the main
branch in this repo.