Fix typos across the codebase#1076
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1076 +/- ##
=======================================
Coverage 55.90% 55.90%
=======================================
Files 99 99
Lines 5023 5023
Branches 2236 2236
=======================================
Hits 2808 2808
Misses 733 733
Partials 1482 1482 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR performs a broad typo/documentation cleanup across tests, internal implementation comments, and public headers. It fits into the codebase as a non-functional maintenance pass intended to improve readability and developer-facing API documentation.
Changes:
- Correct spelling mistakes in test comments and assertions.
- Fix typos in internal source comments and developer notes.
- Clean up wording in public header documentation for archive, search, suggestion, item, entry, and blob APIs.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
test/tooltesting.cpp |
Fixes a typo in a test comment about batch boundaries. |
test/suggestion.cpp |
Corrects wording in a compatibility-related test comment. |
test/search.cpp |
Corrects the same compatibility comment in search tests. |
test/find.cpp |
Fixes a typo in a binary-search test comment. |
test/error_in_creator.cpp |
Cleans up spelling in asynchronous error-handling test comments. |
test/cluster.cpp |
Fixes a typo in an architecture-related test comment. |
test/archive.cpp |
Updates misspelled nonexistent-path strings and nearby comments in archive tests. |
src/writer/workers.cpp |
Corrects a typo in a worker shutdown comment. |
src/writer/defaultIndexData.h |
Fixes spelling in initialization comments. |
src/writer/cluster.cpp |
Cleans up compression/write-path comments. |
src/suggestion.cpp |
Corrects BM25 documentation wording. |
src/search_internal.h |
Fixes a typo in suggestion-mode commentary. |
src/reader.h |
Corrects a typo in a read helper comment. |
src/narrowdown.h |
Cleans up spelling in class-level and sorting comments. |
src/lrucache.h |
Fixes copyright/documentation typos in the cache header. |
src/fileimpl.cpp |
Corrects several tolerance/resource-related comment typos. |
src/dirent.cpp |
Fixes spelling in buffer-sizing comments. |
src/compression.h |
Cleans up typoed decompression comments. |
src/cluster.cpp |
Fixes concurrency-related comment wording. |
src/archive.cpp |
Corrects a typo in explanatory archive comments. |
include/zim/suggestion.h |
Improves public API documentation spelling for suggestion search. |
include/zim/search_iterator.h |
Fixes iterator doc typos and grammar. |
include/zim/search.h |
Cleans up public search API documentation wording. |
include/zim/item.h |
Corrects item API doc comments. |
include/zim/entry.h |
Fixes a typo in entry redirection documentation. |
include/zim/blob.h |
Corrects constructor documentation spelling. |
include/zim/archive.h |
Cleans up archive API documentation wording and examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Too long and all tests will wait to much and developers hate to wait | ||
| // Not enough and error is not detected and tests fail (and developers hate failing tets) | ||
| // The exacte value is specific to each computer, so we need to make this configurable. |
| * | ||
| * A SuggestionSearcher is mainly used to create new `SuggestionSearch` | ||
| * Internaly, this is a wrapper around a SuggestionDataBase with may or may not | ||
| * Internally, this is a wrapper around a SuggestionDataBase with may or may not |
| * | ||
| * It can be usefull as an optimisation when interacting with other system | ||
| * It can be useful as an optimisation when interacting with other system | ||
| * by reopeing the file and reading the content bypassing the libzim. |
| // Note: | ||
| // - No need to protect this method from concurent access (as well | ||
| // - No need to protect this method from concurrent access (as well | ||
| // as memoize its result) as it is intended to be called by ConcurentCache |
| ASSERT_THROW(archive.getEntryByPath("non/existant/path"), zim::EntryNotFound); | ||
| ASSERT_THROW(archive.getEntryByPath("C/non/existant/path"), zim::EntryNotFound); | ||
| ASSERT_THROW(archive.getEntryByPathWithNamespace('C', "non/existant/path"), zim::EntryNotFound); | ||
| // NO existent entries |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Too long and all tests will wait to much and developers hate to wait | ||
| // Not enough and error is not detected and tests fail (and developers hate failing tets) | ||
| // The exacte value is specific to each computer, so we need to make this configurable. |
| * | ||
| * A SuggestionSearcher is mainly used to create new `SuggestionSearch` | ||
| * Internaly, this is a wrapper around a SuggestionDataBase with may or may not | ||
| * Internally, this is a wrapper around a SuggestionDataBase with may or may not |
|
|
||
| // If the database is open for suggestion. | ||
| // True even if the dabase has no newSuggestionformat. | ||
| // True even if the database has no newSuggestionformat. |
| ASSERT_THROW(archive.getEntryByPath("non/existant/path"), zim::EntryNotFound); | ||
| ASSERT_THROW(archive.getEntryByPath("C/non/existant/path"), zim::EntryNotFound); | ||
| ASSERT_THROW(archive.getEntryByPathWithNamespace('C', "non/existant/path"), zim::EntryNotFound); | ||
| // NO existent entries |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 27 changed files in this pull request and generated 13 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** Get a set of results for this search. | ||
| * | ||
| * @param start The begining of the range to get | ||
| * @param start The beginning of the range to get |
| /** Return a list of available sizes (width) for the illustrations in the archive. | ||
| * | ||
| * Illustration is an icon for the archive that can be used in catalog and elsewehere to illustrate the archive. | ||
| * Illustration is an icon for the archive that can be used in catalog and elsewhere to illustrate the archive. |
| * | ||
| * If there is a chain of redirection, the whole chain is resolved | ||
| * and the item associted to the last entry is returned. | ||
| * and the item associated to the last entry is returned. |
| * Get the data of the item, starting at offset. | ||
| * | ||
| * @param offset The number of byte to skip at begining of the data. | ||
| * @param offset The number of byte to skip at beginning of the data. |
| * - User entries are always stored without namespace. | ||
| * (For information, they are stored in the same namespace `C`. Still consider there is no namespace as all API masks it) | ||
| * As there is no namespace, paths don't contain it: `foo.hmtl`, `image.png`, ... | ||
| * As there is no namespace, paths don't contain it: `foo.html`, `image.png`, ... |
| * You can search for articles in a certain distance of a point. | ||
| * | ||
| * @param latitude The latitute of the point. | ||
| * @param latitude The latitude of the point. |
| * | ||
| * A SuggestionSearcher is mainly used to create new `SuggestionSearch` | ||
| * Internaly, this is a wrapper around a SuggestionDataBase with may or may not | ||
| * Internally, this is a wrapper around a SuggestionDataBase with may or may not |
|
|
||
| // If the database is open for suggestion. | ||
| // True even if the dabase has no newSuggestionformat. | ||
| // True even if the database has no newSuggestionformat. |
| * and at which to read to get the data. | ||
| * | ||
| * It can be usefull as an optimisation when interacting with other system | ||
| * It can be useful as an optimisation when interacting with other system |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 27 out of 27 changed files in this pull request and generated 17 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * Get the `size` bytes of data of the item, starting at offset. | ||
| * | ||
| * @param offset The number of byte to skip at begining of the data. | ||
| * @param offset The number of byte to skip at beginning of the data. |
| * | ||
| * If there is a chain of redirection, the whole chain is resolved | ||
| * and the item associted to the last entry is returned. | ||
| * and the item associated to the last entry is returned. |
| * You can search for articles in a certain distance of a point. | ||
| * | ||
| * @param latitude The latitute of the point. | ||
| * @param latitude The latitude of the point. |
| * | ||
| * It can be usefull as an optimisation when interacting with other system | ||
| * It can be useful as an optimisation when interacting with other system | ||
| * by reopeing the file and reading the content bypassing the libzim. |
| @@ -304,8 +304,8 @@ TEST_P(FaultyDelayedItemErrorTest, faultyCompressedItem) | |||
| CHECK_ASYNC_EXCEPT(creator.addMetadata("A metadata", "A compressed (default) metadata")); | |||
| // give a chance to threads to detect the error. | |||
| // How many time to wait is a bit tricky. | |||
| * It is inferred from the internal way the entry are stored. | ||
| * | ||
| * This method is probably not relevent and is provided for completeness. | ||
| * This method is probably not relevant and is provided for completeness. |
| * Get the data of the item, starting at offset. | ||
| * | ||
| * @param offset The number of byte to skip at begining of the data. | ||
| * @param offset The number of byte to skip at beginning of the data. |
| * | ||
| * A SuggestionSearcher is mainly used to create new `SuggestionSearch` | ||
| * Internaly, this is a wrapper around a SuggestionDataBase with may or may not | ||
| * Internally, this is a wrapper around a SuggestionDataBase with may or may not |
| * An Archive may contains several illustrations with different size. | ||
| * This method allows to know which illustration are in the archive (by size: width) |
| /** Get a random entry. | ||
| * | ||
| * The entry is picked randomly from the front artice list. | ||
| * The entry is picked randomly from the front article list. |
|
@anuragagrawal17 Copilot has reported a lot of new typos, and this is the right moment to fix them. Therefore I pospone this PR to the next milestone, so we can fix them. |
No description provided.