Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py

Issue 1847613002: Remove unused imports in webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 # 2 #
3 # Copyright (C) 2009, 2010, 2012 Google Inc. All rights reserved. 3 # Copyright (C) 2009, 2010, 2012 Google Inc. All rights reserved.
4 # Copyright (C) 2009 Torch Mobile Inc. 4 # Copyright (C) 2009 Torch Mobile Inc.
5 # Copyright (C) 2009 Apple Inc. All rights reserved. 5 # Copyright (C) 2009 Apple Inc. All rights reserved.
6 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) 6 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
7 # 7 #
8 # Redistribution and use in source and binary forms, with or without 8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions are 9 # modification, are permitted provided that the following conditions are
10 # met: 10 # met:
(...skipping 24 matching lines...) Expand all
35 # http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py 35 # http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py
36 36
37 """Support for check-webkit-style.""" 37 """Support for check-webkit-style."""
38 38
39 import math # for log 39 import math # for log
40 import os 40 import os
41 import os.path 41 import os.path
42 import re 42 import re
43 import sre_compile 43 import sre_compile
44 import string 44 import string
45 import sys
46 import unicodedata 45 import unicodedata
47 46
48 from webkitpy.common.memoized import memoized 47 from webkitpy.common.memoized import memoized
49 from webkitpy.common.system.filesystem import FileSystem 48 from webkitpy.common.system.filesystem import FileSystem
50 49
51 # Headers that we consider STL headers. 50 # Headers that we consider STL headers.
52 _STL_HEADERS = frozenset([ 51 _STL_HEADERS = frozenset([
53 'algobase.h', 'algorithm', 'alloc.h', 'bitset', 'deque', 'exception', 52 'algobase.h', 'algorithm', 'alloc.h', 'bitset', 'deque', 'exception',
54 'function.h', 'functional', 'hash_map', 'hash_map.h', 'hash_set', 53 'function.h', 'functional', 'hash_map', 'hash_map.h', 'hash_set',
55 'hash_set.h', 'iterator', 'list', 'list.h', 'map', 'memory', 'pair.h', 54 'hash_set.h', 'iterator', 'list', 'list.h', 'map', 'memory', 'pair.h',
(...skipping 4113 matching lines...) Expand 10 before | Expand all | Expand 10 after
4169 4168
4170 def check(self, lines): 4169 def check(self, lines):
4171 _process_lines(self.file_path, self.file_extension, lines, 4170 _process_lines(self.file_path, self.file_extension, lines,
4172 self.handle_style_error, self.min_confidence) 4171 self.handle_style_error, self.min_confidence)
4173 4172
4174 4173
4175 # FIXME: Remove this function (requires refactoring unit tests). 4174 # FIXME: Remove this function (requires refactoring unit tests).
4176 def process_file_data(filename, file_extension, lines, error, min_confidence, fs =None): 4175 def process_file_data(filename, file_extension, lines, error, min_confidence, fs =None):
4177 checker = CppChecker(filename, file_extension, error, min_confidence, fs) 4176 checker = CppChecker(filename, file_extension, error, min_confidence, fs)
4178 checker.check(lines) 4177 checker.check(lines)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698