Splinter is a VS Code extension that finds and categorizes ORM operations in a codebase, following the taxonomy in the paper Are Database System Researchers Making Correct Assumptions about Transaction Workloads?.
- Supported ORMs:
- TypeORM: analyzer powered by
@ctring/splinter-eslint(https://github.com/umd-dslam/splinter-eslint) - Django ORM: analyzer powered by
splinter-mypy(https://github.com/umd-dslam/splinter-mypy)
- TypeORM: analyzer powered by
- Views: The “Splinter” activity bar contains three views:
Info,Recognized, andUnknown. - Storage: Results are saved to
.vscode/<analyzer>-results.jsonin your workspace and automatically reloaded on open.
- Install dependencies
npm install- Package the extension (produces a
.vsix)
npm install @vscode/vsce
npx vsce package- Install the generated
.vsixin VS Code (right‑click → “Install Extension VSIX”).
- For TypeScript/TypeORM projects: Node.js with
npx(the extension runs@ctring/splinter-eslint). - For Python/Django projects: install the Python backend first by following
https://github.com/umd-dslam/splinter-mypy.
- Open a project containing
.tsor.pyfiles. The extension activates automatically. - Language selection defaults to
auto(counts.tsvs.pyfiles). Override via settingsplinter.language. - A progress notification appears during analysis. When done, results show in
Info,Recognized, andUnknownviews. - Results are saved to
.vscode/typeorm-results.jsonor.vscode/django-results.jsonand are reloaded next time you open the workspace. TheInfoview includes repository URL and commit hash when available (via the built‑invscode.gitextension).
You can access these from the Command Palette or via view context menus:
- View display
Splinter: Show as flat ListSplinter: Show as tree
- Analyze lifecycle
Splinter: Reanalyze(deletes the saved results file and runs analysis again)Splinter: Reload from Saved File
- Curate data
New Entity(splinter.entity.add)Add Operation(splinter.operation.add)Add Argument(splinter.argument.add)Remove(splinter.item.remove) for custom items- Move between groups:
Move to Unknown,Move to Recognized
- Annotation and copy
Edit Note,Add Tag,Clear NoteAuto annotate/Clear auto annotateRecognize unknown aggressively(step through suggestions to move operations)Copy(items),Copy(info lines)
- Filtering
Filter/Clear Filterin bothRecognizedandUnknownviews
All settings are under splinter.* in VS Code settings:
splinter.rootDir(string, default.): Root directory to analyze relative to the workspace.splinter.batchSize(number, default50): Batch size for analyzer backend.splinter.language(string, defaultauto): One ofauto,typescript,python.splinter.exclude(string[]): Glob patterns to exclude (defaults includenode_modules, build outputs, tests, migrations, VCS folders).
- On first run (or after
Reanalyze), the backend analyzer is invoked:- TypeORM: runs
npx @ctring/splinter-eslintwith the configuredrootDirandbatchSize. - Django: runs the Python analyzer provided by
splinter-mypy.
- TypeORM: runs
- Results are categorized into
RecognizedandUnknownentities/operations/arguments. - You can curate the results (add/move/edit) and save back to the results file.
To add a new analyzer:
- Implement the
Analyzerinterface insrc/analyzer. - Register it in
src/extension.tsunder “Set up the analyzer and views”. - Provide auto‑annotation tags if applicable and implement the required commands.
- The UI will automatically use the shared providers and persist results to
.vscode/<name>-results.json.
- Build:
npm run compile - Watch:
npm run watch - Lint:
npm run lint - Test:
npm test
- If no results appear, check the Output panel “Splinter” for backend logs.
- Ensure required backends are installed (see Requirements above).
- Use
Splinter: Reanalyzeto discard a stale results file.