From 11f387743fda70c19e8fbe77508d7ad7c384c9f3 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 27 Sep 2013 10:49:55 +0800 Subject: [PATCH] Add wrapper script for coffeelint. --- script/cibuild | 1 + script/coffeelint.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100755 script/coffeelint.py diff --git a/script/cibuild b/script/cibuild index eb3aca82..7a6bbf97 100755 --- a/script/cibuild +++ b/script/cibuild @@ -12,6 +12,7 @@ def main(): run_script('bootstrap.py') run_script('cpplint.py') run_script('pylint.py') + run_script('coffeelint.py') run_script('build.py') run_script('test.py', ['--ci']) run_script('create-dist.py') diff --git a/script/coffeelint.py b/script/coffeelint.py new file mode 100755 index 00000000..2e912d6a --- /dev/null +++ b/script/coffeelint.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python + +import glob +import os +import subprocess +import sys + + +SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__)) + + +def main(): + os.chdir(SOURCE_ROOT) + + coffeelint = os.path.join(SOURCE_ROOT, 'node_modules', 'coffeelint', 'bin', + 'coffeelint') + files = glob.glob('browser/api/lib/*.coffee') + \ + glob.glob('renderer/api/lib/*.coffee') + \ + glob.glob('common/api/lib/*.coffee') + \ + glob.glob('browser/atom/*.coffee') + + if sys.platform in ['win32', 'cygwin']: + subprocess.check_call(['node', coffeelint] + files, + executable='C:/Program Files/nodejs/node.exe') + else: + subprocess.check_call(['node', coffeelint] + files) + + +if __name__ == '__main__': + sys.exit(main()) -- 2.43.0