Initial commit of the common trick header dev branch - #67
Conversation
|
This is looking pretty good, just a few more edge cases we'll want to fix. Some general script comments:
The purpose section is placed within a second set of parenthesis but it should just stay at one. So I'm seeing the script convert to I'm also seeing the script choke on Trick headers that use a cascading '*', like the following: /*
* PURPOSE: (test)
*
* LIBRARY DEPENDENCY:
* (
* (../src/test.cc)
* )
* /In cases like that, it actually removes everything except the purpose field in the formatted output. This may end up being a nightmare to fix so just let me know if it's feasible to handle this case or not. Realistically, headers formatted this way will already fail our formatting check so the script does its main job, and just from looking around randomly I don't believe this is a common pattern in the repo anyways. For long lines, let's add one more indent when wrapping text just for visual clarity. So for the following header: /*
PURPOSE: (Test)
LIBRARY_DEPENDENCY:
(
(../src/test.cc)
)
PROGRAMMERS:
(
((Nino Tarantino) (CACI) (July 2026) (This is a very long comment that should get wrapped at 80 characters.))
)
*/The programmers section ends up like But I think it would look clearer if the line break was indented to visually separate a continued line from a new entry. Especially if there ends up being multiple entries: |
ninotarantino
left a comment
There was a problem hiding this comment.
Should've left that previous comment as part of the official GitHub review, whoops.
- last list of command line args will be the list of *.hh or *.cc files to be changed - file renamed to apply_cml_common_trick_header.py - script only warns for no PYTHON_MODULE or no cml/cml.* modules present for *.hh files - added ICG: directive - removed nested parenthesis for PURPOSE and ICG directories - script can handle the " /* ***... */ " C/C++ style comments for Trick headers - added extra indentation for lines that exceed the character limit Refs #40
Refs #40