odb: Use snake_case for LEF58 cut rules parser variables (#2275)#9722
Conversation
…-OpenROAD-Project#2275) Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
…D-Project#2275) Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
There was a problem hiding this comment.
Code Review
This pull request successfully refactors the Boost.Spirit parser rule variables to use snake_case, improving consistency with the Google C++ Style Guide. However, the automatic reformatting for long lines has introduced some unconventional and inconsistent code styles. My review includes specific suggestions to improve the formatting for better readability and maintainability.
| bool valid | ||
| = qi::phrase_parse(first, last, enclosure_rule, space) && first == last; |
There was a problem hiding this comment.
This line break before the assignment operator is unconventional and harms readability. It's better to keep the declaration and assignment on one line. If the line is too long, it should be broken after an operator like &&, which is the pattern used in other files in this PR.
bool valid = qi::phrase_parse(first, last, enclosure_rule, space) && first == last;| qi::rule<std::string::const_iterator, space_type> | ||
| parallel_within_cut_class_rule | ||
| = (lit("CUTCLASS") |
There was a problem hiding this comment.
This formatting is unconventional. A more standard way to break long declaration lines is to place the = on the same line as the variable name and indent the following lines.
| qi::rule<std::string::const_iterator, space_type> | |
| parallel_within_cut_class_rule | |
| = (lit("CUTCLASS") | |
| qi::rule<std::string::const_iterator, space_type> | |
| parallel_within_cut_class_rule = | |
| (lit("CUTCLASS") |
| qi::rule<std::string::const_iterator, space_type> | ||
| non_opposite_enclosure_spacing_rule | ||
| = (lit("NONOPPOSITEENCLOSURESPACING") |
There was a problem hiding this comment.
This formatting is unconventional. A more standard way to break long declaration lines is to place the = on the same line as the variable name and indent the following lines.
| qi::rule<std::string::const_iterator, space_type> | |
| non_opposite_enclosure_spacing_rule | |
| = (lit("NONOPPOSITEENCLOSURESPACING") | |
| qi::rule<std::string::const_iterator, space_type> | |
| non_opposite_enclosure_spacing_rule = | |
| (lit("NONOPPOSITEENCLOSURESPACING") |
| qi::rule<std::string::const_iterator, space_type> | ||
| OPPOSITEENCLOSURERESIZESPACING | ||
| opposite_enclosure_resize_spacing_rule | ||
| = (lit("OPPOSITEENCLOSURERESIZESPACING") |
There was a problem hiding this comment.
This formatting is unconventional. A more standard way to break long declaration lines is to place the = on the same line as the variable name and indent the following lines.
| qi::rule<std::string::const_iterator, space_type> | |
| OPPOSITEENCLOSURERESIZESPACING | |
| opposite_enclosure_resize_spacing_rule | |
| = (lit("OPPOSITEENCLOSURERESIZESPACING") | |
| qi::rule<std::string::const_iterator, space_type> | |
| opposite_enclosure_resize_spacing_rule = | |
| (lit("OPPOSITEENCLOSURERESIZESPACING") |
|
@Divinesoumyadip Notice that you added the same changes in this PR that you already applied here: #9721. This can conflict if we merge #9721 first, so please be sure to not mix things up in different PRs. |
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
@Divinesoumyadip please look at the conflicts with master. |
Thanks, @eder-matheus ,I'm resolving the conflicts with master now and will push the update shortly |
|
Conflicts resolved! I synced with master and ensured the changes from PR #9721 for ArraySpacingParser.cpp and KeepOutZoneParser.cpp are preserved. The remaining cut spacing parser files are ready for review
Conflicts resolved! I synced with master and ensured the changes from PR #9721 for ArraySpacingParser.cpp and KeepOutZoneParser.cpp are preserved. The remaining cut spacing parser files are ready for review. |
|
clang-tidy review says "All clean, LGTM! 👍" |
5fbdc5d
into
The-OpenROAD-Project:master
Description
This PR continues the refactoring effort for issue #2275. It updates the
Boost.Spiritqi::rulevariable names fromSCREAMING_SNAKE_CASEto standardsnake_casein several LEF58 parser files. This ensures compliance with the Google C++ Style Guide and improves internal consistency within theodbmodule.Files Modified
Testing