First off, thank you for taking the time to contribute! Contributions from the community help make CodePulse more comprehensive, accurate, and helpful for everyone.
By participating in this project, you agree to abide by our Code of Conduct.
- Contributing to CodePulse
We use structured GitHub Issues to track bug reports. Before submitting a bug report, please:
- Check the existing issues to ensure it hasn't been reported or resolved already.
- Test on a clean environment without conflicting extensions.
- Open a bug report including:
- Extension version
- VS Code version and OS details
- Step-by-step instructions to reproduce
- Error logs from the VS Code Developer Tools console (
Help > Toggle Developer Tools)
If you have ideas for new metrics, features, or UI improvements:
- Search the issues to verify your suggestion hasn't been discussed before.
- Open a Feature Request describing the functionality, the problem it solves, and how it might be implemented.
To submit code changes:
- Fork the repository and create your branch from
main(e.g.,feat/your-feature-nameorfix/issue-description). - Make your changes, keeping them focused. Avoid unrelated changes.
- Write clean, readable code following our guidelines.
- Ensure your changes compile and pass all tests and linting checks locally.
- Submit a Pull Request (PR) with a clear description of the changes and references to any related issues.
This project is built as a VS Code Extension using TypeScript, Svelte (for the webview dashboard), and Vite (for building the webview).
- Node.js 20 or higher
- pnpm 9.0.0 or higher
- Git
-
Clone the repository:
git clone https://github.com/BleckWolf25/CodePulse.git cd CodePulse -
Install dependencies:
pnpm install
-
Compile the extension and webview:
pnpm run compile
-
Press
F5in VS Code to run the extension inside a Development Host window.
Use the following pnpm commands in your project root:
-
Compile extension and build webview:
pnpm run compile
-
Compile and watch for backend changes:
pnpm run watch
-
Run linter:
pnpm run lint
-
Run unit tests:
pnpm run test
To keep the codebase uniform and easy to read:
-
Indentation: Use 4 spaces for indentation. Do not use tabs.
-
Naming Conventions:
- Classes and Interfaces:
PascalCase - Functions and Variables:
camelCase - Constants:
UPPER_SNAKE_CASE - Files:
camelCaseorkebab-casefor backend,PascalCasefor Svelte components. - Private Members: Prefix with an underscore
_(e.g.,private _db).
- Classes and Interfaces:
-
Braces: Use standard Egyptian brackets style:
export function exampleFunction(): void { if (condition) { // code } else { // code } }
-
Type Safety: Always use TypeScript types explicitly. Avoid
anyat all costs.
- Resource Disposal: Always push disposable items (like EventEmitters, Command registrations, and panel hooks) to the
context.subscriptionsarray to prevent memory leaks. - Database Operations: Perform database write operations asynchronously where possible, and avoid blocking the main extension host thread.
Use prefix tags for commits, such as:
feat: ...for a new featurefix: ...for a bug fixdocs: ...for documentation changesrefactor: ...for code style or internal design changestest: ...for adding or updating testschore: ...for configuration/build updates
Example:
feat: add CodeLens and Hover complexity indicators
This project uses Mocha and the @vscode/test-cli to run integration tests inside a headless VS Code instance.
- Add tests under the
src/test/directory. - Test parsing and complexity analyzer metrics against mock files placed in
src/test/mocks/.
Please do not report security vulnerabilities in public issues. Refer to our Security Policy for instructions on how to report security issues privately.