GitAuto Logo
  1. Home
  2. Pricing
  3. Docs
  4. Dashboard
  5. Blog
  6. Contact
  1. Home
  2. How It Works
  3. Use Cases
  4. Pricing
  5. Docs
  6. Dashboard
  7. FAQ
  8. Blog
  9. Contact

Formatting

GitAuto runs the project's code formatter on every generated file before committing it to the PR branch. For example, for JavaScript/TypeScript projects, it reads the .prettierrc config and runs npx prettier --write to format it. Empty files and unsupported file types are skipped automatically.

Inconsistent Formatting Blocks Reviews

Formatting inconsistencies don't affect functionality, but they cause every PR to fail the team's formatting checks in CI. Developers then have to manually fix formatting before they can even review the actual logic changes.

By running the formatter with the project's own config, GitAuto ensures generated code matches the exact style the team enforces - tabs vs. spaces, semicolons vs. none, trailing commas, print width, and other formatting options.

Why Models Format Inconsistently

Models generate code token-by-token with no global formatting plan. Indentation, spacing, and style choices are made locally at each token. The model might use 2-space indent in one block and 4-space in another within the same file, because each indentation token is predicted independently based on local context. Code generation benchmarks evaluate functional correctness, not formatting - a model gets the same score whether it uses 2-space or 4-space indentation, so there is no training signal to be consistent.

How It Works

Before committing generated code, GitAuto checks if the repository has a formatter configuration. For example, for Prettier it looks for .prettierrc, .prettierrc.json, prettier.config.js, etc. If found, it writes the generated file to the working directory and runs npx prettier --write on it. The formatted output replaces the original, and that formatted version is what gets committed to the PR.

Files that the formatter cannot handle - binary files, unsupported extensions, or empty files - are silently skipped. This prevents formatter errors from blocking the entire PR creation process.

Related Features

  • Linting - fixes code quality issues that the formatter does not cover
  • Trailing Space Removal - removes trailing whitespace as a fallback when a formatter is not configured

Need Help?

Have questions or suggestions? We're here to help you get the most out of GitAuto.

Contact us with your questions or feedback!

Lint Disable HeadersLinting

Getting Started

  • Installation
  • Setup

Triggers

  • Overview
  • Schedule Trigger
  • Test Failure Trigger
  • Review Comment Trigger
  • Dashboard Trigger

Coverage Dashboard

  • Overview
  • Python Testing
  • JavaScript Testing
  • Java Testing
  • Go Testing
  • PHP Testing
  • Ruby Testing
  • Flutter Testing
  • Multi-Language
  • Coverage Charts

Customization

  • Repository Rules
  • Output Language
  • GITAUTO.md

Integrations

  • CircleCI Integration
  • npm Integration

How It Works

Context Enrichment

  • Line Numbers
  • Full File Reads
  • Test File Preloading
  • Test Naming Detection
  • Error Baselines
  • CI Log Cleaning
  • Trigger-Specific Prompts
  • Coding Standards

Output Auto-Correction

  • Diff Hunk Repair
  • Diff Prefix Repair
  • Tool Name Correction
  • Tool Argument Correction
  • Import Sorting
  • Trailing Space Removal
  • Final Newline
  • Line Ending Preservation
  • Sanitize Tool Arguments
  • Lint Disable Headers

Quality Verification

  • Formatting
  • Linting
  • Type Checking
  • Test Execution
  • Coverage Enforcement
  • phpcs / phpstan Support
  • PHPUnit Support
  • pytest Support
  • Snapshot Auto-Update
  • Untestable Detection
  • Should-Skip Detection
  • Dead Code Removal
  • Quality Check Scoring
  • Quality Checklist

Safety Guardrails

  • File Edit Restrictions
  • Temperature Zero
  • PR/Branch Checks
  • Race Condition Prevention
  • Bot Loop Prevention
  • Webhook Deduplication
  • Duplicate Error Hashing
  • Infrastructure Failure Detection
  • Strict Tool Schemas
  • No-Change Detection

Token/Cost Management

  • Token Trimming
  • Outdated Diff Removal
  • Stale File Replacement
  • Skip CI Intermediate
  • CI Log Deduplication
  • Web Fetch Summarization
  • Context Forgetting
  • File Query Routing
  • On-Demand Diff

Resilience & Recovery

  • Model Fallback
  • Overload Retry
  • Forced Verification
  • Error Files Editable

Hallucination Prevention

  • Web Search
  • URL Fetching
  • Anti-Hallucination Prompts
  • GITAUTO.md Restrictions
  • Review Response Guardrails

Ready to improve your test coverage?

Go from 0% to 90% test coverage with GitAuto. Start for free, no credit card required.

Install FreeContact Sales

Product

  • Home
  • Why GitAuto
  • What GitAuto Does
  • How It Works
  • Use Cases
  • How to Get Started
  • Solution
  • Pricing
  • Pricing Details
  • ROI Calculator
  • ROI Methodology
  • FAQ
  • Blog
  • Contact

Dashboard

  • Dashboard
  • Coverage Trends
  • File Coverage
  • Credits
  • Open PRs
  • Usage
  • Triggers
  • Actions
  • References
  • Rules
  • CircleCI Integration
  • npm Integration

Documentation

  • Docs
  • Getting Started
  • Setup
  • Triggers
  • Coverage Setup
  • Customization
  • How It Works
  • Auto Merge
  • CircleCI
  • npm

Legal

  • Privacy Policy
  • Terms of Service

Connect

  • GitHub
  • LinkedIn
  • Twitter
  • YouTube
GitAuto Logo© 2026 GitAuto, Inc. All Rights Reserved