Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: common/eslint/bin/run_eslint

Issue 2535983002: [eslint] Don't treat eslint warnings as PRESUBMIT errors (Closed)
Patch Set: fix smoke test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « catapult_build/js_checks.py ('k') | common/eslint/eslint/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/eslint/bin/run_eslint
diff --git a/common/eslint/bin/run_eslint b/common/eslint/bin/run_eslint
index 0e199908252b2fc5fba6da98b64a1a372adeb013..bd2797be0424a2bcc8f4bb48a6317a1ef7e5cd32 100755
--- a/common/eslint/bin/run_eslint
+++ b/common/eslint/bin/run_eslint
@@ -34,22 +34,22 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='Wrapper script to run eslint on Catapult code')
- parser.add_argument('--files', '-f', default=None, nargs='+', metavar='FILE',
- help='List of files to lint')
+ parser.add_argument('--paths', '-p', default=None, nargs='+', metavar='PATH',
+ help='List of paths to lint')
parser.add_argument('--all', default=None, action='store_true',
help='Runs eslint on all applicable Catapult code')
parser.add_argument('--extra-args', default=None, type=str,
help='A string of extra arguments to pass to eslint')
args = parser.parse_args(sys.argv[1:])
- if ((args.files is not None and args.all is not None) or
- (args.files is None and args.all is None)):
- print 'Either --files or --all must be used, but not both.\n'
+ if ((args.paths is not None and args.all is not None) or
+ (args.paths is None and args.all is None)):
+ print 'Either --paths or --all must be used, but not both.\n'
parser.print_help()
sys.exit(1)
if args.all:
- print eslint.RunEslintOnDirs(
- DIRECTORIES_TO_LINT, extra_args=args.extra_args)
+ print eslint.RunEslint(
+ DIRECTORIES_TO_LINT, extra_args=args.extra_args)[0]
else:
- print eslint.RunEslintOnFiles(args.files, extra_args=args.extra_args)
+ print eslint.RunEslint(args.paths, extra_args=args.extra_args)[0]
« no previous file with comments | « catapult_build/js_checks.py ('k') | common/eslint/eslint/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698