| OLD | NEW |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 1 import 'package:dart_style/dart_style.dart'; | 5 import 'package:dart_style/dart_style.dart'; |
| 2 | 6 |
| 3 import 'package:dart_style/src/debug.dart'; | 7 import 'package:dart_style/src/debug.dart'; |
| 4 | 8 |
| 5 void main(List<String> args) { | 9 void main(List<String> args) { |
| 6 // Enable debugging so you can see some of the formatter's internal state. | 10 // Enable debugging so you can see some of the formatter's internal state. |
| 7 // Normal users do not do this. | 11 // Normal users do not do this. |
| 8 debugFormatter = true; | 12 debugFormatter = true; |
| 9 useAnsiColors = true; | 13 useAnsiColors = true; |
| 10 | 14 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 print(result); | 46 print(result); |
| 43 } on FormatterException catch (error) { | 47 } on FormatterException catch (error) { |
| 44 print(error.message()); | 48 print(error.message()); |
| 45 } | 49 } |
| 46 } | 50 } |
| 47 | 51 |
| 48 void drawRuler(String label, int width) { | 52 void drawRuler(String label, int width) { |
| 49 var padding = " " * (width - label.length - 1); | 53 var padding = " " * (width - label.length - 1); |
| 50 print("$label:$padding|"); | 54 print("$label:$padding|"); |
| 51 } | 55 } |
| OLD | NEW |