poac
poac copied to clipboard
Allow `.` in package names
fixes #921
Changed the code to check if before and after the .
is a number, fixing package names like gtkmm-4.0
.
This fixes issue https://github.com/poac-dev/poac/issues/921
@How2PlayGithub Please avoid spamming the CIs here. You should try compiling your code locally. Thanks.
Quick problem: Whenever I change it to what clang-tidy tells me to do, it just tells me what I originally did
/home/usr/Documents/poac/poac-out/debug/../../src/Manifest.cc:427:9: error: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr,-warnings-as-errors]
427 | if (!(std::isalnum(c) || c == '-' || c == '_' || c == '/'
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ! && != && != && !=
428 | || (c == '.' && (i > 0 && !std::isdigit(name[i - 1]))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| && != || <= ||
429 | && (i < name.size() - 1 && !std::isdigit(name[i + 1]))))) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| || >= ||
/home/usr/Documents/poac/poac-out/debug/../../src/Manifest.cc:427:9: error: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr,-warnings-as-errors]
427 | if (!(std::isalnum(c) && c != '-' && c != '_' && c != '/'
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ! || == || == || ==
428 | && (c != '.' || (i <= 0 || !std::isdigit(name[i - 1]))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| || == && > &&
429 | || (i >= name.size() - 1 || !std::isdigit(name[i + 1]))))) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| && < &&
@How2PlayGithub I would suggest you work on this first.
I would check if these are only the characters for this pass and check if dots are only surrounded by numbers in the next pass.
All done! I've tested it and it works
Hi @How2PlayGithub,
Thank you for your interest in contributing to this project. After multiple rounds of review, it seems that the required changes are still not correct, and I am concerned that the necessary effort to understand and implement the changes may not have been fully put in.
To maintain the quality of the codebase and respect everyone’s time, I need to set some clear expectations:
- Please thoroughly review the project code before making changes.
- Make sure to test your changes thoroughly before submitting them for review.
- If you are unsure about how to implement a change, feel free to ask for guidance, but make sure to put in the effort to understand the feedback provided.
Given the current situation, I am closing this PR. I encourage you to take the time to fully understand the changes needed and, once you feel confident, you can submit a new PR.
Thank you for your understanding.
Best regards, Ken