Summary
When loading magic files with invalid rules, the parser should report warnings about skipped rules instead of silently ignoring them.
Context
Per Core Flow 11 (Corrupted Magic File Handling), the parser should:
- Skip invalid individual rules and continue parsing
- Collect warnings about each skipped rule with line numbers
- Report summary: "Warning: Skipped N invalid rules in magic file"
Current state: Invalid rules are silently skipped. No warnings are collected or reported to the user.
Acceptance Criteria
Files to Modify
src/parser/mod.rs - Return warnings alongside parsed rules
src/parser/grammar.rs - Collect parse failures as warnings
src/main.rs - Display warnings to stderr
src/lib.rs - Propagate warnings through library API
References
Summary
When loading magic files with invalid rules, the parser should report warnings about skipped rules instead of silently ignoring them.
Context
Per Core Flow 11 (Corrupted Magic File Handling), the parser should:
Current state: Invalid rules are silently skipped. No warnings are collected or reported to the user.
Acceptance Criteria
Files to Modify
src/parser/mod.rs- Return warnings alongside parsed rulessrc/parser/grammar.rs- Collect parse failures as warningssrc/main.rs- Display warnings to stderrsrc/lib.rs- Propagate warnings through library APIReferences