-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show security heading only if warnings exist #537
Show security heading only if warnings exist #537
Conversation
Test highlights that there is ambiguity in the tested code because there are two booleans to represent a single condition. It is possible to have hideWarning == true and showWarning == true, even though we can only do one or the other but not both. Another pull request or another change in this pull request will need to resolve that issue in the most recently merged pull request.
@jiakuanghe are you interested in making the change to replace the two boolean variables that control the visibility of security warnings with a single boolean variable? If not, I'll make that change. I didn't consider the case where a programmer (like me writing the tests in this pull request) might make the mistake of assigning conflicting values to those two boolean variables that represent the same condition. The conflict won't be seen by users, but it will make it more difficult to change this code if two variables are used to represent the single condition. I missed that when I reviewed |
@MarkEWaite Yes, I am interested in making the change. To keep the compatibility with the previous version, I reserved the |
I don't think that we want to remove the |
Got it! But what if the user uses the |
I agree with you. Just keeping one variable there is better. Can I remove the internal variable |
I think so, though you'll need to check the places that are referring to that variable so that they instead refer to the |
Thanks. I will do that. Do I need to create an issue and quoted it in the PR? Or it is okay to quote this #537 in my new PR? |
Good enough to mention this in the pull request. If the mention in includes the URL of the comment, I believe GitHub will add a line in the PR history and in the comment that will show they are related to each other. |
…trol the visibility of security warnings with a single boolean variable (jenkinsci#537) - Delete the old internal variable `showWarnings` and its existing getter read the negated value of the new variable `hideWarnings`.
@MarkEWaite Done #549! Please let me know if there is anything that needs to be further improved. Thanks! |
I have reviewed the PR @jiakuanghe. Great work 🚀 |
Only show security heading if there is a security warning
Test highlights that there is ambiguity in the tested code because there are two booleans to represent a single condition. It is possible to have hideWarning == true and showWarning == true, even though we can only do one or the other but not both.
Another pull request or another change in this pull request will need to resolve that issue in the most recently merged pull request.