Diagnostic Codes
When Repotype validates your repository, it produces diagnostics with specific codes. This reference explains each code and how to fix it.
Severity Levels
Section titled “Severity Levels”| Level | Badge | Meaning |
|---|---|---|
| Error | error | Must be fixed. Blocks CI if configured. |
| Warning | warning | Should be fixed but won’t block. |
| Suggestion | suggestion | Optional improvement. |
File Matching
Section titled “File Matching”no_matching_file_rule
Section titled “no_matching_file_rule”Meaning: File doesn’t match any rule in files[] config.
When: defaults.unmatchedFiles is deny (default).
Fix: Add a file rule that matches this file, or set unmatchedFiles: allow.
files: - id: catch-this-file glob: "path/to/file.ext"Path Validation
Section titled “Path Validation”path_case_violation
Section titled “path_case_violation”Meaning: File path doesn’t match required naming convention.
Example: File is src/MyComponent.ts but rule requires pathCase: kebab.
Fix: Rename file to match convention, or run repotype fix.
path_pattern_violation
Section titled “path_pattern_violation”Meaning: File path doesn’t match the pathPattern regex.
Fix: Rename file to match pattern.
Folder Structure
Section titled “Folder Structure”missing_required_folder
Section titled “missing_required_folder”Meaning: A folder specified in requiredFolders doesn’t exist.
Fix: Create the required directory.
disallowed_folder
Section titled “disallowed_folder”Meaning: A folder exists but isn’t in allowedFolders list.
Fix: Remove the folder, move its contents, or add it to allowedFolders.
missing_required_file
Section titled “missing_required_file”Meaning: A file required by folder rule doesn’t exist.
Fix: Create the required file.
disallowed_file_in_folder
Section titled “disallowed_file_in_folder”Meaning: A file exists in a folder but doesn’t match allowedFiles patterns.
Fix: Remove or relocate the file.
folder_path_case_violation
Section titled “folder_path_case_violation”Meaning: Folder name doesn’t match required pathCase.
Fix: Rename the folder.
Schema Validation
Section titled “Schema Validation”json_schema_violation
Section titled “json_schema_violation”Meaning: JSON file content doesn’t match the specified JSON Schema.
Details: The diagnostic message includes specific schema errors.
Fix: Update file content to match schema.
yaml_schema_violation
Section titled “yaml_schema_violation”Meaning: YAML file content doesn’t match the specified JSON Schema.
Fix: Update file content to match schema.
invalid_json
Section titled “invalid_json”Meaning: JSON file has syntax errors and can’t be parsed.
Fix: Fix JSON syntax.
invalid_yaml
Section titled “invalid_yaml”Meaning: YAML file has syntax errors and can’t be parsed.
Fix: Fix YAML syntax.
Frontmatter
Section titled “Frontmatter”missing_frontmatter
Section titled “missing_frontmatter”Meaning: Markdown file has no YAML frontmatter block.
Fix: Add frontmatter:
---title: My Documentdescription: Description here---
Content starts here...missing_required_frontmatter_field
Section titled “missing_required_frontmatter_field”Meaning: Frontmatter is missing a field listed in frontmatter.required.
Fix: Add the required field to frontmatter.
frontmatter_schema_violation
Section titled “frontmatter_schema_violation”Meaning: Frontmatter doesn’t match the specified JSON Schema.
Fix: Update frontmatter to match schema.
invalid_frontmatter_yaml
Section titled “invalid_frontmatter_yaml”Meaning: Frontmatter YAML has syntax errors.
Fix: Fix YAML syntax in frontmatter block.
Companion Files
Section titled “Companion Files”missing_companion_file
Section titled “missing_companion_file”Meaning: Required companion file (from requiredCompanion) doesn’t exist.
Example: Component file exists but matching .test.tsx doesn’t.
Fix: Create the companion file.
Content Patterns
Section titled “Content Patterns”forbidden_content_pattern
Section titled “forbidden_content_pattern”Meaning: File contains a pattern listed in forbidContentPatterns.
Common use: Detecting accidentally committed secrets.
Fix: Remove the forbidden content from the file.
template_hint_present
Section titled “template_hint_present”Meaning: File contains a placeholder from templateHints (like TODO: or [Description]).
Fix: Replace placeholder with actual content.
Plugins
Section titled “Plugins”plugin_validation_failed
Section titled “plugin_validation_failed”error or warning
Meaning: External plugin validation command failed.
Severity: Depends on plugin’s severityOnFailure setting.
Fix: Fix issues reported by the plugin.
plugin_not_installed
Section titled “plugin_not_installed”Meaning: Plugin is enabled but dependencies aren’t installed.
Fix: Run repotype plugins install.
Configuration
Section titled “Configuration”invalid_config
Section titled “invalid_config”Meaning: repotype.yaml has syntax or schema errors.
Fix: Check config syntax against documentation.
extends_not_found
Section titled “extends_not_found”Meaning: Config file referenced in extends doesn’t exist.
Fix: Check path in extends array.
Using Diagnostics
Section titled “Using Diagnostics”JSON Output
Section titled “JSON Output”Get machine-readable diagnostics:
npx repotype validate . --jsonExplain a File
Section titled “Explain a File”See why a specific file produces diagnostics:
npx repotype explain path/to/file.ts --jsonFilter by Severity
Section titled “Filter by Severity”The exit code reflects error presence:
- Exit 0: No errors (warnings/suggestions okay)
- Exit 1: One or more errors