1#!/usr/bin/env python 2import os 3import sys 4 5src_dir = os.path.join(os.path.dirname(__file__), '..') 6 7sys.path.append(os.path.join(src_dir, 'third_party/python_gflags')) 8sys.path.append(os.path.join(src_dir, 'third_party/closure_linter')) 9 10 11from closure_linter import gjslint 12if __name__ == '__main__': 13 os.chdir(src_dir) 14 if sys.argv[1:] == ['--help']: 15 sys.exit(gjslint.main()) 16 17 if len(sys.argv) > 1: 18 sys.stderr.write('No arguments allowed') 19 sys.exit(1) 20 sys.argv.append('--strict') 21 sys.argv.append('--unix_mode') 22 sys.argv.append('--check_html') 23 sys.argv.extend(['--exclude_files', 'src/about_tracing.js']) 24 sys.argv.extend(['-r', 'src/']) 25 gjslint.main() 26