Skip to content

refactor(parser): split parser.rs into module directory by document type#51

Merged
mostafa merged 1 commit into
mainfrom
feat/modularize-parser
Apr 30, 2026
Merged

refactor(parser): split parser.rs into module directory by document type#51
mostafa merged 1 commit into
mainfrom
feat/modularize-parser

Conversation

@mostafa
Copy link
Copy Markdown
Member

@mostafa mostafa commented Apr 30, 2026

Summary

  • Split crates/rsigma-parser/src/parser.rs (2276 lines) into a parser/ module directory with 5 submodules organized by Sigma document type
  • No functionality changes: pure restructuring with identical test results (254 tests pass, full workspace clippy clean)

Test plan

  • cargo fmt --all -- --check passes
  • cargo clippy --workspace --all-targets --all-features -- -D warnings passes (zero warnings)
  • cargo test -p rsigma-parser passes (241 unit + 9 integration + 4 doc-tests, 0 failures)

Modularize the 2276-line parser.rs into focused submodules organized
by Sigma document type. No behavior changes; identical test results
(241 unit + 9 integration + 4 doc-tests pass).

New structure:
  parser/
    mod.rs          -- public API, document dispatch, shared helpers
    detection.rs    -- detection rule and detection block parsing
    correlation.rs  -- correlation rule parsing
    filter.rs       -- filter rule parsing
    tests.rs        -- all unit tests
@mostafa mostafa merged commit f640f6a into main Apr 30, 2026
8 checks passed
@mostafa mostafa deleted the feat/modularize-parser branch April 30, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant