# Aider Lint Fixer
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/psf/black)
**Automated lint error detection and fixing powered by aider.chat and AI**
Aider Lint Fixer is an intelligent tool that automatically detects lint errors in your codebase and fixes them using AI-powered code generation through [aider.chat](https://aider.chat).
## ๐ **v2.0.0 Release: AI-Powered Intelligence & Enterprise Infrastructure**
### ๐ **New in v2.0.0 - Major Release**
- ๐ง **AI-Powered Intelligence**: Native lint detection, pre-lint risk assessment, and ML-driven force mode
- ๐ **Deep Code Analysis**: AST-based dependency analysis, control flow tracking, and structural analysis
- ๐ณ **Enterprise Containers**: Production-ready Docker infrastructure with multi-architecture support
- ๐ฐ **Cost Management**: Built-in LLM API cost monitoring and budget controls
- ๐ **Massive Scale**: Handle codebases with 1000+ files and complex architectural patterns
## โจ **Features**
### ๐ง **New AI-Powered Intelligence (v2.0.0)**
- ๐ **Native Lint Detection**: Automatically discovers and integrates with your project's existing lint configurations
- โ ๏ธ **Pre-Lint Risk Assessment**: Analyzes codebase health before attempting automated fixes
- ๐ค **Intelligent Force Mode**: ML-powered force mode with confidence-based auto-forcing and intelligent batching
- ๐ฐ **Cost Monitoring**: Real-time tracking and control of LLM API costs with budget limits
- ๐ **AST-Based Analysis**: Deep structural and dependency analysis for better fix quality
- ๐ **Advanced Analytics**: Control flow tracking, convergence analysis, and comprehensive metrics
### ๐ **Enhanced Interactive Mode & Progress Tracking (v1.8.0)**
- ๐ฏ **Enhanced Interactive Mode**: Per-error review with override capabilities for "unfixable" errors
- ๐ **Progress Tracking**: Visual progress bars and real-time metrics for 100+ error projects
- โก **Session Recovery**: Resume interrupted sessions with `--resume-session`
- ๐ง **Force Mode**: Override all classifications with safety confirmations
- ๐ **Community Learning**: User choices improve future error classifications
- ๐ **Performance Metrics**: Files/min, errors/min, success rates, and ETA calculations
- ๐พ **Progress Persistence**: Automatic saving and recovery for long-running operations
### ๐ง **Intelligent Learning System (v1.7.0+)**
- ๐ง **Enhanced Learning**: 46.1% fixability rate (up from 0.0% in previous versions)
- โก **High-Performance**: Aho-Corasick pattern matching for sub-millisecond classification
- ๐ฏ **TypeScript Projects**: Smart ESLint integration with project-specific configurations
- ๐ฆ **Easy Setup**: `pip install aider-lint-fixer[learning]` includes all dependencies
- ๐ **Auto-Detection**: Automatically detects `.eslintrc.js`, `tsconfig.json`, npm scripts
- ๐ **392+ Rules**: Auto-scraped from official linter documentation
### ๐ ๏ธ **Core Features**
- ๐ **Python Support**: Flake8, Pylint with profile support (basic/strict)
- ๐จ **Node.js Support**: ESLint, JSHint, Prettier with comprehensive error detection
- ๐ **Ansible Support**: ansible-lint with production-ready profiles
- ๐ค **AI-Powered Fixing**: Uses aider.chat with multiple LLM providers
- ๐ฏ **Smart Error Analysis**: Categorizes and prioritizes errors for optimal fixing
- ๐ข **Enterprise Scalability**: Handles 200+ lint issues with intelligent batching
- โ๏ธ **Profile System**: Basic (development) vs Strict (production) configurations
- ๐ **Enhanced Progress Tracking**: Visual progress bars for large projects (100+ errors)
- ๐ฎ **Interactive Modes**: Standard and enhanced interactive error review
- ๐พ **Session Management**: Save, resume, and recover interrupted operations
## ๐
**Version History**
| Version | Release Date | Key Features |
|---------|-------------|--------------|
| **v2.0.0** | 2025-08 | AI-Powered Intelligence, Deep Code Analysis, Enterprise Infrastructure |
| **v1.9.0** | 2025-08 | Community Issue Reporting, Docker Support, Pre-built Images |
| **v1.8.0** | 2025-07 | Enhanced Interactive Mode, Progress Tracking, Session Recovery |
| **v1.7.0** | 2025-06 | Learning System, Aho-Corasick Pattern Matching, TypeScript Support |
| **v1.6.0** | 2025-05 | Multi-linter Support, Profile System, Performance Improvements |
## ๐ **Supported Linter Versions**
### **Ansible Linters**
| Linter | Tested Version | Supported Versions | Profile Support |
|--------|----------------|-------------------|-----------------|
| **ansible-lint** | `25.6.1` | `25.6.1`, `25.6.x`, `25.x` | โ
basic, production |
### **Python Linters**
| Linter | Tested Version | Supported Versions | Profile Support |
|--------|----------------|-------------------|-----------------|
| **flake8** | `7.3.0` | `7.3.0`, `7.2.x`, `7.1.x`, `7.0.x`, `6.x` | โ
basic, strict |
| **pylint** | `3.3.7` | `3.3.7`, `3.3.x`, `3.2.x`, `3.1.x`, `3.0.x`, `2.x` | โ
basic, strict |
### **Node.js Linters**
| Linter | Tested Version | Supported Versions | Profile Support |
|--------|----------------|-------------------|-----------------|
| **ESLint** | `8.57.1` | `8.57.1`, `8.57.x`, `8.5.x`, `8.x`, `7.x` | โ
basic, strict |
| **JSHint** | `2.13.6` | `2.13.6`, `2.13.x`, `2.1.x`, `2.x` | โ
basic, strict |
| **Prettier** | `3.6.2` | `3.6.2`, `3.6.x`, `3.x`, `2.x` | โ
basic, strict |
### **Version Compatibility Notes**
- **Tested Version**: Explicitly tested and validated in our CI/CD
- **Supported Versions**: Expected to work based on API compatibility
- **Profile Support**: Configurable strictness levels for different environments
## ๐ Quick Start
### Prerequisites
- Python 3.11+
- [aider.chat](https://aider.chat) installed (`pip install aider-chat`)
- DeepSeek API key from [platform.deepseek.com](https://platform.deepseek.com/)
### Installation
#### Option 1: Docker (Recommended for CI/CD)
```bash
# Use pre-built Docker image from quay.io
docker run --rm -v $(pwd):/workspace:ro quay.io/takinosh/aider-lint-fixer:2.0.0 --help
# Or use with the convenience script
./scripts/containers/docker-run.sh --linters flake8,eslint
```
#### Option 2: PyPI Package
```bash
# Install aider-lint-fixer with enhanced learning features (quote for zsh compatibility)
pip install "aider-lint-fixer[learning]"
```
### ๐ **Installation**
#### **Prerequisites**
- **Python 3.11 or higher**
- **Git**
- **pip3** (usually included with Python)
- **Node.js/npm** (for Node.js linters)
- **Supported platforms**: Linux, macOS (Windows has limited support)
#### **๐ฆ Quick Installation (PyPI)**
```bash
# Install from PyPI (recommended)
pip install aider-lint-fixer
# Latest v1.9.0: Install with community issue reporting and enhanced workflows
pip install aider-lint-fixer[community]
# ๐ v1.8.0: Install with enhanced interactive and progress tracking
pip install aider-lint-fixer[progress]
# ๐ง v1.7.0: Install with learning features (recommended for 46.1% fixability rate)
pip install aider-lint-fixer[learning]
# Install with all optional features (includes community + progress + learning)
pip install aider-lint-fixer[all]
# Verify installation
aider-lint-fixer --version
```
#### **๐ง Development Installation (Git + Virtual Environment)**
##### **1. Clone and Set Up Virtual Environment**
```bash
# Clone the repository
git clone https://github.com/tosin2013/aider-lint-fixer.git
cd aider-lint-fixer
# Create virtual environment
python3 -m venv venv
# Activate virtual environment (Linux/macOS)
source venv/bin/activate
# Upgrade pip
pip3 install --upgrade pip
```
##### **2. Install aider-lint-fixer**
```bash
# Install in development mode (recommended for latest features)
pip3 install -e .
# Install dependencies
pip3 install -r requirements.txt
```
##### **3. Install Required Linters**
```bash
# Python linters
pip3 install flake8==7.3.0 pylint==3.3.7
# Ansible linters
pip3 install ansible-lint==25.6.1
# Node.js linters (requires Node.js/npm)
npm install -g eslint@8.57.1 jshint@2.13.6 prettier@3.6.2
```
##### **4. Verify Installation**
```bash
# Check version
python3 -m aider_lint_fixer --version
# Check supported linters
./scripts/check_supported_versions.sh
```
#### **๐ณ Alternative Installation Methods**
##### **Install from Git (Latest Development)**
```bash
# Install directly from Git (latest development version)
pip install git+https://github.com/tosin2013/aider-lint-fixer.git
# With virtual environment (recommended for development)
python3 -m venv aider-env && source aider-env/bin/activate && pip install git+https://github.com/tosin2013/aider-lint-fixer.git
```
##### **Install from Source (Development)**
```bash
git clone https://github.com/tosin2013/aider-lint-fixer.git
cd aider-lint-fixer
python3 -m venv venv && source venv/bin/activate
pip3 install -e .
```
#### **โก Quick Start (5 Minutes)**
```bash
# 1. Clone and setup
git clone https://github.com/tosin2013/aider-lint-fixer.git
cd aider-lint-fixer
python3 -m venv venv && source venv/bin/activate
# 2. Install
pip3 install -e . && pip3 install -r requirements.txt
# 3. Install linters (choose your language)
pip3 install flake8==7.3.0 pylint==3.3.7 ansible-lint==25.6.1
npm install -g eslint@8.57.1 jshint@2.13.6 prettier@3.6.2
# 4. Setup environment
cp .env.example .env
# Edit .env and add your API key
# 5. Test installation
python3 -m aider_lint_fixer --help
```
### **๐ง Environment Setup**
#### **API Key Configuration**
```bash
# Run the setup script (recommended)
./setup_env.sh
# Or manually create .env file
cp .env.example .env
# Edit .env and add your DeepSeek API key
# DEEPSEEK_API_KEY=your_actual_api_key_here
# Export environment variables
export $(cat .env | grep -v '^#' | xargs)
```
#### **Verify Your Setup**
```bash
# Check all supported linter versions
./scripts/check_supported_versions.sh
# Test with a sample project
python3 -m aider_lint_fixer . --linters flake8 --dry-run --verbose
```
#### **๐ง Troubleshooting Installation**
##### **Common Issues and Solutions**
**1. Python Version Issues**
```bash
# Check Python version
python3 --version # Should be 3.11+
# If python3 not found, try:
python --version # On some systems
```
**2. Virtual Environment Issues**
```bash
# If venv creation fails:
sudo apt-get install python3-venv # Ubuntu/Debian
brew install python3 # macOS
# Alternative virtual environment tools:
pip3 install virtualenv
virtualenv venv
```
**3. Permission Issues**
```bash
# If pip install fails with permissions:
pip3 install --user -e .
# Or use virtual environment (recommended):
python3 -m venv venv && source venv/bin/activate
```
**4. Node.js Linter Issues**
```bash
# Install Node.js if missing:
# Ubuntu/Debian:
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# macOS:
brew install node
# Verify installation:
node --version && npm --version
```
**5. Linter Version Conflicts**
```bash
# Check current versions:
./scripts/check_supported_versions.sh
# Install specific versions:
pip3 install flake8==7.3.0 --force-reinstall
npm install -g eslint@8.57.1 --force
```
##### **Getting Help**
- **Complete installation guide**: See [`docs/INSTALLATION_GUIDE.md`](docs/INSTALLATION_GUIDE.md)
- **Automated installation**: Run `curl -fsSL https://raw.githubusercontent.com/tosin2013/aider-lint-fixer/main/scripts/install.sh | bash`
- **Check supported versions**: `./scripts/check_supported_versions.sh`
- **Verbose output**: Add `--verbose` to any command
- **Debug mode**: Set `DEBUG=1` environment variable
- **Issues**: Report at [GitHub Issues](https://github.com/tosin2013/aider-lint-fixer/issues)
### Basic Usage
```bash
# Test on a small project first
python -m aider_lint_fixer /path/to/your/project --max-files 1
# Run on your project
python -m aider_lint_fixer /path/to/your/project
# Limit scope for large projects
python -m aider_lint_fixer /path/to/your/project --max-files 5 --max-errors 10
# Verbose output for debugging
python -m aider_lint_fixer /path/to/your/project --verbose
```
### ๐ Community Issue Reporting (v1.9.0)
Transform your successful fixes into community improvements:
```bash
# Enhanced interactive mode with community reporting
aider-lint-fixer --enhanced-interactive --linters ansible-lint
# After successful overrides, system prompts:
# "Would you like to help improve the system by creating community issues?"
# Browser opens with pre-filled GitHub issue for community benefit
```
**Community Features:**
- ๐ฏ **Automatic issue generation**: Successful override patterns become GitHub issues
- ๐ **Community learning**: Your fixes help improve classification for everyone
- ๐ **Pattern analysis**: System identifies errors that should be reclassified
- ๐ **One-click contribution**: Pre-filled GitHub issues with detailed analysis
- ๐ **Continuous improvement**: Higher automatic fix rates through shared knowledge
### ๐ฏ Enhanced Interactive Mode (v1.8.0)
Perfect for reviewing and overriding error classifications:
```bash
# Enhanced interactive mode - review each error individually
python -m aider_lint_fixer --enhanced-interactive --linters ansible-lint
# Force mode - attempt to fix ALL errors (use with caution)
python -m aider_lint_fixer --force --linters flake8
# Standard interactive mode - confirm before starting
python -m aider_lint_fixer --interactive --linters pylint
```
**Enhanced Interactive Features:**
- ๐ฏ **Per-error decisions**: Fix, skip, or abort for each error
- โ ๏ธ **Override "unfixable" errors**: With proper warnings and confirmations
- ๐ **Community learning**: Your choices improve future classifications
- ๐ **Confidence scoring**: Rate your confidence to help the learning system
### ๐ Progress Tracking for Large Projects (v1.8.0)
Automatic enhanced tracking for projects with 100+ lint errors:
```bash
# Large projects automatically get enhanced progress tracking
python -m aider_lint_fixer --linters ansible-lint # 100+ errors detected
# Install with progress tracking support
pip install aider-lint-fixer[progress]
# Session management
python -m aider_lint_fixer --list-sessions
python -m aider_lint_fixer --resume-session progress_1234567890
```
**Progress Tracking Features:**
- ๐ **Visual progress bars**: Real-time file and error progress
- โก **Performance metrics**: Files/min, errors/min, success rates
- ๐ **Time estimation**: ETA calculations for completion
- ๐พ **Session persistence**: Automatic saving and recovery
- ๐ **Resume capability**: Continue interrupted operations
**Example Output for Large Projects:**
```
๐ Large Project Detected (250 errors)
๐ Files: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 8/10 [80%]
๐ง Errors: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 200/250 [80%]
โก Real-time Status:
Processing rate: 2.5 files/min, 62.5 errors/min
Success rate: 85.2% (213/250)
ETA: 14:32:15
```
## ๐ Supported Linters
### Python
- **flake8** - Style guide enforcement
- **pylint** - Code analysis and quality
- **black** - Code formatting
- **isort** - Import sorting
- **mypy** - Type checking
### JavaScript/TypeScript
- **eslint** - Linting and code quality
- **prettier** - Code formatting
### Go
- **golint** - Go linting
- **gofmt** - Go formatting
- **go vet** - Static analysis
### Rust
- **rustfmt** - Rust formatting
- **clippy** - Rust linting
### Ansible
- **ansible-lint** - Ansible playbook linting
## โ๏ธ Configuration
Create a `.aider-lint-fixer.yml` file in your project root:
```yaml
# LLM Configuration
llm:
provider: "deepseek" # Options: deepseek, openrouter, ollama
model: "deepseek/deepseek-chat"
fallback_providers:
- "openrouter"
- "ollama"
# Linter Configuration
linters:
auto_detect: true
enabled:
- flake8
- eslint
- golint
- rustfmt
- ansible-lint
# Aider Configuration
aider:
auto_commit: false
backup_files: true
max_retries: 3
# Project Settings
project:
exclude_patterns:
- "*.min.js"
- "node_modules/"
- "__pycache__/"
- ".git/"
```
## ๐ฏ Command Line Options
```bash
python -m aider_lint_fixer [PROJECT_PATH] [OPTIONS]
Options:
--config, -c PATH Path to configuration file
--llm TEXT LLM provider (deepseek, openrouter, ollama)
--model TEXT Specific model to use
--linters TEXT Comma-separated list of linters to run
--max-files INTEGER Maximum number of files to process
--max-errors INTEGER Maximum errors to fix per file
--dry-run Show what would be fixed without making changes
--interactive Confirm each fix before applying
--verbose, -v Enable verbose output
--log-file PATH Path to log file
--no-banner Disable banner output
--help Show this message and exit
--stats Show learning statistics and exit
```
## ๐ง Learning Features
### **Intelligent Error Classification**
Aider-lint-fixer includes an advanced learning system that improves accuracy over time by learning from successful and failed fix attempts.
#### **๐ฆ Installation for Learning**
```bash
# Install with learning features (includes scikit-learn)
pip install aider-lint-fixer[learning]
# Or install learning dependencies manually
pip install scikit-learn>=1.0.0 requests>=2.25.0 beautifulsoup4>=4.9.0 pyahocorasick>=1.4.0
```
#### **๐ How Learning Works**
- **Automatic**: Learning happens automatically during normal operation
- **No configuration needed**: Works out of the box once dependencies are installed
- **Language-specific**: Separate models for Python, JavaScript, Ansible, etc.
- **Persistent**: Learning data survives between runs
#### **๐ Monitor Learning Progress**
```bash
# View learning statistics
aider-lint-fixer --stats
# View in JSON format
aider-lint-fixer --stats --output-format json
# Detailed cache management
python -m aider_lint_fixer.cache_cli --action stats
```
#### **๐ฏ Learning Benefits**
- **Improved Accuracy**: 46.1% fixability rate on real projects
- **Faster Classification**: Sub-millisecond error analysis
- **Project-Specific**: Learns patterns specific to your codebase
- **Conservative Approach**: Avoids false positives
#### **๐ Learning Data Storage**
Learning data is stored in `.aider-lint-cache/`:
```
.aider-lint-cache/
โโโ ansible_training.json # Ansible-specific learning
โโโ python_training.json # Python-specific learning
โโโ javascript_training.json # JavaScript-specific learning
โโโ scraped_rules.json # Web-scraped rule knowledge
```
#### **๐งน Cache Management**
```bash
# Clean old learning data (30+ days)
python -m aider_lint_fixer.cache_cli --action cleanup --max-age-days 30
# Export learning data for backup
python -m aider_lint_fixer.cache_cli --action export --file backup.json
# Import learning data from backup
python -m aider_lint_fixer.cache_cli --action import --file backup.json
```
#### **๐ง Troubleshooting Learning Issues**
**Problem: "Found 0 fixable errors (0.0% of X total baseline errors)"**
This usually indicates missing learning dependencies. Check your setup:
```bash
# Quick diagnosis
python scripts/check_learning_setup.py
# Or check via stats
aider-lint-fixer --stats
```
**Common Issues:**
- **Missing scikit-learn**: `pip install aider-lint-fixer[learning]`
- **Missing Aho-Corasick**: Causes "using fallback pattern matching" warning
- **No scraped rules**: Tool will auto-create them if web dependencies are available
**Expected vs Actual (v1.7.0):**
```bash
# โ Without learning dependencies (v1.6.0 and earlier)
Found 0 fixable errors (0.0% of 58 total baseline errors)
# โ
With learning dependencies (v1.7.0+)
Found 27 fixable errors (46.1% of 58 total baseline errors)
```
**๐ฏ v1.7.0 Performance**: This release resolves the critical 0.0% fixability issue!
## ๐ Examples
### Python Project
```bash
# Focus on Python linters
python -m aider_lint_fixer --linters flake8,black,isort
# Fix formatting issues only
python -m aider_lint_fixer --linters black,isort --max-errors 20
```
### JavaScript Project
```bash
# Focus on JavaScript linters
python -m aider_lint_fixer --linters eslint,prettier
# Interactive fixing for complex project
python -m aider_lint_fixer --linters eslint --interactive
```
### Ansible Project
```bash
# Focus on Ansible linting
python -m aider_lint_fixer --linters ansible-lint
# Dry run to see Ansible issues
python -m aider_lint_fixer --linters ansible-lint --dry-run
# Enhanced interactive mode for Ansible (v1.8.0)
python -m aider_lint_fixer --enhanced-interactive --linters ansible-lint
```
### Large Project Examples (v1.8.0)
```bash
# Large project with automatic progress tracking
python -m aider_lint_fixer --linters flake8,pylint # 100+ errors
# Force mode for aggressive fixing (use with caution)
python -m aider_lint_fixer --force --max-errors 50 --linters eslint
# Resume interrupted session
python -m aider_lint_fixer --list-sessions
python -m aider_lint_fixer --resume-session progress_1234567890
# Enhanced interactive with progress tracking
python -m aider_lint_fixer --enhanced-interactive --linters ansible-lint
```
### Community Contribution Examples (v1.9.0)
```bash
# Override "unfixable" errors and contribute to community
python -m aider_lint_fixer --enhanced-interactive --linters ansible-lint
# โ Override yaml[trailing-spaces] classification
# โ System records successful fix pattern
# โ Prompts to create GitHub issue for community benefit
# Example community workflow:
# 1. User overrides "unfixable" error โ Success
# 2. System analyzes pattern โ Identifies improvement opportunity
# 3. GitHub issue generated โ "Enhancement: Improve ansible-lint yaml[trailing-spaces] classification"
# 4. Community benefits โ Higher automatic fix rates for everyone
# Install with community features
pip install aider-lint-fixer[community]
```
## ๐ง How It Works
1. **Project Detection**: Automatically scans your project to identify languages, package managers, and lint configurations
2. **Lint Execution**: Runs appropriate linters and collects error reports
3. **Error Analysis**: Categorizes errors by type and complexity, prioritizes them for fixing
4. **AI-Powered Fixing**: Uses aider.chat with your chosen LLM to generate and apply fixes
5. **Verification**: Re-runs linters to verify fixes and reports success rates
6. **Community Learning** (v1.9.0): Records successful overrides and generates GitHub issues to improve the system for everyone
## ๐ ๏ธ Development
This project includes a comprehensive Makefile for development tasks:
```bash
# Show all available commands
make help
# Setup development environment
make dev-setup
# Code quality checks
make lint # Run linters
make format # Format code with black and isort
make type-check # Run mypy type checking
# Testing
make test # Run tests
make test-coverage # Run tests with coverage
# Security
make security # Run security checks
make audit # Comprehensive security audit
# Build and package
make build # Build distribution packages
make clean # Clean build artifacts
# Self-testing (test the tool on itself!)
make self-test # Run aider-lint-fixer on its own code
# Complete quality assurance
make qa # Run all quality checks
make ci # Full CI pipeline
```
## ๐ค Automated Dependency Management
This project uses **Dependabot** for automated dependency updates and security monitoring:
### ๐
Update Schedule
- **Python dependencies**: Weekly (Mondays) - `pip` ecosystem
- **Node.js dependencies**: Weekly (Tuesdays) - `npm` ecosystem
- **GitHub Actions**: Weekly (Wednesdays) - Workflow dependencies
- **Docker images**: Weekly (Thursdays) - Base image updates
- **Security updates**: **Immediate** - Critical vulnerabilities
### ๐ Auto-Merge Policy
- โ
**Security updates**: Auto-merged after tests pass
- โ
**Patch updates**: Auto-merged after validation
- โ
**Testing dependencies**: Auto-merged (pytest, coverage, mock)
- โ
**Code quality tools**: Auto-merged (black, isort, flake8, mypy)
- โ
**GitHub Actions**: Auto-merged (actions/*, github/*)
- โ ๏ธ **Major updates**: Require manual review
- โ ๏ธ **Core dependencies**: Require manual review (aider-chat, click)
### ๐ Weekly Health Checks (Sundays)
- **๐ Security audit**: Vulnerability scanning with `safety`, `bandit`, `pip-audit`
- **๐
Outdated dependencies**: Tracking and automated PR creation
- **๐ License compliance**: Monitoring for license compatibility
- **๐ Dependency conflicts**: Detecting version incompatibilities
### ๐ก๏ธ Security Features
- **Immediate security alerts**: Critical vulnerabilities trigger instant PRs
- **Automated testing**: All updates tested before merge
- **License monitoring**: GPL and unknown licenses flagged
- **Conflict detection**: Dependency version conflicts identified
## ๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
### ๐ง **Development Setup for Contributors**
#### **Quick Setup**
```bash
# Automated installation for contributors
curl -fsSL https://raw.githubusercontent.com/tosin2013/aider-lint-fixer/main/scripts/install.sh | bash
# Or manual setup
git clone https://github.com/tosin2013/aider-lint-fixer.git
cd aider-lint-fixer
python3 -m venv venv && source venv/bin/activate
pip3 install -e . && pip3 install -r requirements.txt
```
#### **Install Supported Linter Versions**
```bash
# Check your current versions
./scripts/check_supported_versions.sh
# Install supported versions
pip3 install flake8==7.3.0 pylint==3.3.7 ansible-lint==25.6.1
npm install -g eslint@8.57.1 jshint@2.13.6 prettier@3.6.2
```
### ๐ **Version Testing**
```bash
# Test Python linters
./scripts/version_tests/python_linters_test.sh
# Test Node.js linters
./scripts/version_tests/nodejs_linters_test.sh
# Run integration tests
python -m pytest tests/ -v
```
### ๐ **Version Reference**
- **Supported Versions**: See table above or `aider_lint_fixer/supported_versions.py`
- **Testing Guide**: `docs/LINTER_TESTING_GUIDE.md`
- **Node.js Guide**: `docs/NODEJS_LINTERS_GUIDE.md`
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## ๐จโ๐ป Author
**Tosin Akinosho**
- GitHub: [@tosin2023](https://github.com/tosin2023)
- Project: [aider-lint-fixer](https://github.com/tosin2023/aider-lint-fixer)
## ๐ Acknowledgments
- [aider.chat](https://aider.chat) for the amazing AI-powered code editing capabilities
- The open-source community for the various linters and tools that make this project possible
- All the LLM providers (DeepSeek, OpenRouter, Ollama) for making AI accessible
## ๐ Documentation
For detailed usage instructions, configuration options, and troubleshooting, see:
- [Usage Guide](Aider%20Lint%20Fixer%20-%20Usage%20Guide.md)
- [Complete Solution Documentation](Aider%20Lint%20Fixer%20-%20Complete%20Solution%20Delivery.md)
---
**Made with โค๏ธ by Tosin Akinosho**
Raw data
{
"_id": null,
"home_page": "https://github.com/tosin2023/aider-lint-fixer",
"name": "aider-lint-fixer",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Tosin Akinosho",
"author_email": "Aider Lint Fixer Team <tosin@decisioncrafters.com>",
"download_url": "https://files.pythonhosted.org/packages/0e/b2/32893332f705aca383606adeeda60dd9a501296ce5f9669ad97742669fc9/aider_lint_fixer-2.0.0.tar.gz",
"platform": null,
"description": "# Aider Lint Fixer\n\n[](https://www.python.org/downloads/)\n[](https://opensource.org/licenses/MIT)\n[](https://github.com/psf/black)\n\n**Automated lint error detection and fixing powered by aider.chat and AI**\n\nAider Lint Fixer is an intelligent tool that automatically detects lint errors in your codebase and fixes them using AI-powered code generation through [aider.chat](https://aider.chat).\n\n## \ud83c\udf89 **v2.0.0 Release: AI-Powered Intelligence & Enterprise Infrastructure**\n\n### \ud83d\ude80 **New in v2.0.0 - Major Release**\n- \ud83e\udde0 **AI-Powered Intelligence**: Native lint detection, pre-lint risk assessment, and ML-driven force mode\n- \ud83d\udd17 **Deep Code Analysis**: AST-based dependency analysis, control flow tracking, and structural analysis\n- \ud83d\udc33 **Enterprise Containers**: Production-ready Docker infrastructure with multi-architecture support\n- \ud83d\udcb0 **Cost Management**: Built-in LLM API cost monitoring and budget controls\n- \ud83d\udcc8 **Massive Scale**: Handle codebases with 1000+ files and complex architectural patterns\n\n## \u2728 **Features**\n\n### \ud83e\udde0 **New AI-Powered Intelligence (v2.0.0)**\n- \ud83d\udd0d **Native Lint Detection**: Automatically discovers and integrates with your project's existing lint configurations\n- \u26a0\ufe0f **Pre-Lint Risk Assessment**: Analyzes codebase health before attempting automated fixes\n- \ud83e\udd16 **Intelligent Force Mode**: ML-powered force mode with confidence-based auto-forcing and intelligent batching\n- \ud83d\udcb0 **Cost Monitoring**: Real-time tracking and control of LLM API costs with budget limits\n- \ud83d\udd17 **AST-Based Analysis**: Deep structural and dependency analysis for better fix quality\n- \ud83d\udcca **Advanced Analytics**: Control flow tracking, convergence analysis, and comprehensive metrics\n\n### \ud83d\udcca **Enhanced Interactive Mode & Progress Tracking (v1.8.0)**\n- \ud83c\udfaf **Enhanced Interactive Mode**: Per-error review with override capabilities for \"unfixable\" errors\n- \ud83d\udcca **Progress Tracking**: Visual progress bars and real-time metrics for 100+ error projects\n- \u26a1 **Session Recovery**: Resume interrupted sessions with `--resume-session`\n- \ud83d\udd27 **Force Mode**: Override all classifications with safety confirmations\n- \ud83c\udf0d **Community Learning**: User choices improve future error classifications\n- \ud83d\udcc8 **Performance Metrics**: Files/min, errors/min, success rates, and ETA calculations\n- \ud83d\udcbe **Progress Persistence**: Automatic saving and recovery for long-running operations\n\n### \ud83e\udde0 **Intelligent Learning System (v1.7.0+)**\n- \ud83e\udde0 **Enhanced Learning**: 46.1% fixability rate (up from 0.0% in previous versions)\n- \u26a1 **High-Performance**: Aho-Corasick pattern matching for sub-millisecond classification\n- \ud83c\udfaf **TypeScript Projects**: Smart ESLint integration with project-specific configurations\n- \ud83d\udce6 **Easy Setup**: `pip install aider-lint-fixer[learning]` includes all dependencies\n- \ud83d\udd0d **Auto-Detection**: Automatically detects `.eslintrc.js`, `tsconfig.json`, npm scripts\n- \ud83d\udcca **392+ Rules**: Auto-scraped from official linter documentation\n\n### \ud83d\udee0\ufe0f **Core Features**\n- \ud83d\udc0d **Python Support**: Flake8, Pylint with profile support (basic/strict)\n- \ud83d\udfe8 **Node.js Support**: ESLint, JSHint, Prettier with comprehensive error detection\n- \ud83d\udccb **Ansible Support**: ansible-lint with production-ready profiles\n- \ud83e\udd16 **AI-Powered Fixing**: Uses aider.chat with multiple LLM providers\n- \ud83c\udfaf **Smart Error Analysis**: Categorizes and prioritizes errors for optimal fixing\n- \ud83c\udfe2 **Enterprise Scalability**: Handles 200+ lint issues with intelligent batching\n- \u2699\ufe0f **Profile System**: Basic (development) vs Strict (production) configurations\n- \ud83d\udcca **Enhanced Progress Tracking**: Visual progress bars for large projects (100+ errors)\n- \ud83c\udfae **Interactive Modes**: Standard and enhanced interactive error review\n- \ud83d\udcbe **Session Management**: Save, resume, and recover interrupted operations\n\n## \ud83d\udcc5 **Version History**\n\n| Version | Release Date | Key Features |\n|---------|-------------|--------------|\n| **v2.0.0** | 2025-08 | AI-Powered Intelligence, Deep Code Analysis, Enterprise Infrastructure |\n| **v1.9.0** | 2025-08 | Community Issue Reporting, Docker Support, Pre-built Images |\n| **v1.8.0** | 2025-07 | Enhanced Interactive Mode, Progress Tracking, Session Recovery |\n| **v1.7.0** | 2025-06 | Learning System, Aho-Corasick Pattern Matching, TypeScript Support |\n| **v1.6.0** | 2025-05 | Multi-linter Support, Profile System, Performance Improvements |\n\n## \ud83d\udccb **Supported Linter Versions**\n\n### **Ansible Linters**\n| Linter | Tested Version | Supported Versions | Profile Support |\n|--------|----------------|-------------------|-----------------|\n| **ansible-lint** | `25.6.1` | `25.6.1`, `25.6.x`, `25.x` | \u2705 basic, production |\n\n### **Python Linters**\n| Linter | Tested Version | Supported Versions | Profile Support |\n|--------|----------------|-------------------|-----------------|\n| **flake8** | `7.3.0` | `7.3.0`, `7.2.x`, `7.1.x`, `7.0.x`, `6.x` | \u2705 basic, strict |\n| **pylint** | `3.3.7` | `3.3.7`, `3.3.x`, `3.2.x`, `3.1.x`, `3.0.x`, `2.x` | \u2705 basic, strict |\n\n### **Node.js Linters**\n| Linter | Tested Version | Supported Versions | Profile Support |\n|--------|----------------|-------------------|-----------------|\n| **ESLint** | `8.57.1` | `8.57.1`, `8.57.x`, `8.5.x`, `8.x`, `7.x` | \u2705 basic, strict |\n| **JSHint** | `2.13.6` | `2.13.6`, `2.13.x`, `2.1.x`, `2.x` | \u2705 basic, strict |\n| **Prettier** | `3.6.2` | `3.6.2`, `3.6.x`, `3.x`, `2.x` | \u2705 basic, strict |\n\n### **Version Compatibility Notes**\n- **Tested Version**: Explicitly tested and validated in our CI/CD\n- **Supported Versions**: Expected to work based on API compatibility\n- **Profile Support**: Configurable strictness levels for different environments\n\n## \ud83d\ude80 Quick Start\n\n### Prerequisites\n\n- Python 3.11+\n- [aider.chat](https://aider.chat) installed (`pip install aider-chat`)\n- DeepSeek API key from [platform.deepseek.com](https://platform.deepseek.com/)\n\n### Installation\n\n#### Option 1: Docker (Recommended for CI/CD)\n```bash\n# Use pre-built Docker image from quay.io\ndocker run --rm -v $(pwd):/workspace:ro quay.io/takinosh/aider-lint-fixer:2.0.0 --help\n\n# Or use with the convenience script\n./scripts/containers/docker-run.sh --linters flake8,eslint\n```\n\n#### Option 2: PyPI Package\n```bash\n# Install aider-lint-fixer with enhanced learning features (quote for zsh compatibility)\npip install \"aider-lint-fixer[learning]\"\n```\n\n### \ud83d\ude80 **Installation**\n\n#### **Prerequisites**\n- **Python 3.11 or higher**\n- **Git**\n- **pip3** (usually included with Python)\n- **Node.js/npm** (for Node.js linters)\n- **Supported platforms**: Linux, macOS (Windows has limited support)\n\n#### **\ud83d\udce6 Quick Installation (PyPI)**\n\n```bash\n# Install from PyPI (recommended)\npip install aider-lint-fixer\n\n# Latest v1.9.0: Install with community issue reporting and enhanced workflows\npip install aider-lint-fixer[community]\n\n# \ud83d\udcca v1.8.0: Install with enhanced interactive and progress tracking\npip install aider-lint-fixer[progress]\n\n# \ud83e\udde0 v1.7.0: Install with learning features (recommended for 46.1% fixability rate)\npip install aider-lint-fixer[learning]\n\n# Install with all optional features (includes community + progress + learning)\npip install aider-lint-fixer[all]\n\n# Verify installation\naider-lint-fixer --version\n```\n\n#### **\ud83d\udd27 Development Installation (Git + Virtual Environment)**\n\n##### **1. Clone and Set Up Virtual Environment**\n```bash\n# Clone the repository\ngit clone https://github.com/tosin2013/aider-lint-fixer.git\ncd aider-lint-fixer\n\n# Create virtual environment\npython3 -m venv venv\n\n# Activate virtual environment (Linux/macOS)\nsource venv/bin/activate\n\n# Upgrade pip\npip3 install --upgrade pip\n```\n\n##### **2. Install aider-lint-fixer**\n```bash\n# Install in development mode (recommended for latest features)\npip3 install -e .\n\n# Install dependencies\npip3 install -r requirements.txt\n```\n\n##### **3. Install Required Linters**\n```bash\n# Python linters\npip3 install flake8==7.3.0 pylint==3.3.7\n\n# Ansible linters\npip3 install ansible-lint==25.6.1\n\n# Node.js linters (requires Node.js/npm)\nnpm install -g eslint@8.57.1 jshint@2.13.6 prettier@3.6.2\n```\n\n##### **4. Verify Installation**\n```bash\n# Check version\npython3 -m aider_lint_fixer --version\n\n# Check supported linters\n./scripts/check_supported_versions.sh\n```\n\n#### **\ud83d\udc33 Alternative Installation Methods**\n\n##### **Install from Git (Latest Development)**\n```bash\n# Install directly from Git (latest development version)\npip install git+https://github.com/tosin2013/aider-lint-fixer.git\n\n# With virtual environment (recommended for development)\npython3 -m venv aider-env && source aider-env/bin/activate && pip install git+https://github.com/tosin2013/aider-lint-fixer.git\n```\n\n##### **Install from Source (Development)**\n```bash\ngit clone https://github.com/tosin2013/aider-lint-fixer.git\ncd aider-lint-fixer\npython3 -m venv venv && source venv/bin/activate\npip3 install -e .\n```\n\n#### **\u26a1 Quick Start (5 Minutes)**\n\n```bash\n# 1. Clone and setup\ngit clone https://github.com/tosin2013/aider-lint-fixer.git\ncd aider-lint-fixer\npython3 -m venv venv && source venv/bin/activate\n\n# 2. Install\npip3 install -e . && pip3 install -r requirements.txt\n\n# 3. Install linters (choose your language)\npip3 install flake8==7.3.0 pylint==3.3.7 ansible-lint==25.6.1\nnpm install -g eslint@8.57.1 jshint@2.13.6 prettier@3.6.2\n\n# 4. Setup environment\ncp .env.example .env\n# Edit .env and add your API key\n\n# 5. Test installation\npython3 -m aider_lint_fixer --help\n```\n\n### **\ud83d\udd27 Environment Setup**\n\n#### **API Key Configuration**\n```bash\n# Run the setup script (recommended)\n./setup_env.sh\n\n# Or manually create .env file\ncp .env.example .env\n# Edit .env and add your DeepSeek API key\n# DEEPSEEK_API_KEY=your_actual_api_key_here\n\n# Export environment variables\nexport $(cat .env | grep -v '^#' | xargs)\n```\n\n#### **Verify Your Setup**\n```bash\n# Check all supported linter versions\n./scripts/check_supported_versions.sh\n\n# Test with a sample project\npython3 -m aider_lint_fixer . --linters flake8 --dry-run --verbose\n```\n\n#### **\ud83d\udd27 Troubleshooting Installation**\n\n##### **Common Issues and Solutions**\n\n**1. Python Version Issues**\n```bash\n# Check Python version\npython3 --version # Should be 3.11+\n\n# If python3 not found, try:\npython --version # On some systems\n```\n\n**2. Virtual Environment Issues**\n```bash\n# If venv creation fails:\nsudo apt-get install python3-venv # Ubuntu/Debian\nbrew install python3 # macOS\n\n# Alternative virtual environment tools:\npip3 install virtualenv\nvirtualenv venv\n```\n\n**3. Permission Issues**\n```bash\n# If pip install fails with permissions:\npip3 install --user -e .\n\n# Or use virtual environment (recommended):\npython3 -m venv venv && source venv/bin/activate\n```\n\n**4. Node.js Linter Issues**\n```bash\n# Install Node.js if missing:\n# Ubuntu/Debian:\ncurl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -\nsudo apt-get install -y nodejs\n\n# macOS:\nbrew install node\n\n# Verify installation:\nnode --version && npm --version\n```\n\n**5. Linter Version Conflicts**\n```bash\n# Check current versions:\n./scripts/check_supported_versions.sh\n\n# Install specific versions:\npip3 install flake8==7.3.0 --force-reinstall\nnpm install -g eslint@8.57.1 --force\n```\n\n##### **Getting Help**\n- **Complete installation guide**: See [`docs/INSTALLATION_GUIDE.md`](docs/INSTALLATION_GUIDE.md)\n- **Automated installation**: Run `curl -fsSL https://raw.githubusercontent.com/tosin2013/aider-lint-fixer/main/scripts/install.sh | bash`\n- **Check supported versions**: `./scripts/check_supported_versions.sh`\n- **Verbose output**: Add `--verbose` to any command\n- **Debug mode**: Set `DEBUG=1` environment variable\n- **Issues**: Report at [GitHub Issues](https://github.com/tosin2013/aider-lint-fixer/issues)\n\n### Basic Usage\n\n```bash\n# Test on a small project first\npython -m aider_lint_fixer /path/to/your/project --max-files 1\n\n# Run on your project\npython -m aider_lint_fixer /path/to/your/project\n\n# Limit scope for large projects\npython -m aider_lint_fixer /path/to/your/project --max-files 5 --max-errors 10\n\n# Verbose output for debugging\npython -m aider_lint_fixer /path/to/your/project --verbose\n```\n\n### \ud83c\udf0d Community Issue Reporting (v1.9.0)\n\nTransform your successful fixes into community improvements:\n\n```bash\n# Enhanced interactive mode with community reporting\naider-lint-fixer --enhanced-interactive --linters ansible-lint\n\n# After successful overrides, system prompts:\n# \"Would you like to help improve the system by creating community issues?\"\n# Browser opens with pre-filled GitHub issue for community benefit\n```\n\n**Community Features:**\n- \ud83c\udfaf **Automatic issue generation**: Successful override patterns become GitHub issues\n- \ud83c\udf0d **Community learning**: Your fixes help improve classification for everyone\n- \ud83d\udcca **Pattern analysis**: System identifies errors that should be reclassified\n- \ud83d\ude80 **One-click contribution**: Pre-filled GitHub issues with detailed analysis\n- \ud83d\udcc8 **Continuous improvement**: Higher automatic fix rates through shared knowledge\n\n### \ud83c\udfaf Enhanced Interactive Mode (v1.8.0)\n\nPerfect for reviewing and overriding error classifications:\n\n```bash\n# Enhanced interactive mode - review each error individually\npython -m aider_lint_fixer --enhanced-interactive --linters ansible-lint\n\n# Force mode - attempt to fix ALL errors (use with caution)\npython -m aider_lint_fixer --force --linters flake8\n\n# Standard interactive mode - confirm before starting\npython -m aider_lint_fixer --interactive --linters pylint\n```\n\n**Enhanced Interactive Features:**\n- \ud83c\udfaf **Per-error decisions**: Fix, skip, or abort for each error\n- \u26a0\ufe0f **Override \"unfixable\" errors**: With proper warnings and confirmations\n- \ud83c\udf0d **Community learning**: Your choices improve future classifications\n- \ud83d\udcca **Confidence scoring**: Rate your confidence to help the learning system\n\n### \ud83d\udcca Progress Tracking for Large Projects (v1.8.0)\n\nAutomatic enhanced tracking for projects with 100+ lint errors:\n\n```bash\n# Large projects automatically get enhanced progress tracking\npython -m aider_lint_fixer --linters ansible-lint # 100+ errors detected\n\n# Install with progress tracking support\npip install aider-lint-fixer[progress]\n\n# Session management\npython -m aider_lint_fixer --list-sessions\npython -m aider_lint_fixer --resume-session progress_1234567890\n```\n\n**Progress Tracking Features:**\n- \ud83d\udcca **Visual progress bars**: Real-time file and error progress\n- \u26a1 **Performance metrics**: Files/min, errors/min, success rates\n- \ud83d\udd50 **Time estimation**: ETA calculations for completion\n- \ud83d\udcbe **Session persistence**: Automatic saving and recovery\n- \ud83d\udd04 **Resume capability**: Continue interrupted operations\n\n**Example Output for Large Projects:**\n```\n\ud83d\ude80 Large Project Detected (250 errors)\n\ud83d\udcc1 Files: \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 8/10 [80%]\n\ud83d\udd27 Errors: \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 200/250 [80%]\n\n\u26a1 Real-time Status:\n Processing rate: 2.5 files/min, 62.5 errors/min\n Success rate: 85.2% (213/250)\n ETA: 14:32:15\n```\n\n## \ud83d\udccb Supported Linters\n\n### Python\n- **flake8** - Style guide enforcement\n- **pylint** - Code analysis and quality\n- **black** - Code formatting\n- **isort** - Import sorting\n- **mypy** - Type checking\n\n### JavaScript/TypeScript\n- **eslint** - Linting and code quality\n- **prettier** - Code formatting\n\n### Go\n- **golint** - Go linting\n- **gofmt** - Go formatting\n- **go vet** - Static analysis\n\n### Rust\n- **rustfmt** - Rust formatting\n- **clippy** - Rust linting\n\n### Ansible\n- **ansible-lint** - Ansible playbook linting\n\n## \u2699\ufe0f Configuration\n\nCreate a `.aider-lint-fixer.yml` file in your project root:\n\n```yaml\n# LLM Configuration\nllm:\n provider: \"deepseek\" # Options: deepseek, openrouter, ollama\n model: \"deepseek/deepseek-chat\"\n fallback_providers:\n - \"openrouter\"\n - \"ollama\"\n\n# Linter Configuration\nlinters:\n auto_detect: true\n enabled:\n - flake8\n - eslint\n - golint\n - rustfmt\n - ansible-lint\n\n# Aider Configuration\naider:\n auto_commit: false\n backup_files: true\n max_retries: 3\n\n# Project Settings\nproject:\n exclude_patterns:\n - \"*.min.js\"\n - \"node_modules/\"\n - \"__pycache__/\"\n - \".git/\"\n```\n\n## \ud83c\udfaf Command Line Options\n\n```bash\npython -m aider_lint_fixer [PROJECT_PATH] [OPTIONS]\n\nOptions:\n --config, -c PATH Path to configuration file\n --llm TEXT LLM provider (deepseek, openrouter, ollama)\n --model TEXT Specific model to use\n --linters TEXT Comma-separated list of linters to run\n --max-files INTEGER Maximum number of files to process\n --max-errors INTEGER Maximum errors to fix per file\n --dry-run Show what would be fixed without making changes\n --interactive Confirm each fix before applying\n --verbose, -v Enable verbose output\n --log-file PATH Path to log file\n --no-banner Disable banner output\n --help Show this message and exit\n --stats Show learning statistics and exit\n```\n\n## \ud83e\udde0 Learning Features\n\n### **Intelligent Error Classification**\n\nAider-lint-fixer includes an advanced learning system that improves accuracy over time by learning from successful and failed fix attempts.\n\n#### **\ud83d\udce6 Installation for Learning**\n```bash\n# Install with learning features (includes scikit-learn)\npip install aider-lint-fixer[learning]\n\n# Or install learning dependencies manually\npip install scikit-learn>=1.0.0 requests>=2.25.0 beautifulsoup4>=4.9.0 pyahocorasick>=1.4.0\n```\n\n#### **\ud83d\udd0d How Learning Works**\n- **Automatic**: Learning happens automatically during normal operation\n- **No configuration needed**: Works out of the box once dependencies are installed\n- **Language-specific**: Separate models for Python, JavaScript, Ansible, etc.\n- **Persistent**: Learning data survives between runs\n\n#### **\ud83d\udcca Monitor Learning Progress**\n```bash\n# View learning statistics\naider-lint-fixer --stats\n\n# View in JSON format\naider-lint-fixer --stats --output-format json\n\n# Detailed cache management\npython -m aider_lint_fixer.cache_cli --action stats\n```\n\n#### **\ud83c\udfaf Learning Benefits**\n- **Improved Accuracy**: 46.1% fixability rate on real projects\n- **Faster Classification**: Sub-millisecond error analysis\n- **Project-Specific**: Learns patterns specific to your codebase\n- **Conservative Approach**: Avoids false positives\n\n#### **\ud83d\udcc1 Learning Data Storage**\nLearning data is stored in `.aider-lint-cache/`:\n```\n.aider-lint-cache/\n\u251c\u2500\u2500 ansible_training.json # Ansible-specific learning\n\u251c\u2500\u2500 python_training.json # Python-specific learning\n\u251c\u2500\u2500 javascript_training.json # JavaScript-specific learning\n\u2514\u2500\u2500 scraped_rules.json # Web-scraped rule knowledge\n```\n\n#### **\ud83e\uddf9 Cache Management**\n```bash\n# Clean old learning data (30+ days)\npython -m aider_lint_fixer.cache_cli --action cleanup --max-age-days 30\n\n# Export learning data for backup\npython -m aider_lint_fixer.cache_cli --action export --file backup.json\n\n# Import learning data from backup\npython -m aider_lint_fixer.cache_cli --action import --file backup.json\n```\n\n#### **\ud83d\udd27 Troubleshooting Learning Issues**\n\n**Problem: \"Found 0 fixable errors (0.0% of X total baseline errors)\"**\n\nThis usually indicates missing learning dependencies. Check your setup:\n\n```bash\n# Quick diagnosis\npython scripts/check_learning_setup.py\n\n# Or check via stats\naider-lint-fixer --stats\n```\n\n**Common Issues:**\n- **Missing scikit-learn**: `pip install aider-lint-fixer[learning]`\n- **Missing Aho-Corasick**: Causes \"using fallback pattern matching\" warning\n- **No scraped rules**: Tool will auto-create them if web dependencies are available\n\n**Expected vs Actual (v1.7.0):**\n```bash\n# \u274c Without learning dependencies (v1.6.0 and earlier)\nFound 0 fixable errors (0.0% of 58 total baseline errors)\n\n# \u2705 With learning dependencies (v1.7.0+)\nFound 27 fixable errors (46.1% of 58 total baseline errors)\n```\n\n**\ud83c\udfaf v1.7.0 Performance**: This release resolves the critical 0.0% fixability issue!\n\n## \ud83d\udcd6 Examples\n\n### Python Project\n```bash\n# Focus on Python linters\npython -m aider_lint_fixer --linters flake8,black,isort\n\n# Fix formatting issues only\npython -m aider_lint_fixer --linters black,isort --max-errors 20\n```\n\n### JavaScript Project\n```bash\n# Focus on JavaScript linters\npython -m aider_lint_fixer --linters eslint,prettier\n\n# Interactive fixing for complex project\npython -m aider_lint_fixer --linters eslint --interactive\n```\n\n### Ansible Project\n```bash\n# Focus on Ansible linting\npython -m aider_lint_fixer --linters ansible-lint\n\n# Dry run to see Ansible issues\npython -m aider_lint_fixer --linters ansible-lint --dry-run\n\n# Enhanced interactive mode for Ansible (v1.8.0)\npython -m aider_lint_fixer --enhanced-interactive --linters ansible-lint\n```\n\n### Large Project Examples (v1.8.0)\n```bash\n# Large project with automatic progress tracking\npython -m aider_lint_fixer --linters flake8,pylint # 100+ errors\n\n# Force mode for aggressive fixing (use with caution)\npython -m aider_lint_fixer --force --max-errors 50 --linters eslint\n\n# Resume interrupted session\npython -m aider_lint_fixer --list-sessions\npython -m aider_lint_fixer --resume-session progress_1234567890\n\n# Enhanced interactive with progress tracking\npython -m aider_lint_fixer --enhanced-interactive --linters ansible-lint\n```\n\n### Community Contribution Examples (v1.9.0)\n```bash\n# Override \"unfixable\" errors and contribute to community\npython -m aider_lint_fixer --enhanced-interactive --linters ansible-lint\n# \u2192 Override yaml[trailing-spaces] classification\n# \u2192 System records successful fix pattern\n# \u2192 Prompts to create GitHub issue for community benefit\n\n# Example community workflow:\n# 1. User overrides \"unfixable\" error \u2192 Success\n# 2. System analyzes pattern \u2192 Identifies improvement opportunity\n# 3. GitHub issue generated \u2192 \"Enhancement: Improve ansible-lint yaml[trailing-spaces] classification\"\n# 4. Community benefits \u2192 Higher automatic fix rates for everyone\n\n# Install with community features\npip install aider-lint-fixer[community]\n```\n\n## \ud83d\udd27 How It Works\n\n1. **Project Detection**: Automatically scans your project to identify languages, package managers, and lint configurations\n2. **Lint Execution**: Runs appropriate linters and collects error reports\n3. **Error Analysis**: Categorizes errors by type and complexity, prioritizes them for fixing\n4. **AI-Powered Fixing**: Uses aider.chat with your chosen LLM to generate and apply fixes\n5. **Verification**: Re-runs linters to verify fixes and reports success rates\n6. **Community Learning** (v1.9.0): Records successful overrides and generates GitHub issues to improve the system for everyone\n\n## \ud83d\udee0\ufe0f Development\n\nThis project includes a comprehensive Makefile for development tasks:\n\n```bash\n# Show all available commands\nmake help\n\n# Setup development environment\nmake dev-setup\n\n# Code quality checks\nmake lint # Run linters\nmake format # Format code with black and isort\nmake type-check # Run mypy type checking\n\n# Testing\nmake test # Run tests\nmake test-coverage # Run tests with coverage\n\n# Security\nmake security # Run security checks\nmake audit # Comprehensive security audit\n\n# Build and package\nmake build # Build distribution packages\nmake clean # Clean build artifacts\n\n# Self-testing (test the tool on itself!)\nmake self-test # Run aider-lint-fixer on its own code\n\n# Complete quality assurance\nmake qa # Run all quality checks\nmake ci # Full CI pipeline\n```\n\n## \ud83e\udd16 Automated Dependency Management\n\nThis project uses **Dependabot** for automated dependency updates and security monitoring:\n\n### \ud83d\udcc5 Update Schedule\n- **Python dependencies**: Weekly (Mondays) - `pip` ecosystem\n- **Node.js dependencies**: Weekly (Tuesdays) - `npm` ecosystem\n- **GitHub Actions**: Weekly (Wednesdays) - Workflow dependencies\n- **Docker images**: Weekly (Thursdays) - Base image updates\n- **Security updates**: **Immediate** - Critical vulnerabilities\n\n### \ud83d\udd04 Auto-Merge Policy\n- \u2705 **Security updates**: Auto-merged after tests pass\n- \u2705 **Patch updates**: Auto-merged after validation\n- \u2705 **Testing dependencies**: Auto-merged (pytest, coverage, mock)\n- \u2705 **Code quality tools**: Auto-merged (black, isort, flake8, mypy)\n- \u2705 **GitHub Actions**: Auto-merged (actions/*, github/*)\n- \u26a0\ufe0f **Major updates**: Require manual review\n- \u26a0\ufe0f **Core dependencies**: Require manual review (aider-chat, click)\n\n### \ud83d\udd0d Weekly Health Checks (Sundays)\n- **\ud83d\udd12 Security audit**: Vulnerability scanning with `safety`, `bandit`, `pip-audit`\n- **\ud83d\udcc5 Outdated dependencies**: Tracking and automated PR creation\n- **\ud83d\udcc4 License compliance**: Monitoring for license compatibility\n- **\ud83d\udd0d Dependency conflicts**: Detecting version incompatibilities\n\n### \ud83d\udee1\ufe0f Security Features\n- **Immediate security alerts**: Critical vulnerabilities trigger instant PRs\n- **Automated testing**: All updates tested before merge\n- **License monitoring**: GPL and unknown licenses flagged\n- **Conflict detection**: Dependency version conflicts identified\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n### \ud83d\udd27 **Development Setup for Contributors**\n\n#### **Quick Setup**\n```bash\n# Automated installation for contributors\ncurl -fsSL https://raw.githubusercontent.com/tosin2013/aider-lint-fixer/main/scripts/install.sh | bash\n\n# Or manual setup\ngit clone https://github.com/tosin2013/aider-lint-fixer.git\ncd aider-lint-fixer\npython3 -m venv venv && source venv/bin/activate\npip3 install -e . && pip3 install -r requirements.txt\n```\n\n#### **Install Supported Linter Versions**\n```bash\n# Check your current versions\n./scripts/check_supported_versions.sh\n\n# Install supported versions\npip3 install flake8==7.3.0 pylint==3.3.7 ansible-lint==25.6.1\nnpm install -g eslint@8.57.1 jshint@2.13.6 prettier@3.6.2\n```\n\n### \ud83d\udccb **Version Testing**\n```bash\n# Test Python linters\n./scripts/version_tests/python_linters_test.sh\n\n# Test Node.js linters\n./scripts/version_tests/nodejs_linters_test.sh\n\n# Run integration tests\npython -m pytest tests/ -v\n```\n\n### \ud83d\udcda **Version Reference**\n- **Supported Versions**: See table above or `aider_lint_fixer/supported_versions.py`\n- **Testing Guide**: `docs/LINTER_TESTING_GUIDE.md`\n- **Node.js Guide**: `docs/NODEJS_LINTERS_GUIDE.md`\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udc68\u200d\ud83d\udcbb Author\n\n**Tosin Akinosho**\n- GitHub: [@tosin2023](https://github.com/tosin2023)\n- Project: [aider-lint-fixer](https://github.com/tosin2023/aider-lint-fixer)\n\n## \ud83d\ude4f Acknowledgments\n\n- [aider.chat](https://aider.chat) for the amazing AI-powered code editing capabilities\n- The open-source community for the various linters and tools that make this project possible\n- All the LLM providers (DeepSeek, OpenRouter, Ollama) for making AI accessible\n\n## \ud83d\udcda Documentation\n\nFor detailed usage instructions, configuration options, and troubleshooting, see:\n- [Usage Guide](Aider%20Lint%20Fixer%20-%20Usage%20Guide.md)\n- [Complete Solution Documentation](Aider%20Lint%20Fixer%20-%20Complete%20Solution%20Delivery.md)\n\n---\n\n**Made with \u2764\ufe0f by Tosin Akinosho**\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "AI-powered lint error detection and fixing using aider.chat",
"version": "2.0.0",
"project_urls": {
"Documentation": "https://github.com/tosin2013/aider-lint-fixer/blob/main/README.md",
"Homepage": "https://github.com/tosin2013/aider-lint-fixer",
"Issues": "https://github.com/tosin2013/aider-lint-fixer/issues",
"Repository": "https://github.com/tosin2013/aider-lint-fixer"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "62846fd3cc1ec3e149442531584816a50bc3643713d55d0372822f6d2f45e29c",
"md5": "c88e201cb893eede46599d3d543d2a00",
"sha256": "7bb59bc0281b962e76b053198ef91ac80aac06cd987d8d1d833aaa3bfbcd5611"
},
"downloads": -1,
"filename": "aider_lint_fixer-2.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c88e201cb893eede46599d3d543d2a00",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 180903,
"upload_time": "2025-08-19T23:04:24",
"upload_time_iso_8601": "2025-08-19T23:04:24.477640Z",
"url": "https://files.pythonhosted.org/packages/62/84/6fd3cc1ec3e149442531584816a50bc3643713d55d0372822f6d2f45e29c/aider_lint_fixer-2.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0eb232893332f705aca383606adeeda60dd9a501296ce5f9669ad97742669fc9",
"md5": "5f30047505578d56048c303cc6b8f3c6",
"sha256": "43f491b43267b6dc22b289139114a24eac6be877174ce5822238c9d772177439"
},
"downloads": -1,
"filename": "aider_lint_fixer-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "5f30047505578d56048c303cc6b8f3c6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 214970,
"upload_time": "2025-08-19T23:04:25",
"upload_time_iso_8601": "2025-08-19T23:04:25.776398Z",
"url": "https://files.pythonhosted.org/packages/0e/b2/32893332f705aca383606adeeda60dd9a501296ce5f9669ad97742669fc9/aider_lint_fixer-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-19 23:04:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tosin2023",
"github_project": "aider-lint-fixer",
"github_not_found": true,
"lcname": "aider-lint-fixer"
}