Skip to content

Contributing Guide

Karthik Nadig edited this page Sep 14, 2022 · 7 revisions

Requirements

You will need the following tools and packages:

  • NodeJs : 14.19.0
  • Npm : 8.5.0
  • python 3.7 : This is needed for bundled libs

Getting the project ready

  1. Create virtual environment, activate it, and install packages:

    1. python -m venv .venv, select this environment after creation.
    2. Open a terminal and activate the selected environment. If using VS Code terminal, and you have selected the .venv environment, it should auto activate.
    3. python -m pip install nox black
    4. nox --session setup
    5. python -m pip install -r src/test/python_tests/requirements.txt
  2. Install npm packages by running npm install

Your project should now be ready to run and debug.

Linting Server

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

Testing

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.

Clone this wiki locally