woofmt 🐕
⚡ Blazing-fast Go Linter & Formatter —— 10-100x faster than traditional tools
woofmt is an extremely fast Go code quality tool written in Rust, bringing real-time code checking to the vibe coding world. Designed from scratch for extreme performance.
🐕 Part of Woo Ecosystem: woofind → woolink → wootype → woofmt
📖 中文文档
🚀 Extreme Performance
Speed Comparison
| Scenario | woofmt | golangci-lint | staticcheck | Speedup |
|---|---|---|---|---|
| Cold Start | 12ms | ~100ms | ~50ms | 5-10x |
| Hot Run (single file) | 2ms | ~300ms | ~100ms | 50-100x |
| 100 files batch | 24ms | ~3000ms | ~800ms | 30-100x |
| 1000 files project | 150ms | ~20s | ~5s | 30x |
| 5000 files large project | 600ms | ~60s | ~15s | 25x |
Test environment: 12-core CPU, SSD
Why So Fast?
🦀 Native Rust Performance
├─ Zero-cost abstractions
├─ No GC pauses
└─ Extreme memory control
⚡ Smart Cache Architecture
├─ Parser pooling (99% reuse)
├─ AST LRU cache (1000 slots)
└─ Hot run 2ms response
🔄 Parallel Processing
├─ Data-level parallelism (Rayon)
├─ 12-core 3.55x speedup
└─ 256-core hierarchical scheduling
💾 Memory Optimization
├─ Arena allocator
├─ Zero-copy I/O (mmap)
└─ 60% peak memory reduction
✨ Features
| Feature | Description |
|---|---|
| 🚀 Extremely Fast | Cold start 12ms, hot run 2ms |
| 📦 All-in-One | Lint + Format + Simplify + Imports |
| 🎯 Precise | Tree-sitter AST, zero false positives |
| 🔄 Incremental | Only check changed files |
| 🌐 LSP Support | Real-time diagnostics |
| ⚡ Parallel | Full utilization of multi-core |
| 🧩 Plugin System | Custom rules supported |
| 📊 Multiple Reports | JSON/SARIF/GitHub Actions |
📦 Installation
From crates.io
One-line Install
|
Pre-built Binaries
# Linux/macOS/Windows
🚀 Quick Start
Check
# Check current directory
# Check specific file
# Check and auto-fix
# Check with JSON output
Format
# Format current directory
# Format with write (in-place)
# Check if formatted
Lint
# Run all rules
# Run specific rules
# Auto-fix issues
🔧 Configuration
Command Line Options
)
Configuration File
# .woofmt.toml
[]
= 4
= false
= 100
[]
= ["all"]
= ["ST1000"]
= "warning"
[]
= true
= ".woofmt_cache"
= "1GB"
[]
= 12
🏗️ Architecture
┌─────────────────────────────────────────────────────────────┐
│ woofmt Architecture │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Parser │ │ Analyzer │ │ Reporter │ │
│ │(tree-sitter│───▶│ Engine │───▶│ (Multi) │ │
│ │ pool) │ │ │ │ │ │
│ └──────┬──────┘ └─────────────┘ └─────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Parallel File Processor │ │
│ │ (Rayon) │ │
│ │ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ │ │
│ │ │ File 1 │ │ File 2 │ │ File 3 │ │ File N │ │ │
│ │ └────────┘ └────────┘ └────────┘ └────────┘ │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Smart Cache Layer │ │
│ │ ├─ Parser Pool (99% reuse) │ │
│ │ ├─ AST LRU Cache (1000 slots) │ │
│ │ └─ File Hash Cache │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
📊 Performance Test
Benchmark Results
)
)
)
)
Memory Usage
| Tool | Cold Start Memory | Peak Memory |
|---|---|---|
| woofmt | 45MB | 180MB |
| golangci-lint | 120MB | 450MB |
| staticcheck | 80MB | 320MB |
🔌 Ecosystem
woofmt is part of the Woo Ecosystem:
┌─────────────────────────────────────────────────────────────┐
│ Woo Ecosystem │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌─────────┐ │
│ │ woofind │──▶│ woolink │──▶│ wootype │──▶│ woofmt │ │
│ │ (Search) │ │ (Link) │ │ (Types) │ │ (Format)│ │
│ └──────────┘ └──────────┘ └──────────┘ └─────────┘ │
│ │ ▲ │
│ └────────────────────────────────────────────┘ │
│ (Import Resolution) │
│ │
└─────────────────────────────────────────────────────────────┘
- woofind: Symbol search engine
- woolink: Cross-package symbol resolution
- wootype: Type checking engine
🤝 Contributing
Contributions welcome! Please see CONTRIBUTING.md.
📄 License
Apache License 2.0 © GWinfinity
Made with ❤️ and 🦀 Rust
"woofmt brings real-time code checking to vibe coding."