Merge pull request #1853 from twpayne/leading-whitespace
Remove leading whitespace
This commit is contained in:
@@ -582,6 +582,7 @@ def build_check_requires_timestamp(t):
|
|||||||
precious=True)
|
precious=True)
|
||||||
def build_check_whitespace_timestamp(t):
|
def build_check_whitespace_timestamp(t):
|
||||||
CR_RE = re.compile(r'\r')
|
CR_RE = re.compile(r'\r')
|
||||||
|
LEADING_WHITESPACE_RE = re.compile(r'\s+')
|
||||||
TRAILING_WHITESPACE_RE = re.compile(r'\s+\n\Z')
|
TRAILING_WHITESPACE_RE = re.compile(r'\s+\n\Z')
|
||||||
NO_NEWLINE_RE = re.compile(r'[^\n]\Z')
|
NO_NEWLINE_RE = re.compile(r'[^\n]\Z')
|
||||||
ALL_WHITESPACE_RE = re.compile(r'\s+\Z')
|
ALL_WHITESPACE_RE = re.compile(r'\s+\Z')
|
||||||
@@ -589,6 +590,9 @@ def build_check_whitespace_timestamp(t):
|
|||||||
for filename in sorted(t.newer(t.dependencies)):
|
for filename in sorted(t.newer(t.dependencies)):
|
||||||
whitespace = False
|
whitespace = False
|
||||||
for lineno, line in enumerate(open(filename, 'rU')):
|
for lineno, line in enumerate(open(filename, 'rU')):
|
||||||
|
if lineno == 0 and LEADING_WHITESPACE_RE.match(line):
|
||||||
|
t.info('%s:%d: leading whitespace', filename, lineno + 1)
|
||||||
|
errors += 1
|
||||||
if CR_RE.search(line):
|
if CR_RE.search(line):
|
||||||
t.info('%s:%d: carriage return character in line', filename, lineno + 1)
|
t.info('%s:%d: carriage return character in line', filename, lineno + 1)
|
||||||
errors += 1
|
errors += 1
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of Google Maps' MVCArray.
|
* An implementation of Google Maps' MVCArray.
|
||||||
* @see https://developers.google.com/maps/documentation/javascript/reference
|
* @see https://developers.google.com/maps/documentation/javascript/reference
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
goog.provide('ol.interaction.Touch');
|
goog.provide('ol.interaction.Touch');
|
||||||
|
|
||||||
goog.require('goog.asserts');
|
goog.require('goog.asserts');
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
goog.provide('ol.Kinetic');
|
goog.provide('ol.Kinetic');
|
||||||
|
|
||||||
goog.require('ol.Coordinate');
|
goog.require('ol.Coordinate');
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of Google Maps' MVCObject.
|
* An implementation of Google Maps' MVCObject.
|
||||||
* @see https://developers.google.com/maps/articles/mvcfun
|
* @see https://developers.google.com/maps/articles/mvcfun
|
||||||
|
|||||||
Reference in New Issue
Block a user