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

Getting Started

  1. Fork the repository on GitHub
  2. Clone your fork:
    git clone https://github.com/<your-username>/jscan.git
    cd jscan
    
  3. Install dependencies:
    go mod download
    

Build and Test

The project uses a Makefile for common development tasks:

CommandDescription
make buildBuild the jscan binary
make testRun the test suite
make lintRun golangci-lint
make fmtFormat code with go fmt
make coverageRun tests with coverage report

Before submitting a pull request, ensure all checks pass:

make lint
make test

Pull Request Guidelines

  1. Create a feature branch from main:
    git checkout -b feat/my-feature
    
  2. Write tests for any new functionality or bug fixes.
  3. Run lint and tests before pushing:
    make lint
    make test
    
  4. Submit a pull request against the main branch with a clear description of the changes.

Commit Message Convention

This project follows Conventional Commits:

<type>: <description>

[optional body]

[optional footer(s)]

Types

TypeDescription
featA new feature
fixA bug fix
docsDocumentation only changes
choreMaintenance tasks (deps, CI, etc.)
refactorCode change that neither fixes a bug nor adds a feature
testAdding 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 (or make fmt) to format your code before committing.
  • Run golangci-lint (or make lint) to catch common issues.
  • Follow standard Go conventions and idioms.