Overview
Refactron can be integrated into your CI/CD pipeline to automatically analyze code quality on every commit, pull request, or deployment.Generate CI/CD Templates
Refactron can generate ready-to-use CI/CD configuration files:GitHub Actions
Basic Workflow
.github/workflows/refactron.yml
Fail on Critical Issues
GitLab CI
Basic Configuration
.gitlab-ci.yml
With Artifacts
Pre-commit Hooks
Installation
Configuration
Best Practices
Use JSON Logging
Use JSON Logging
Enable JSON logging for easier parsing in CI/CD:
Configure Failure Thresholds
Configure Failure Thresholds
Fail builds based on severity:
Cache Dependencies
Cache Dependencies
Speed up CI runs by caching pip packages:
Generate Reports
Generate Reports
Create HTML reports and save as artifacts:
Environment-Specific Configuration
Development
.refactron.yaml
CI/CD
.refactron.yaml
Production
.refactron.yaml
Advanced Patterns
Incremental Analysis
Only analyze changed files in CI:Parallel Analysis
Run analysis in parallel for faster CI:.refactron.yaml
Exit Codes
Refactron uses standard exit codes:| Code | Meaning |
|---|---|
| 0 | Success, no issues |
| 1 | Issues found |
| 2 | Error during execution |
