Contributing to jscan
February 10, 2026 ยท View on GitHub
Thank you for your interest in contributing to jscan! This document provides guidelines and instructions for contributing.
Development Environment Setup
Prerequisites
- Go 1.24+ - Download Go
- golangci-lint - Install instructions
- Make - Available by default on macOS and Linux
Getting Started
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/<your-username>/jscan.git cd jscan - Install dependencies:
go mod download
Build and Test
The project uses a Makefile for common development tasks:
| Command | Description |
|---|---|
make build | Build the jscan binary |
make test | Run the test suite |
make lint | Run golangci-lint |
make fmt | Format code with go fmt |
make coverage | Run tests with coverage report |
Before submitting a pull request, ensure all checks pass:
make lint
make test
Pull Request Guidelines
- Create a feature branch from
main:git checkout -b feat/my-feature - Write tests for any new functionality or bug fixes.
- Run lint and tests before pushing:
make lint make test - Submit a pull request against the
mainbranch with a clear description of the changes.
Commit Message Convention
This project follows Conventional Commits:
<type>: <description>
[optional body]
[optional footer(s)]
Types
| Type | Description |
|---|---|
feat | A new feature |
fix | A bug fix |
docs | Documentation only changes |
chore | Maintenance tasks (deps, CI, etc.) |
refactor | Code change that neither fixes a bug nor adds a feature |
test | Adding or updating tests |
Examples
feat: add support for Vue.js single-file components
fix: resolve false positive in dead code detection for re-exports
docs: update README with new CLI options
chore: upgrade tree-sitter dependency to v0.25
Code Style
- Run
go fmt(ormake fmt) to format your code before committing. - Run
golangci-lint(ormake lint) to catch common issues. - Follow standard Go conventions and idioms.