-
Notifications
You must be signed in to change notification settings - Fork 232
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
Control character check #687
Conversation
You have successfully added a new shellcheck configuration |
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.
Thank you for the patch. But let's not do two runs through the characters. You can just combine this with the check below for isprint().
If you'd rather I make that change in-line while merging, please let me know.
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.
Added a control character check within the non-printable character pass.
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.
Two minor comments and I'd like to raise that one of the tests is failing in the CI. I didn't check it profoundly, but it's a usermod
test case and you are changing that file so it seems valid.
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.
Updates to the text make sense as per the changes made to control characters returning -1 and non-printables returning 1 still.
Added control character check, returning -1 (to "err") if control characters are present.
@hallyn what do we do with the failing test case? |
I'll have to look into it this hopefully tonight, else this weekend. I'll look at the others you mentioned too. |
Oh - I see, it fails in your doc-only pr too. Let's just merge then. |
Added a check to search for control characters and return -1 (in "err") if found.