-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://github.com/koalaman/shellcheck/wiki/SC2206 https://github.com/koalaman/shellcheck/wiki/SC2207 admittedly this one is a lot less pretty
- Loading branch information
1 parent
430fdb7
commit c335a18
Showing
1 changed file
with
50 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c335a18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a practical problem (bisected). Currently some packages use
*Flags
with newlines inside them and those got silently broken by this commit. Example: 6a10c72. I think nowadays we can migrate packages to syntax like d7427b0, but*Flags
were set incorrectly.c335a18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks for going through this.
So if I understand correctly, there should be an additional check in the flags array to see if they include a newline and then print an error message and an exit.
Got it.
Since making a PR with several commits generated quite some complications, I'll try to make a PR with just one commit for this issue.
I'll add it on the list of things to do.
c335a18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps. I'm not sure if there's some good use case to have the newlines in there. It's hard to see all cases, because there were many breaking changes in this staging iteration and there's always lots of "random failures" mixed in as well (e.g. flaky tests or builder getting overloaded and timing out).
c335a18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't imagine newlines at the time.
I'll remake a PR and put this in a separate commit. I can do a non-breaking change by making the split on space and newline explicit.
Then perhaps later we can try removing the newline and see which packages break.
Thank you for the insights and sorry for the troubles!