| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:convert'; | 5 import 'dart:convert'; |
| 6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 | 7 |
| 8 import 'package:args/args.dart'; | 8 import 'package:args/args.dart'; |
| 9 import 'package:dart_style/src/dart_formatter.dart'; | 9 import 'package:dart_style/src/dart_formatter.dart'; |
| 10 import 'package:dart_style/src/formatter_exception.dart'; | 10 import 'package:dart_style/src/formatter_exception.dart'; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 var output = stdout; | 153 var output = stdout; |
| 154 | 154 |
| 155 var message = "Reformats whitespace in Dart source files."; | 155 var message = "Reformats whitespace in Dart source files."; |
| 156 if (error != null) { | 156 if (error != null) { |
| 157 message = error; | 157 message = error; |
| 158 output = stdout; | 158 output = stdout; |
| 159 } | 159 } |
| 160 | 160 |
| 161 output.write("""$message | 161 output.write("""$message |
| 162 | 162 |
| 163 Usage: dartformat [-n|-w] [files or directories...] | 163 Usage: dartfmt [-n|-w] [files or directories...] |
| 164 | 164 |
| 165 ${parser.usage} | 165 ${parser.usage} |
| 166 """); | 166 """); |
| 167 } | 167 } |
| OLD | NEW |