Skip to content

Fix typos and non-standard variable names found by codespell#2652

Open
crawfordxx wants to merge 1 commit intorpm-software-management:mainfrom
crawfordxx:fix-typos-in-comments
Open

Fix typos and non-standard variable names found by codespell#2652
crawfordxx wants to merge 1 commit intorpm-software-management:mainfrom
crawfordxx:fix-typos-in-comments

Conversation

@crawfordxx
Copy link
Copy Markdown

Fix spelling mistakes in comments and rename non-standard variable names
found by codespell:

Typos in comments:

  • interesetedinterested (repomanage_plugin/repomanage.cpp)
  • preferingpreferring (reposync_plugin/reposync.cpp)
  • occuredoccurred (libdnf5/solv/vendor_change_manager.cpp)
  • wihtoutwithout (libdnf5/transaction/transaction_sr.cpp)
  • succededsucceeded (libdnf5/logger/rotating_file_logger.cpp)
  • occurenceoccurrence (dnf5daemon-server/services/history/history.cpp)
  • overridenoverridden (dnf5daemon-server/session.cpp)
  • realyreally (libdnf5/module/module_sack_impl.hpp)

Non-standard variable names (past tense of "read" is "read", not "readed"):

  • readedn_read (libdnf5/utils/fs/utils.cpp)
  • readedn (libdnf5/repo/repo_downloader.cpp)
  • readed_typeitem_type (libdnf5/conf/config_parser.cpp)

@jrohel jrohel self-assigned this Mar 16, 2026
Copy link
Copy Markdown
Contributor

@jrohel jrohel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I have one request, see the comments.

char buf[4096];
int readed;
while ((readed = static_cast<int>(repomd.readsome(buf, sizeof(buf)))) > 0) {
int n;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, readed is grammatically incorrect, but it is more descriptive than n. Could you please use a more specific name? Elsewhere in this PR (in utils.cpp), you are replacing readed with n_read. Please do the same here. It will make the PR more consistent, and n_read is more specific than n.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback! I've updated the PR in the latest commit (f903559) to use n_read in repo_downloader.cpp instead of n, making it consistent with the naming in utils.cpp. Sorry for the initial inconsistency.

@crawfordxx
Copy link
Copy Markdown
Author

Thanks for the review. I've renamed n to n_read in repo_downloader.cpp to match the naming used in utils.cpp, making the PR consistent throughout.

@crawfordxx
Copy link
Copy Markdown
Author

Hi @jrohel, the variable has been renamed to n_read in repo_downloader.cpp (same as in utils.cpp). Could you please take another look? Thanks!

- intereseted -> interested (repomanage_plugin)
- prefering -> preferring (reposync_plugin)
- occured -> occurred (vendor_change_manager)
- wihtout -> without (transaction_sr)
- succeded -> succeeded (rotating_file_logger)
- occurence -> occurrence (history service)
- overriden -> overridden (session)
- readed/readed_type -> n_read/item_type (utils, repo_downloader, config_parser)
- realy -> really (module_sack_impl)
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