
Error Message Explainer
- 110 installs
- 19 repo stars
- Updated May 26, 2026
- wedsamuel1230/arduino-skills
Helps with ai & agent building tasks.
About
error-message-explainer is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- error-message-explainer
- AI & Agent Building
- AI-coding skill
Error Message Explainer by the numbers
- 110 all-time installs (skills.sh)
- +5 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #4,062 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 1, 2026 (Skillselion catalog sync)
npx skills add https://github.com/wedsamuel1230/arduino-skills --skill error-message-explainerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 110 |
|---|---|
| repo stars | ★ 19 |
| Last updated | May 26, 2026 |
| Repository | wedsamuel1230/arduino-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
Error Message Explainer
Translates cryptic compiler errors into actionable fixes for Arduino/ESP32/RP2040 projects.
Resources
This skill includes bundled tools:
- scripts/parse_errors.py - Automated error analysis with 20+ error patterns
- ../../docs/board-support/uno-r4-family.md - Shared Uno R4 board-family caveats
Quick Start
Analyze error from file:
uv run --no-project scripts/parse_errors.py --file error_log.txtAnalyze single error:
uv run --no-project scripts/parse_errors.py --message "error: 'LED' was not declared in this scope"Interactive mode:
uv run --no-project scripts/parse_errors.py --interactivePipe from compiler:
arduino-cli compile 2>&1 | uv run --no-project scripts/parse_errors.py --stdinHow to Use This Skill
When user pastes an error message: 1. Identify the error type from patterns below 2. Explain what it means in simple terms 3. Show the specific fix with code example 4. Explain WHY this error happens (educational value) 5. If the target is Uno R4 family and the failure touches WiFi, OTA, USB, or board recognition, open ../../docs/board-support/uno-r4-family.md
Common Compilation Errors
1. "'xyz' was not declared in this scope"
error: 'xyz' was not declared in this scopeMeaning: Compiler doesn't recognize the name xyz.
Common Causes & Fixes:
| Cause | Fix |
|---|---|
| Typo in variable/function name | Check spelling, C++ is case-sensitive! |
| Variable used before declaration | Move declaration before first use |
Missing #include | Add required library header |
| Function defined after it's called | Add forward declaration or move function up |
Example - Typo:
// WRONG
int ledpin = 13; // lowercase 'p'
digitalWrite(ledPin, HIGH); // uppercase 'P' - DIFFERENT!
// CORRECT
int ledPin = 13;
digitalWrite(ledPin, HIGH);Example - Missing Include:
// WRONG - Servo not defined!
Servo myServo;
// CORRECT
#include <Servo.h>
Servo myServo;---
2. "expected ';' before..."
error: expected ';' before 'xyz'Meaning: Missing semicolon on the previous line.
Fix: Add ; at end of the line ABOVE the error.
// WRONG - error points to line 3
int x = 5 // ← missing ; here!
int y = 10;
// CORRECT
int x = 5;
int y = 10;Pro Tip: The error line number is where compiler noticed the problem, not where the missing ; is!
---
3. "expected ')' before..." or "expected '}' before..."
error: expected ')' before ';'
error: expected '}' at end of inputMeaning: Mismatched parentheses or braces.
Common Patterns:
// WRONG - unmatched parenthesis
if (x > 5 { // missing )
}
// WRONG - unmatched brace
void setup() {
Serial.begin(115200);
// missing closing }
// CORRECT
if (x > 5) {
}
void setup() {
Serial.begin(115200);
}Debugging Tip: Use IDE auto-format (Ctrl+T) to reveal mismatches.
---
4. "invalid conversion from 'const char' to 'char'"
error: invalid conversion from 'const char*' to 'char*'Meaning: Trying to modify a string literal (which is read-only).
// WRONG
char* message = "Hello"; // string literals are const!
message[0] = 'h'; // can't modify!
// CORRECT (if you need to modify)
char message[] = "Hello"; // creates modifiable copy
message[0] = 'h'; // OK!
// CORRECT (if read-only is fine)
const char* message = "Hello";---
5. "no matching function for call to..."
error: no matching function for call to 'SomeClass::method(int, int, int)'
note: candidate: void SomeClass::method(int, int)Meaning: Function called with wrong number or type of arguments.
// WRONG - too many arguments
myServo.write(90, 100); // write() takes only 1 argument!
// CORRECT
myServo.write(90);Read the "note:" lines - they show what arguments ARE accepted.
---
6. "multiple definition of 'xyz'"
error: multiple definition of 'xyz'Meaning: Same variable/function defined in multiple files.
Fixes:
// In header file (.h), use 'extern':
extern int globalVar; // declaration only
// In ONE .cpp file, define it:
int globalVar = 0; // actual definitionOr for functions in header:
// WRONG - defined in header, included multiple times
int add(int a, int b) { return a + b; }
// CORRECT - use 'inline'
inline int add(int a, int b) { return a + b; }---
7. "'xyz' does not name a type"
error: 'WiFiClient' does not name a typeMeaning: Class/type not recognized.
Fixes:
| Board | Library | Include |
|---|---|---|
| ESP32 | WiFi | #include <WiFi.h> |
| ESP8266 | WiFi | #include <ESP8266WiFi.h> |
| Arduino + WiFi Shield | WiFi | #include <WiFi.h> |
// WRONG
WiFiClient client; // WiFiClient unknown!
// CORRECT for ESP32
#include <WiFi.h>
WiFiClient client;---
8. "redefinition of 'xyz'"
error: redefinition of 'int x'Meaning: Variable declared twice in same scope.
// WRONG
int count = 0;
int count = 0; // redefinition!
// WRONG in loops
for (int i = 0; i < 10; i++) {
int i = 5; // shadows loop variable!
}
// CORRECT
int count = 0; // declare once
count = 5; // assign without 'int'---
Upload Errors
9. "avrdude: stk500_recv(): programmer is not responding"
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt X of 10: not in syncMeaning: Arduino IDE can't communicate with the board.
Fixes (try in order): 1. ✅ Correct board selected? (Tools → Board) 2. ✅ Correct port selected? (Tools → Port) 3. ✅ USB cable is data cable (not charge-only)? 4. ✅ Try different USB port 5. ✅ Nothing connected to pins 0/1 (TX/RX)? 6. ✅ Press reset button during upload 7. ✅ Install/reinstall USB drivers
---
10. "A fatal error occurred: Failed to connect to ESP32"
A fatal error occurred: Failed to connect to ESP32:
Timed out waiting for packet headerMeaning: ESP32 not entering bootloader mode.
Fix: Hold BOOT button while uploading: 1. Click Upload in IDE 2. When "Connecting..." appears, hold BOOT button 3. Release when upload starts 4. Some boards: hold BOOT, press EN/RST, release BOOT
---
11. "Sketch too big"
Sketch too big; see https://support.arduino.cc/...
Sketch uses 34816 bytes (107%) of program storage space.
Maximum is 32256 bytes.Meaning: Program doesn't fit in flash memory.
Fixes:
// 1. Use F() macro for strings (saves RAM + sometimes Flash)
Serial.println(F("This string in flash")); // instead of RAM
// 2. Remove unused libraries
// Each #include adds code even if not used
// 3. Use smaller data types
uint8_t x = 5; // instead of int (2 bytes saved)
// 4. Choose board with more flash (ESP32 has 4MB vs Arduino's 32KB)---
Library Errors
12. "fatal error: xyz.h: No such file or directory"
fatal error: Adafruit_BME280.h: No such file or directoryMeaning: Library not installed.
Fix: 1. Sketch → Include Library → Manage Libraries 2. Search for library name 3. Click Install 4. If not in Library Manager: download ZIP, Sketch → Include Library → Add .ZIP Library
---
13. "exit status 1 / Error compiling for board..."
exit status 1
Error compiling for board Arduino Uno.Meaning: Generic error - scroll UP to find the real error message.
The actual error is ABOVE this line! Look for lines containing error:.
---
Type Errors
14. "cannot convert 'String' to 'const char*'"
error: cannot convert 'String' to 'const char*'Meaning: Function expects C-string but got Arduino String.
// WRONG
String myString = "hello";
someFunction(myString); // if someFunction expects const char*
// CORRECT
String myString = "hello";
someFunction(myString.c_str()); // convert to C-string---
15. "invalid operands to binary expression"
error: invalid operands of types 'const char*' and 'const char*' to binary 'operator+'Meaning: Can't use + with C-strings.
// WRONG
const char* a = "hello";
const char* b = " world";
const char* c = a + b; // doesn't work!
// CORRECT - use String
String a = "hello";
String b = " world";
String c = a + b; // works!
// Or use snprintf
char c[20];
snprintf(c, sizeof(c), "%s%s", a, b);---
Quick Reference Table
| Error Contains | Likely Problem | Quick Fix |
|---|---|---|
| "not declared" | Typo or missing include | Check spelling, add #include |
| "expected ';'" | Missing semicolon | Add ; to line ABOVE error |
| "expected ')'" | Unmatched parenthesis | Count ( and ) |
| "expected '}'" | Unmatched brace | Count { and } |
| "no matching function" | Wrong arguments | Check function signature |
| "does not name a type" | Missing library | Add #include |
| "multiple definition" | Defined in multiple files | Use extern |
| "stk500" | Upload failed | Check board/port/cable |
| "No such file" | Library not installed | Install via Library Manager |
| "too big" | Out of flash | Use F(), remove unused code |
Debugging Strategy
1. Read the FIRST error (later ones often cascade)
2. Note the FILE and LINE NUMBER
3. Look at that line AND the line above
4. Check for common patterns above
5. Fix ONE error at a time, recompile
6. Repeat until clean{
"name": "error-message-explainer",
"metadata": {
"description": "Interprets Arduino/ESP32/RP2040 compiler errors in plain English for beginners. Use when user shares error messages, compilation failures, upload problems, or asks \"what does this error mean\". Covers common errors like undefined references, type mismatches, missing libraries, and board-specific issues.",
"version": "0.8.0",
"license": "MIT",
"author": "arduino-skills contributors",
"tags": ["error-diagnosis", "debugging", "education", "embedded-systems", "troubleshooting"],
"category": "maker-tools"
},
"plugins": [
{
"name": "error-message-explainer",
"description": "Explain Arduino compiler errors in plain English with solutions and prevention tips",
"enabled": true
}
]
}
#!/usr/bin/env python3
"""
Error Message Parser - Analyzes Arduino/PlatformIO error messages
Parses compiler errors and provides:
- Plain English explanation
- Likely causes
- Fix suggestions
- Code examples
Usage:
uv run --no-project scripts/parse_errors.py --file error_log.txt
uv run --no-project scripts/parse_errors.py --message "error: 'LED' was not declared"
uv run --no-project scripts/parse_errors.py --interactive
cat error.txt | uv run --no-project scripts/parse_errors.py --stdin
"""
import argparse
import re
import json
from dataclasses import dataclass
from typing import List, Optional, Tuple
# =============================================================================
# Error Pattern Database
# =============================================================================
ERROR_PATTERNS = {
# Declaration/Scope Errors
r"'(\w+)' was not declared in this scope": {
"type": "undeclared_identifier",
"explanation": "The compiler doesn't recognize '{0}'. This happens when you try to use a variable, function, or constant that hasn't been defined yet.",
"causes": [
"Typo in variable or function name",
"Forgot to declare the variable",
"Missing #include for a library",
"Variable declared inside a function but used outside",
"Case sensitivity issue (Arduino is case-sensitive)"
],
"fixes": [
"Check spelling - Arduino is case-sensitive (LED vs led)",
"Declare the variable before using it: int {0};",
"Add the required #include at top of file",
"If it's a constant, add: #define {0} value",
"If it's a pin, use: const int {0} = pin_number;"
]
},
r"'(\w+)' does not name a type": {
"type": "unknown_type",
"explanation": "The compiler doesn't recognize '{0}' as a valid type. Types define what kind of data a variable can hold.",
"causes": [
"Missing #include for a library that defines this type",
"Typo in the type name",
"Using a class/struct before it's defined",
"Library not installed"
],
"fixes": [
"Add #include <LibraryName.h> at top of sketch",
"Check the library documentation for correct type name",
"Install the library: Sketch → Include Library → Manage Libraries",
"Common types: int, float, char, byte, String, bool"
]
},
# Missing Semicolon/Syntax
r"expected ('.*?'|';'|'\)'|'\}'|',' |declaration) before": {
"type": "syntax_error",
"explanation": "The compiler expected {0} but found something else. This usually means there's a missing punctuation mark on a previous line.",
"causes": [
"Missing semicolon ; at end of previous line",
"Missing closing brace } or parenthesis )",
"Missing comma in function call or array",
"Unclosed string (missing quote)"
],
"fixes": [
"Add semicolon to the END of the previous line",
"Count your braces - every { needs a matching }",
"Count parentheses - every ( needs a matching )",
"Check the line ABOVE the error, not the error line"
]
},
r"expected '\)' before '(\w+)'": {
"type": "missing_parenthesis",
"explanation": "Missing closing parenthesis. The function call or expression isn't properly closed.",
"causes": [
"Forgot closing ) in function call",
"Mismatched parentheses in complex expression",
"Missing comma between function arguments"
],
"fixes": [
"Add ) to close the function call",
"Check for matching pairs of parentheses",
"Use editor highlighting to match brackets"
]
},
# Type Mismatches
r"invalid conversion from '(\w+\*?)' to '(\w+\*?)'": {
"type": "type_mismatch",
"explanation": "You're trying to use a {0} where a {1} is expected. These types aren't compatible.",
"causes": [
"Passing wrong type to function",
"Assigning incompatible values",
"Mixing pointers with non-pointers",
"String vs char array confusion"
],
"fixes": [
"Check function documentation for expected parameter types",
"Use proper type conversion: (int)value or String(value)",
"For strings: use .c_str() to convert String to char*",
"Make sure variable types match what function expects"
]
},
# Function Errors
r"too few arguments to function '(\w+)'": {
"type": "missing_arguments",
"explanation": "Function '{0}' requires more arguments than you provided.",
"causes": [
"Forgot to include required parameters",
"Using wrong function overload",
"Misread documentation"
],
"fixes": [
"Check function documentation for required parameters",
"Look at function definition to see all parameters",
"Add missing arguments in correct order"
]
},
r"too many arguments to function '(\w+)'": {
"type": "extra_arguments",
"explanation": "Function '{0}' received more arguments than it accepts.",
"causes": [
"Added extra parameters by mistake",
"Using wrong function overload",
"Comma inside a string being interpreted as separator"
],
"fixes": [
"Remove extra arguments",
"Check function documentation for correct usage",
"Verify you're calling the right function"
]
},
r"'class (\w+)' has no member named '(\w+)'": {
"type": "no_member",
"explanation": "The '{0}' library/class doesn't have a function or variable called '{1}'.",
"causes": [
"Typo in method name",
"Using method from wrong library version",
"Method doesn't exist in this library",
"Object type is wrong"
],
"fixes": [
"Check library documentation for correct method names",
"Verify library version matches examples",
"Look for similar method names (case-sensitive)",
"Make sure object is correct type"
]
},
# Memory Errors
r"section.*will not fit in region": {
"type": "memory_overflow",
"explanation": "Your code is too large to fit in the microcontroller's memory.",
"causes": [
"Using too many libraries",
"Large arrays or strings",
"Debug/print statements taking space",
"Using wrong board selection"
],
"fixes": [
"Use F() macro for strings: Serial.println(F(\"text\"))",
"Use PROGMEM for constant arrays",
"Remove unused libraries and code",
"Use smaller data types (byte vs int)",
"Verify correct board is selected in Tools menu"
]
},
r"data.*will not fit|RAM.*overflow": {
"type": "ram_overflow",
"explanation": "Your program uses more RAM than available. Variables and runtime data exceed memory limits.",
"causes": [
"Large arrays or buffers",
"Many String objects",
"Recursive functions",
"Large local variables"
],
"fixes": [
"Use PROGMEM for constant data",
"Use smaller buffers",
"Avoid String class, use char arrays",
"Make large arrays global instead of local",
"Use byte instead of int where possible"
]
},
# Library Errors
r"No such file or directory.*#include.*<(\w+)": {
"type": "missing_library",
"explanation": "The library '{0}' is not installed.",
"causes": [
"Library not installed",
"Typo in library name",
"Wrong include path",
"Library in wrong folder"
],
"fixes": [
"Install library: Sketch → Include Library → Manage Libraries",
"Search for '{0}' in Library Manager",
"Check for correct library name (case-sensitive)",
"Manually install: download .zip, Sketch → Include Library → Add .ZIP"
]
},
r"multiple definition of `(\w+)'": {
"type": "multiple_definition",
"explanation": "'{0}' is defined more than once in your code.",
"causes": [
"Same variable/function in multiple files",
"Header file included multiple times without guards",
"Copy-paste error creating duplicates"
],
"fixes": [
"Remove duplicate definitions",
"Use 'extern' keyword for variables shared between files",
"Add include guards to header files",
"Search your code for duplicate names"
]
},
# Board/Upload Errors
r"avrdude.*programmer.*not responding": {
"type": "upload_fail",
"explanation": "Cannot communicate with the Arduino board.",
"causes": [
"Wrong COM port selected",
"USB cable is data-only (no data lines)",
"Driver not installed",
"Board not connected",
"Another program using the port"
],
"fixes": [
"Select correct port: Tools → Port",
"Try a different USB cable (use data cable, not charge-only)",
"Unplug and replug the Arduino",
"Close Serial Monitor and any other serial programs",
"Try a different USB port",
"Install/reinstall Arduino drivers"
]
},
r"ser_open\(\).*can't open device": {
"type": "port_error",
"explanation": "Cannot open the serial port. The port may be in use or disconnected.",
"causes": [
"Port used by another program",
"Arduino disconnected",
"Wrong port selected",
"Permission denied (Linux/Mac)"
],
"fixes": [
"Close other programs using serial port",
"Check Arduino is plugged in",
"Select correct port in Tools → Port",
"On Linux: add user to dialout group"
]
},
# ESP32/ESP8266 Specific
r"Brownout detector was triggered": {
"type": "brownout",
"explanation": "The ESP32 detected insufficient power and reset to protect itself.",
"causes": [
"USB port cannot supply enough current",
"Power-hungry peripherals",
"WiFi transmission spikes",
"Bad USB cable with high resistance"
],
"fixes": [
"Use powered USB hub",
"Add external power supply (5V 1A minimum)",
"Use shorter/better quality USB cable",
"Add large capacitor (100-470µF) near ESP32 power pins",
"Reduce WiFi transmit power in code"
]
},
r"rst:0x1.*POWERON_RESET.*rst:0x10.*RTCWDT_RTC_RESET": {
"type": "watchdog_reset",
"explanation": "ESP32 watchdog timer reset - code is stuck in a loop or blocking for too long.",
"causes": [
"Infinite loop without yield()",
"Blocking code in callbacks",
"WiFi.begin() without connection timeout"
],
"fixes": [
"Add yield() or delay(1) in long loops",
"Don't block in interrupt handlers",
"Add timeouts to network operations",
"Use async/non-blocking patterns"
]
}
}
# Common Arduino keywords that might be typos
COMMON_TYPOS = {
"Led": "LED",
"led": "LED",
"HIGH": "HIGH",
"high": "HIGH",
"Low": "LOW",
"low": "LOW",
"input": "INPUT",
"output": "OUTPUT",
"serial": "Serial",
"SERIAL": "Serial",
"String": "String",
"string": "String",
"Delay": "delay",
"DELAY": "delay",
"pinmode": "pinMode",
"PinMode": "pinMode",
"digitalwrite": "digitalWrite",
"DigitalWrite": "digitalWrite",
"digitalread": "digitalRead",
"DigitalRead": "digitalRead",
"analogwrite": "analogWrite",
"AnalogWrite": "analogWrite",
"analogread": "analogRead",
"AnalogRead": "analogRead"
}
@dataclass
class ParsedError:
"""Parsed error information"""
original: str
error_type: str
explanation: str
causes: List[str]
fixes: List[str]
line_number: Optional[int] = None
file_name: Optional[str] = None
identifier: Optional[str] = None
def extract_location(error_line: str) -> Tuple[Optional[str], Optional[int]]:
"""Extract file name and line number from error"""
# Pattern: /path/to/file.ino:123:45: error:
match = re.search(r'([^/\\:]+\.(?:ino|cpp|c|h)):(\d+):', error_line)
if match:
return match.group(1), int(match.group(2))
return None, None
def parse_error(error_text: str) -> List[ParsedError]:
"""Parse error message and return explanation"""
results = []
# Split into lines and process
lines = error_text.strip().split('\n')
for line in lines:
# Skip non-error lines
if 'error:' not in line.lower() and 'warning:' not in line.lower():
continue
file_name, line_num = extract_location(line)
# Try to match against known patterns
for pattern, info in ERROR_PATTERNS.items():
match = re.search(pattern, line, re.IGNORECASE)
if match:
# Extract captured groups for formatting
groups = match.groups()
explanation = info["explanation"]
if groups:
try:
explanation = explanation.format(*groups)
except (IndexError, KeyError):
pass
fixes = []
for fix in info["fixes"]:
if groups:
try:
fix = fix.format(*groups)
except (IndexError, KeyError):
pass
fixes.append(fix)
results.append(ParsedError(
original=line,
error_type=info["type"],
explanation=explanation,
causes=info["causes"],
fixes=fixes,
line_number=line_num,
file_name=file_name,
identifier=groups[0] if groups else None
))
break
else:
# No pattern matched - generic error
results.append(ParsedError(
original=line,
error_type="unknown",
explanation="Error not in database. See original message.",
causes=["Check the exact error message"],
fixes=["Search online for this specific error"],
line_number=line_num,
file_name=file_name
))
return results
def check_typo(identifier: str) -> Optional[str]:
"""Check if identifier might be a typo of common Arduino keyword"""
if identifier in COMMON_TYPOS:
return COMMON_TYPOS[identifier]
# Case-insensitive check
lower = identifier.lower()
for typo, correct in COMMON_TYPOS.items():
if typo.lower() == lower:
return correct
return None
def format_report(errors: List[ParsedError], verbose: bool = True) -> str:
"""Format error analysis as readable report"""
if not errors:
return "No errors found in input."
lines = [
"=" * 60,
" ERROR ANALYSIS REPORT",
"=" * 60,
""
]
for i, err in enumerate(errors, 1):
lines.append(f"Error #{i}: {err.error_type.upper()}")
lines.append("-" * 40)
if err.file_name:
loc = f"{err.file_name}"
if err.line_number:
loc += f", line {err.line_number}"
lines.append(f"Location: {loc}")
lines.append("")
lines.append(f"🔍 What happened:")
lines.append(f" {err.explanation}")
# Check for typo suggestion
if err.identifier:
suggestion = check_typo(err.identifier)
if suggestion:
lines.append(f" 💡 Did you mean: {suggestion}")
if verbose:
lines.append("")
lines.append("📋 Possible causes:")
for cause in err.causes[:3]:
lines.append(f" • {cause}")
lines.append("")
lines.append("🔧 How to fix:")
for fix in err.fixes[:3]:
lines.append(f" • {fix}")
lines.append("")
lines.append(f"Original: {err.original[:80]}...")
lines.append("")
return "\n".join(lines)
def interactive_mode():
"""Interactive error analysis"""
print("=" * 60)
print("Error Message Explainer - Interactive Mode")
print("=" * 60)
print()
print("Paste your error message (press Enter twice when done):")
print()
lines = []
while True:
line = input()
if not line and lines and not lines[-1]:
break
lines.append(line)
error_text = "\n".join(lines)
if not error_text.strip():
print("No error message provided.")
return
errors = parse_error(error_text)
report = format_report(errors)
print(report)
def main():
parser = argparse.ArgumentParser(description="Arduino Error Message Parser")
parser.add_argument("--interactive", "-i", action="store_true", help="Interactive mode")
parser.add_argument("--file", "-f", type=str, help="Read errors from file")
parser.add_argument("--message", "-m", type=str, help="Single error message")
parser.add_argument("--stdin", action="store_true", help="Read from stdin")
parser.add_argument("--json", "-j", action="store_true", help="Output as JSON")
parser.add_argument("--brief", "-b", action="store_true", help="Brief output")
args = parser.parse_args()
error_text = ""
if args.interactive:
interactive_mode()
return
if args.file:
with open(args.file, 'r') as f:
error_text = f.read()
elif args.message:
error_text = args.message
elif args.stdin:
import sys
error_text = sys.stdin.read()
else:
parser.print_help()
return
errors = parse_error(error_text)
if args.json:
import dataclasses
output = [dataclasses.asdict(e) for e in errors]
print(json.dumps(output, indent=2))
else:
print(format_report(errors, verbose=not args.brief))
if __name__ == "__main__":
main()