Tools



Indeni code quality plugin

Installation

  1. Press CTRL+Shift+P in Visual studio code to bring up the commands
  2. Type "Install extensions" and select it
  3. This will bring up the extensions pane
  4. Search for "indeni" which will bring up "indeni_codequal".
  5. Install

Features

The visual studio code plugin has the following capabilities

Code quality

  1. Perform code quality
    1. Will parse the current script and run a couple of checks to comply with proper indeni code quality
    2. Will present a view of current quality checks and their statuses
  2. Toggle live update
    1. Toggles a live update of "Perform code quality", ie it's run everytime anything changes(toggle off if it slows down your system, shouldn't).
    2. Will not show the view of current quality checks each time the code has changed
  3. Clear decorations
    1. Will clear all error decorations from your code, if "Toggle live update" is on they will reappear again as soon as you change something

Rule runner(Requires you to fill out the rule-runner path under visual studio code settings(search for indeni))

  1. Compile
    1. Will compile the current rule against a selected input(optional)
    2. Presents a view with the outcome of the compilation
  2. Create rule-runner input from parser output.json
    1. Will parse a .ind test output.json file to create a .yaml file for rule-runner input. This file might need some additional data but it gives a nice starting outline.

Command runner(Requires you to fill out the command-runner path under visual studio code settings(search for indeni))

  1. Create test
    1. Create(or re-create) a test case for the current .ind script
  2. Parse only
    1. Parse the current script against a selected input file
  3. Full command
    1. Run a full command(albeit with limited parameters) against a live device
  4. Run test
    1. Run a test case(or all test cases)

Misc

  1. Open corresponding test/script folder
    1. If you have a script open → Will open the "test.json" file and reveal it in the sidebar
    2. If you have a test file open → Will open the corresponding script and reveal it in the sidebar

If you find issues(and yes, there are issues), please report them at https://github.com/joakimhedberg/Indeni-CodeQual-vscode along with a screenshot, a description and the actual script that triggers the issue