- Simplified README.md by moving detailed command docs, workflows, and development info to dedicated user-guide/ and developer-guide/ directories. - Created index.md files for both guides to improve navigation. - Extracted individual command guides (e.g., chat.md, edit.md) into user-guide/ for focused, maintainable documentation. - Moved architecture, configuration, and troubleshooting to developer-guide/. - Updated README links to point to the new docs structure.
1.7 KiB
1.7 KiB
🔧 Lint Guide
The lint command is an AI-powered linter that identifies issues in your code and optionally provides AI-suggested fixes. It's designed to work with multiple languages and provide actionable suggestions.
Key Features
- Multi-language Support: Automatically detects and lints Go, Python, C/C++, JS/TS, Rust, and more.
- AI-Suggested Fixes: Not only finds issues but can also suggest how to fix them.
- Interactive Preview: See the proposed fixes in a diff format before applying them.
- Clean Code: Grok is instructed to provide minimal, idiomatic fixes that match your project's style.
Usage
Automatically detect language, run linter, and apply AI-suggested fixes.
# Just check for issues (no fixes)
grokkit lint main.go --dry-run
# Interactive fix (preview + confirmation)
grokkit lint app.py
# Auto-fix without confirmation
grokkit lint server.js --auto-fix
# Use specific model
grokkit lint script.rb -m grok-4
Supported languages
- Go (golangci-lint, go vet)
- Python (pylint, flake8, ruff)
- JavaScript/JSX (eslint)
- TypeScript/TSX (eslint, tsc)
- Rust (clippy)
- Ruby (rubocop)
- Java (checkstyle)
- C/C++ (clang-tidy)
- Shell (shellcheck)
Safety features
- Shows preview of fixes
- Verifies fixes by re-running linter
- Requires confirmation (unless
--auto-fix)
Best Practices
- Lint early and often: Catching issues early is much easier than fixing them later.
- Review fixes carefully: AI-suggested fixes are usually excellent, but always review them to ensure they align with your project's specific requirements.
- Combine with Review: Use
lintfor basic issues andgrokkit reviewfor deeper logic analysis.