Move cpplint config to CPPLINT.cfg file
This commit is contained in:
parent
96de22ba5f
commit
97ced7fb07
2 changed files with 3 additions and 11 deletions
2
brightray/CPPLINT.cfg
Normal file
2
brightray/CPPLINT.cfg
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
filter=-build/header_guard,-build/include_what_you_use,-legal/copyright,-runtime/references
|
||||||
|
linelength=100
|
|
@ -8,21 +8,11 @@ import sys
|
||||||
|
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
CPPLINT = os.path.join(SOURCE_ROOT, 'vendor', 'libchromiumcontent', 'vendor', 'depot_tools', 'cpplint.py')
|
CPPLINT = os.path.join(SOURCE_ROOT, 'vendor', 'libchromiumcontent', 'vendor', 'depot_tools', 'cpplint.py')
|
||||||
LINE_LENGTH = 100
|
|
||||||
|
|
||||||
IGNORED_FILES = [
|
IGNORED_FILES = [
|
||||||
os.path.join('browser', 'mac', 'bry_inspectable_web_contents_view.h'),
|
os.path.join('browser', 'mac', 'bry_inspectable_web_contents_view.h'),
|
||||||
]
|
]
|
||||||
|
|
||||||
FILTERS = [
|
|
||||||
'-build/header_guard',
|
|
||||||
'-build/include_what_you_use',
|
|
||||||
'-legal/copyright',
|
|
||||||
# cpplint doesn't like the BOOL& parameters that ui::WindowImpl uses.
|
|
||||||
'-runtime/references',
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
os.chdir(SOURCE_ROOT)
|
os.chdir(SOURCE_ROOT)
|
||||||
files = list_files(['browser', 'common'],
|
files = list_files(['browser', 'common'],
|
||||||
|
@ -41,7 +31,7 @@ def list_files(directories, filters):
|
||||||
|
|
||||||
|
|
||||||
def cpplint(files):
|
def cpplint(files):
|
||||||
return subprocess.call([sys.executable, CPPLINT, '--linelength=%d' % LINE_LENGTH, '--filter=' + ','.join(FILTERS)] + list(files))
|
return subprocess.call([sys.executable, CPPLINT] + list(files))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue