Closed soulcharmer closed 3 years ago
@soulcharmer This is not entirely a bug but a known behavior. https://github.com/redhataccess/pantheon-cmd/blob/702d3aa54e315150c9d8405da6e246a848597e9f/PantheonCMD/pcchecks.py#L199
The validator maintains 2 versions of the file. One is the original, the other one is the modified version with removed single line and multi line comments. The validator checks if the modified version has an additional resources section and if it does, it then checks the original version for the comment after the additional resources section.
If there are 2 additional resources section, one commented out and one not commented out, the validator would pick on the commented out section while performing the check, as there's no way to check the modified version for the comments cause they are, well, removed.
In this particular example, the test picked up on the commented out additional resources section on lines 81-82 of rhel-8/modules/core-kernel/proc_changing-kernel-command-line-parameters-for-all-boot-entries.adoc
file:
//.Additional resources
//
I can add a negative lookbehind to the regular expression that'll prevent the test from picking up additional resources section if it has //
before it, but it'll still pick up on additional resources section inside a multi-line comment, e.g.:
////
.Additional resources
//
////
or:
////
.Additional resources
/////
something commented out
////
////
That being said, I don't think a comment would prevent files from rendering properly. Can you perhaps confirm that by uploading a test file to Pv2? In which case I'll just remove this test altogether.
Finally, I was able to check in Pv2 that neither one-line nor multiline comments do nothing to how the Add.resources box is rendered. I think we can remove this test case.
I started to review and fix pcmd validate results in the RHEL 8 repo and saw a few things worth checking:
FAIL: a comment after the additional resources header was found in the following files: rhel-8/modules/core-kernel/proc_changing-kernel-command-line-parameters-for-all-boot-entries.adoc
Looks like a false positive, a comment is just further below and away from the header