Remove whitespace at end of line and max line length check

Was getting too annoying, and only for asthetic purposes anyway.
This commit is contained in:
Otto Winter 2019-05-29 09:31:28 +02:00
parent ec75fa6027
commit 7a78abb560
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
1 changed files with 0 additions and 14 deletions

View File

@ -45,12 +45,6 @@ for f in sorted(Path('.').glob('**/*.rst')):
lines = content.splitlines(keepends=False)
# Check whitespace at end of line
for i, line in enumerate(lines):
if line.rstrip() != line:
errors.append("Lines must not contain spaces at the end of the line. Please "
"remove spaces at the end of {}:{}".format(f, i+1))
for i, line in enumerate(lines):
if i == 0:
continue
@ -103,14 +97,6 @@ for f in sorted(Path('.').glob('**/*.rst')):
"{}:{}".format(directive_name, num_indent, f, j+1))
break
# Check line length
for i, line in enumerate(lines):
max_line_length = 160
if len(line) > max_line_length:
errors.append("Lines must not be longer than {} characters. Line {}:{} is {} "
"characters long. Please insert newlines."
"".format(max_line_length, f, i+1, len(line)))
for i, line in enumerate(lines):
if esphome_io_regex.search(line):
if 'privacy.rst' in str(f) or 'web_server.rst' in str(f):