Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor generate and add tests #764

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

not-my-profile
Copy link
Contributor

@not-my-profile not-my-profile commented Jun 24, 2023

A preliminary PR for #765.

crates/typos-dict/tests/verify.rs Outdated Show resolved Hide resolved
crates/typos-dict/tests/verify.rs Outdated Show resolved Hide resolved
@not-my-profile not-my-profile force-pushed the refactor-generate branch 2 times, most recently from b7327d4 to f11cfcc Compare June 26, 2023 16:34
@not-my-profile not-my-profile changed the title Refactor generate Refactor generate and add tests Jun 26, 2023
Previously all the dictionary cleanup logic was in the function:

    fn generate<W: std::io::Write>(file: &mut W, dict: &[u8])

which parsed the provided buffer as CSV and also took care of writing
the processed dictionary back as CSV.  This commit factors out the CSV
handling, leaving a `process` function behind so that it can be easily
tested in the following commit.
@epage epage merged commit 357aa55 into crate-ci:master Jun 26, 2023
11 checks passed
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.

2 participants