google / mdbook-i18n-helpers

Translation support for mdbook. The plugins here give you a structured way to maintain a translated book.
Apache License 2.0
127 stars 25 forks source link

Implement fuzzer for normalize #81

Closed kdarkhan closed 12 months ago

kdarkhan commented 12 months ago

This addresses https://github.com/google/mdbook-i18n-helpers/issues/57.

I am focusing on mdbook-i18n-normalize binary only in this PR. I will implement fuzzers for other binaries separately. In order to fuzz the logic, I had to move it out of binary to library. The first commit copies the binary file without making any changes to make the review easier.

I confirmed that when running the new fuzzer against the version of the code before https://github.com/google/mdbook-i18n-helpers/pull/56 was merged, it finds a failure pretty quickly.

mgeisler commented 12 months ago

In order to fuzz the logic, I had to move it out of binary to library. The first commit copies the binary file without making any changes to make the review easier.

Nice, thanks for thinking of your reviewer! 🙂

Please squash the first two commits into one so that you move the code instead of copying and deleting it. The way I see it, the repository should look good at any commit and ir someone where to checkout the first commit, they would probably wonder about the duplicate code

Also, please name the new module nornalize, I think the i18n_ prefix is redundant since we're already inside a mdbook_i18n_helpers module.

kdarkhan commented 12 months ago

Sounds good. I removed the prefix i18n_ from the module name and the fuzz target name, squashed the commits as well.

mgeisler commented 12 months ago

Awesome, this looks great!

mgeisler commented 11 months ago

@kdarkhan, would #83 be something for you since you're already looking at fuzzers?

kdarkhan commented 11 months ago

@mgeisler, sure, I will work #83 as well once I am done with the other 2 fuzz tests.

mgeisler commented 11 months ago

Thanks!