Go Quality Gate logo Go Quality Gate
GitHub

Language-Agnostic Code Quality Control

A code quality control tool built in Go, distributed as a single binary with no external runtime dependencies. Provides Git hooks, automatic tool setup, and multi-language support with enhanced visual feedback.

Terminal
$ 

🏗️ Single Binary

Zero runtime dependencies - no Python, Node.js, or external tools required. Just download and run.

🔧 Automatic Setup

Automatically installs and configures quality tools based on your project's languages and needs.

🌍 Multi-Language Support

Supports Go, Python, JavaScript, TypeScript, and more in the same repository with language detection.

📊 Enhanced Observability

Beautiful spinners, execution timing, real-time feedback, and structured JSON output for CI/CD.

🔒 Built-in Security

Automatic secret scanning with Gitleaks integration in your commit workflow to prevent leaks.

⚡ Native Performance

Instant execution without interpreters. Built with Go for maximum speed and efficiency.

� Auto-Fix Support

Automatically fix formatting and linting issues with the --fix flag.

🚀 CI/CD Ready

Clean JSON output and exit codes perfect for automation pipelines and GitHub Actions.

🪝 Git Hooks Integration

Seamless integration with Git pre-commit and pre-push hooks for automated quality checks.

� QuickStart

Get started with Go Quality Gate in just a few steps.

  1. Download the binary for your platform
    # Linux (x64)
    wget https://github.com/dmux/go-quality-gate/releases/latest/download/quality-gate-linux-amd64
    chmod +x quality-gate-linux-amd64
    sudo mv quality-gate-linux-amd64 /usr/local/bin/quality-gate
    
    # macOS (Apple Silicon)
    wget https://github.com/dmux/go-quality-gate/releases/latest/download/quality-gate-darwin-arm64
    chmod +x quality-gate-darwin-arm64
    sudo mv quality-gate-darwin-arm64 /usr/local/bin/quality-gate
  2. Initialize in your project
    cd your-project
    quality-gate --init
  3. Install Git hooks
    quality-gate --install
  4. That's it! Now quality checks run automatically on git commit
    git commit -m "feat: new feature"
    # Quality checks will run automatically

📥 Installation Options

Choose the installation method that works best for you.

Pre-built Binary (Recommended)

Download the latest release for your platform from GitHub.

Download Release

Go Install

Install directly using the Go toolchain.

go install github.com/dmux/go-quality-gate/cmd/quality-gate@latest

🐳 Docker

Run with Docker for containerized environments.

docker run --rm ghcr.io/dmux/go-quality-gate:latest --version

🔨 Build from Source

Clone and build yourself for development.

git clone https://github.com/dmux/go-quality-gate.git
cd go-quality-gate
make build

💻 Usage

Learn how to use Go Quality Gate in your workflow.

# Automatic execution via Git hooks
git commit -m "feat: new feature"
# Quality checks run automatically

# Manual execution
quality-gate pre-commit

# With automatic fixes
quality-gate --fix pre-commit

# JSON output for CI/CD pipelines
quality-gate --output=json pre-commit

# Check version
quality-gate --version

# Initialize new project
quality-gate --init

⚙️ Configuration

Configure Go Quality Gate with quality.yml.

tools:
  - name: "Gitleaks"
    check_command: "gitleaks version"
    install_command: "go install github.com/zricethezav/gitleaks/v8@latest"
  - name: "Ruff (Python)"
    check_command: "ruff --version"
    install_command: "pip install ruff"

hooks:
  security:
    pre-commit:
      - name: "🔒 Security Check"
        command: "gitleaks detect --no-git --source . --verbose"
        output_rules:
          on_failure_message: "Secret leak detected!"

  python-backend:
    pre-commit:
      - name: "🎨 Format Check (Ruff)"
        command: "ruff format ./backend --check"
        fix_command: "ruff format ./backend"
        output_rules:
          show_on: failure
          on_failure_message: "Run 'quality-gate --fix' to format."

  typescript-frontend:
    pre-commit:
      - name: "🎨 Format Check (Prettier)"
        command: "npx prettier --check 'frontend/**/*.{ts,tsx}'"
        fix_command: "npx prettier --write 'frontend/**/*.{ts,tsx}'"

🛠️ Supported Tools

Automatically detects and configures quality tools based on your project.

🐹 Go Projects

  • gofmt - Code formatting
  • goimports - Import management
  • golangci-lint - Comprehensive linting
  • go vet - Static analysis
  • gosec - Security scanning

🐍 Python Projects

  • black - Code formatting
  • ruff - Fast linting & formatting
  • isort - Import sorting
  • flake8 - Style checking
  • mypy - Type checking
  • bandit - Security scanning

📦 Node.js Projects

  • prettier - Code formatting
  • eslint - Linting & analysis
  • npm audit - Security scanning
  • tsc - TypeScript checking

🌐 Universal Tools

  • gitleaks - Secret scanning
  • shellcheck - Shell script analysis
  • hadolint - Dockerfile linting
  • yamllint - YAML validation

🔧 Custom Tools

Define your own tools and commands in quality.yml. Go Quality Gate can integrate with any command-line tool that returns proper exit codes.