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

Side by Side Diff: example/format.dart

Issue 945583004: If no paths are provided, read source from stdin. Fix #165. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 years, 10 months 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 unified diff | Download patch
« no previous file with comments | « bin/format.dart ('k') | lib/src/io.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « bin/format.dart ('k') | lib/src/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698