Skip to content
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

Fixes #5843 Changes _check_comment to check for spaces and capitals #5852

Merged
merged 10 commits into from
Nov 15, 2018
Prev Previous commit
Next Next commit
various spellcheck and clarifications
  • Loading branch information
Chris Tao authored and Chris Tao committed Nov 15, 2018
commit f99419602bc8643d760ef8f892c3f6a95b887802
5 changes: 3 additions & 2 deletions scripts/pre_commit_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,8 +984,9 @@ def _check_comments(all_files):
print '%s --> Line %s: %s' % (
filename, line_num + 1, message)

# Check that comment starts with a space
# and is not a shebang, which doesn't work with a space.
# Check that comment starts with a space and is not a shebang
# expression at the start of a bash script which loses function
# when a space is added.
if space_regex.match(line) and not line.startswith('#!'):
message = (
'There should be a space at the beginning '
Expand Down