Community & Code

Contributing to Bank Statement Parser

Guidelines for bug reporting, code contributions, DCO sign-offs, and test-driven verification.

Thank you for your interest in contributing to Bank Statement Parser. We welcome contributions for new regional statement dialects, zero-copy performance optimizations, parser rulebook definitions, and documentation improvements.

01

Local Development Environment Setup

Bank Statement Parser is built in Rust with companion Python bindings. Ensure you have the stable Rust toolchain and Python 3.10+ installed:

bash — clone & setup
# Fork and clone repository
$git clone https://github.com/YOUR_USERNAME/bankstatementparser.git
$cd bankstatementparser
 
# Build debug binary
$cargo build
02

Test-Driven Verification & Invariants

Every pull request must pass the automated test suite, clippy linter checks, and formatting verification. 100% test coverage on new parsing dialects is required:

bash — test suite
# Execute full test suite across all dialects
$cargo test
 
# Run strict Clippy linter with all features enabled
$cargo clippy --all-targets --all-features -- -D warnings
 
# Verify formatting conforms to rustfmt
$cargo fmt --check
03

Sample Data & PII Sanitization Invariant

To protect privacy and comply with data sovereignty regulations, never submit real-world bank statements containing Personally Identifiable Information (PII) or authentic account details:

Data Field Invariant Requirement Verification Method
IBAN Checksums Must use valid ISO 7064 Mod-97 test numbers Verified by test_sample_data_valid.rs
SWIFT / BIC Structurally valid 8 or 11-char test BICs ISO 9362 structural regex validation
Customer PII Synthetic names, anonymized street addresses Zero real customer records permitted
Currencies Standard ISO 4217 currency identifiers (EUR, GBP, USD) Matched against official currency table
04

Commit Standards, DCO & Signing

All contributions must follow Conventional Commits, be SSH/GPG signed, and carry a Developer Certificate of Origin (DCO) Signed-off-by trailer:

bash — commit conventions
# Commit with DCO sign-off (-s) and cryptographic signature (-S)
$git commit -s -S -m "feat(dialect): add barclays corporate pdf extractor"