summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/webkitpy/style/checkers/text.py
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/style/checkers/text.py')
-rw-r--r--WebKitTools/Scripts/webkitpy/style/checkers/text.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/WebKitTools/Scripts/webkitpy/style/checkers/text.py b/WebKitTools/Scripts/webkitpy/style/checkers/text.py
index 0d03938..1147658 100644
--- a/WebKitTools/Scripts/webkitpy/style/checkers/text.py
+++ b/WebKitTools/Scripts/webkitpy/style/checkers/text.py
@@ -29,6 +29,7 @@
"""Checks WebKit style for text files."""
+from common import TabChecker
class TextChecker(object):
@@ -37,16 +38,10 @@ class TextChecker(object):
def __init__(self, file_path, handle_style_error):
self.file_path = file_path
self.handle_style_error = handle_style_error
+ self._tab_checker = TabChecker(file_path, handle_style_error)
def check(self, lines):
- lines = (["// adjust line numbers to make the first line 1."] + lines)
-
- # FIXME: share with cpp_style.
- for line_number, line in enumerate(lines):
- if "\t" in line:
- self.handle_style_error(line_number,
- "whitespace/tab", 5,
- "Line contains tab character.")
+ self._tab_checker.check(lines)
# FIXME: Remove this function (requires refactoring unit tests).