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

Unified Diff: lib/src/chunk.dart

Issue 834353002: camelCase constants. Down with ALL_CAPS! (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: lib/src/chunk.dart
diff --git a/lib/src/chunk.dart b/lib/src/chunk.dart
index 227246aa4f4790dc2b935d17ad45f200b25a322f..ffa96dbb486d89469ecd699804df6bf11472c0f9 100644
--- a/lib/src/chunk.dart
+++ b/lib/src/chunk.dart
@@ -168,7 +168,7 @@ class Chunk {
} else {
var param = "p$_param";
- if (_param.cost != Cost.NORMAL) param += " \$${_param.cost}";
+ if (_param.cost != Cost.normal) param += " \$${_param.cost}";
if (_param.implies.isNotEmpty) {
var impliedIds = _param.implies.map(
@@ -192,16 +192,16 @@ class Cost {
/// otherwise, the formatter won't try to keep things on one line at all.
/// Almost all splits and spans use this. Greater costs tend to come from a
/// greater number of nested spans.
- static const NORMAL = 1;
+ static const normal = 1;
/// The cost of splitting after a "=" both for assignment and initialization.
- static const ASSIGNMENT = 2;
+ static const assignment = 2;
/// The cost of a single character that goes past the page limit.
///
/// This cost is high to ensure any solution that fits in the page is
/// preferred over one that does not.
- static const OVERFLOW_CHAR = 1000;
+ static const overflowChar = 1000;
}
/// Controls whether or not one or more soft split [Chunk]s are split.
@@ -231,7 +231,7 @@ class SplitParam {
final implies = <SplitParam>[];
/// Creates a new [SplitParam].
- SplitParam([this.cost = Cost.NORMAL]);
+ SplitParam([this.cost = Cost.normal]);
String toString() => "$id";
« example/format.dart ('K') | « example/format.dart ('k') | lib/src/debug.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698