diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 66ade81635eb..ec4e5d2f5144 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -133,17 +133,13 @@ def HasFormatErrors(filename=None, contents=None): dart, 'format', '--set-exit-if-changed', + '--output=none', + '--summary=none', + filename, ] - if not contents: - args += [ - '--output=none', - '--summary=none', - filename, - ] process = subprocess.Popen( args, stdout=subprocess.PIPE, stdin=subprocess.PIPE) - process.communicate(input=contents) # Check for exit code 1 explicitly to distinguish it from a syntax error # in the file (exit code 65). The repo contains many Dart files that are