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

Should-Skip Detection

GitAuto analyzes source files before test generation to determine if they need tests at all. Files that contain no testable behavior are skipped: empty files, type definitions and interfaces, constant/literal exports, import/export-only barrel files, and simple data classes without methods. Detection is routed to language-specific analyzers for accurate classification.

Wasting Credits on Non-Testable Files

Generating tests for a TypeScript interface file or a constants file wastes credits and produces meaningless tests. A test for types.ts that just imports the types and asserts they exist adds no value. A test for constants.ts that checks if API_URL === "https://..." is testing the constant's value, not behavior.

By detecting and skipping these files upfront, GitAuto avoids wasting agent iterations and customer credits on files that would produce hollow tests. The agent can focus on files with actual logic to test.

Why Models Try to Test Everything

Models don't inherently distinguish between files that contain testable logic and files that don't. A TypeScript interface file, a constants file, or a type definition file has no executable code, but the model will still attempt to generate tests for it - creating meaningless tests that assert types exist or constants have values. The model sees "file needs tests" and complies literally. Training data includes examples of "write a test for this file" with no distinction between testable and non-testable files, so the model has learned to always comply with test generation requests.

How It Works

Before generating a test, GitAuto reads the source file and runs it through a language-specific analyzer. For TypeScript/JavaScript, it checks if the file contains only type exports, interfaces, constants, or re-exports. For PHP, it checks for similar patterns like empty classes or pure configuration arrays.

The skip categories include: empty files with no meaningful content, pure type/interface declarations with no runtime code, constant exports with only literal values, barrel/index files that only re-export from other modules, and simple data transfer objects without methods. Files that pass all checks proceed to test generation normally.

Related Features

  • Untestable Detection - evaluates specific lines within testable files, while should-skip operates at the file level
  • Coverage Enforcement - skipped files are excluded from coverage calculations

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!

Untestable DetectionDead Code Removal

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