| Crates.io | csv_ledger |
| lib.rs | csv_ledger |
| version | 0.1.2 |
| created_at | 2022-08-31 17:28:18.73246+00 |
| updated_at | 2022-09-03 09:17:07.119126+00 |
| description | Consume a CSV containing a list of transactions and produce a set of bank account statements. |
| homepage | |
| repository | https://github.com/OliverBrotchie/csv-ledger |
| max_upload_size | |
| id | 655826 |
| size | 335,613 |
csv_ledgercargo install csv_ledger
Print output to console:
csv_ledger foo.csv
Save output to file:
csv_ledger --output output.csv foo.csv
To see helpful information:
csv_ledger --help
Further documentation can be found here.
To run tests for the CLI:
cargo test --features test_args
To run tests for the library:
cd lib && cargo test
This project aimed to have a near 100% code-coverage. Whilst Rust provides first-class error checking, it cannot easily protect against logic errors. With strong test coverage in combination with Rust's error checking, you can have a high degree of confidence. However, I have found that getting to 100% coverage can be very difficult whilst using llvm-cov. LLVM's coverage tooling is far more precise than other coverage tools that I have worked with in the past (such as Jest), requiring all lines, branches, derived traits and implementations to be covered.
A pre-generated coverage report can be found in: /coverage/html.
Setup
rustup component add llvm-tools-preview &&
cargo install cargo-llvm-cov
Usage
To create a coverage report:
cargo llvm-cov --features test_args
To debug a coverage report:
cargo llvm-cov --features test_args --html --output-dir coverage