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

Lint Disable Headers

GitAuto automatically adds necessary lint-disable comments to the top of test files. Test files legitimately need certain lint rules disabled (unused variables in mocks, require statements for CommonJS), and without these headers, tests fail linting even when the test code is correct.

Why This Exists

Test files have different linting needs than production code. Mock functions create variables that appear unused. CommonJS require() calls trigger ESLint rules designed for ES modules. Python test fixtures use function arguments that look unused to pylint. Without the correct disable comments at the top of each test file, CI linting fails on code that is structurally correct. The model sometimes adds these headers and sometimes forgets, leading to inconsistent results.

Why Models Don't Add Lint-Disable Comments

Models focus on writing functionally correct code, not on satisfying linter configurations they have never seen. A model does not know that your project's ESLint config flags CommonJS requires or that PHPUnit test files need specific phpcs:disable comments. These are project-specific configuration details that exist outside the model's context. Benchmarks do not run project-specific linters, so a model is never penalized during evaluation for missing lint-disable comments and has no training signal to include them.

How It Works

After generating a test file, GitAuto inspects the file extension and adds the appropriate lint-disable header. The system merges required rules to avoid duplicates:

  • TypeScript/JavaScript: /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-var-requires */
  • Python: # pylint: disable=redefined-outer-name,unused-argument
  • PHP: // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter placed after the <?php tag

If the file already has a lint-disable header, the system merges the required rules into the existing header rather than adding a duplicate. For PHP files, the header is placed after the opening <?php tag to maintain valid syntax.

Related Features

  • Import Sorting - Sorts imports alphabetically, which lint-disable headers sit above
  • Trailing Space Removal - Cleans up whitespace in generated headers

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!

Sanitize Tool ArgumentsFormatting

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