Packwerk for Visual Studio Code
This extension provides an interface to packwerk for vscode.
packwerk helps modularize large Rails monoliths
pks-vscode in Code Market Place

Stability
This is an alpha extension that is not guaranteed to work. We encourage you to experiment with it and provide feedback!
Configuration
Specify configuration (via navigating to File > Preferences > Workspace Settings and editing file settings.json):
{
// If not specified, uses `bin/packwerk check` (default and recommended, as this is what the packwerk setup guide recommends for executing packwerk)
// You may want to change this if, for example, you have a remote development environment that executes packwerk in a remote box.
"ruby.packwerk.executable": "",
// default true
"ruby.packwerk.onSave": true
}
Development
Setup
Please install packages with yarn:
yarn install
You could install TSLint extension for .ts files.
Please format code using prettier:
yarn prettier src/* test/* --write
Building and Testing Locally
To build and test the extension locally in VSCode:
Build the extension:
yarn run compile
Install the extension locally:
Test the extension:
- Open a Ruby project with packwerk/packs configured
- Open a Ruby file with packwerk violations
- You should see code actions (lightbulb icon) on violation lines:
- "Make constant public with # pack_public: true" for privacy violations
- "Add dependency from X to Y" for dependency violations
- "Run pks update" to update package_todo.yml files
License
This software is released under the MIT License, see LICENSE.txt.
Kudos
Thanks to https://github.com/misogi/vscode-ruby-rubocop which this was modeled off of.