diff --git a/script/cibuild b/script/cibuild index eb3aca82f752..7a6bbf97576a 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 000000000000..2e912d6a0380 --- /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())