Thanks for contributing.
- Fork and clone:
git clone https://github.com/YOUR_USERNAME/barrel-roll.git
cd barrel-roll- Install dependencies:
npm install- Build once:
npm run compile- Open the workspace in VS Code.
- Press
F5to launch an Extension Development Host. - Right-click a folder and run:
Barrel Roll DirectoryBarrel Roll Directory (Recursive)
npm run compile
npm run test:unitUse full validation before submitting:
npm run lint
npm run deps:check
npm run coverage:verify
npm run memory:checkRun npm run quality before submitting changes. It includes formatting and ESLint checks,
dependency-cruiser validation, duplicate-code detection, and TypeScript-aware Madge analysis.
- Language: TypeScript
- Formatter: Prettier (
.prettierrc.json) - Lint config:
eslint.config.mjs - Architecture: favor small modules with clear responsibilities
- Keep generated barrel output deterministic and readable
- Tests live under
src/test/. - Test execution uses Node's built-in test runner via
scripts/run-tests.cjs. npm run test:vscodecompiles the tests and current extension bundle, then launches the real VS Code-hosted contract. It activates the development extension, checks command registration, executes barrel generation, and validates its output. The first run may download VS Code; headless Linux requires a display host such as Xvfb.- Unit test titles must begin with
should. - Keep unit tests FAST: fast, autonomous, self-validating, and timely. Do not put network calls, subprocesses, real-time waits, or heap stress loops in unit tests.
- Add tests for both success and failure paths.
- Prefer focused unit tests; add integration tests for behavior crossing module boundaries.
- Run
npm run coverage:verify; every executable production file must exceed 95% for statements, branches, functions, and lines. - The test compiler clears stale
dist/srcanddist/testoutput before compiling; do not bypass it when validating coverage. - Run
npm run memory:checkfor bounded, offline heap-retention and async-resource validation.
Use shared helpers from src/utils/errors.ts:
getErrorMessage(error)formatErrorForLog(error)
To clean up ad-hoc error checks:
npm run lint:fix- Use conventional prefixes when possible:
feat:,fix:,docs:,test:,refactor:,chore: - Keep changes scoped and include doc updates for behavioral/script changes
- Update
CHANGELOG.mdfor user-facing changes - Include test updates for behavioral changes
-
npm run lintpasses -
npm run deps:checkpasses -
npm run coverage:verifypasses -
npm run memory:checkpasses - docs updated for command/script/behavior changes
- changelog updated for user-facing changes
Open an issue or start a discussion in the repository.
