2013-09-27 06:49:55 +04:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import glob
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2014-08-08 12:41:10 +04:00
|
|
|
from lib.util import execute
|
2013-09-27 06:49:55 +04:00
|
|
|
|
2014-08-08 12:41:10 +04:00
|
|
|
|
|
|
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
2013-09-27 06:49:55 +04:00
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
os.chdir(SOURCE_ROOT)
|
|
|
|
|
2014-08-08 12:41:10 +04:00
|
|
|
coffeelint = os.path.join(SOURCE_ROOT, 'node_modules', '.bin', 'coffeelint')
|
|
|
|
if sys.platform in ['win32', 'cygwin']:
|
|
|
|
coffeelint += '.cmd'
|
2013-09-27 07:01:40 +04:00
|
|
|
settings = ['--quiet', '-f', os.path.join('script', 'coffeelint.json')]
|
2014-03-16 05:43:19 +04:00
|
|
|
files = glob.glob('atom/browser/api/lib/*.coffee') + \
|
|
|
|
glob.glob('atom/renderer/api/lib/*.coffee') + \
|
|
|
|
glob.glob('atom/common/api/lib/*.coffee') + \
|
|
|
|
glob.glob('atom/browser/atom/*.coffee')
|
2013-09-27 06:49:55 +04:00
|
|
|
|
2014-08-08 12:41:10 +04:00
|
|
|
execute([coffeelint] + settings + files)
|
2013-09-27 06:49:55 +04:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
sys.exit(main())
|