#!/usr/bin/env python import os import sys src_dir = os.path.join(os.path.dirname(__file__), '..') sys.path.append(os.path.join(src_dir, 'third_party/python_gflags')) sys.path.append(os.path.join(src_dir, 'third_party/closure_linter')) from closure_linter import gjslint if __name__ == '__main__': os.chdir(src_dir) if sys.argv[1:] == ['--help']: sys.exit(gjslint.main()) if len(sys.argv) > 1: sys.stderr.write('No arguments allowed') sys.exit(1) sys.argv.append('--strict') sys.argv.append('--unix_mode') sys.argv.append('--check_html') sys.argv.extend(['--exclude_files', 'src/about_tracing.js']) sys.argv.extend(['-r', 'src/']) gjslint.main()