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:async'; | 5 import 'dart:async'; |
6 import 'dart:io'; | 6 import 'dart:io'; |
7 | 7 |
8 import 'package:analyzer/analyzer.dart'; | 8 import 'package:analyzer/analyzer.dart'; |
9 import 'package:analyzer/dart/ast/token.dart'; | 9 import 'package:analyzer/dart/ast/token.dart'; |
10 import 'package:analyzer/file_system/file_system.dart' as file_system; | 10 import 'package:analyzer/file_system/file_system.dart' as file_system; |
11 import 'package:analyzer/src/generated/engine.dart' | 11 import 'package:analyzer/src/generated/engine.dart' |
12 show AnalysisErrorInfo, AnalysisErrorInfoImpl, Logger; | 12 show AnalysisErrorInfo, AnalysisErrorInfoImpl, Logger; |
13 import 'package:analyzer/src/generated/java_engine.dart' show CaughtException; | 13 import 'package:analyzer/src/generated/java_engine.dart' show CaughtException; |
14 import 'package:analyzer/src/generated/source.dart' show LineInfo; | 14 import 'package:analyzer/src/generated/source.dart' show LineInfo; |
15 import 'package:analyzer/src/generated/source_io.dart'; | 15 import 'package:analyzer/src/generated/source_io.dart'; |
16 import 'package:analyzer/src/lint/analysis.dart'; | 16 import 'package:analyzer/src/lint/analysis.dart'; |
17 import 'package:analyzer/src/lint/config.dart'; | 17 import 'package:analyzer/src/lint/config.dart'; |
18 import 'package:analyzer/src/lint/io.dart'; | 18 import 'package:analyzer/src/lint/io.dart'; |
19 import 'package:analyzer/src/lint/project.dart'; | 19 import 'package:analyzer/src/lint/project.dart'; |
20 import 'package:analyzer/src/lint/pub.dart'; | 20 import 'package:analyzer/src/lint/pub.dart'; |
21 import 'package:analyzer/src/lint/registry.dart'; | 21 import 'package:analyzer/src/lint/registry.dart'; |
22 import 'package:analyzer/src/services/lint.dart' show Linter; | 22 import 'package:analyzer/src/services/lint.dart' show Linter; |
23 import 'package:glob/glob.dart'; | 23 import 'package:glob/glob.dart'; |
24 import 'package:path/path.dart' as p; | 24 import 'package:path/path.dart' as p; |
25 | 25 |
26 typedef Printer(String msg); | 26 typedef Printer(String msg); |
27 | 27 |
28 /// Describes a String in valid camel case format. | 28 /// Describes a String in valid camel case format. |
| 29 @deprecated // Never intended for public use. |
29 class CamelCaseString { | 30 class CamelCaseString { |
30 static final _camelCaseMatcher = new RegExp(r'[A-Z][a-z]*'); | 31 static final _camelCaseMatcher = new RegExp(r'[A-Z][a-z]*'); |
31 static final _camelCaseTester = new RegExp(r'^([_$]*)([A-Z?$]+[a-z0-9]*)+$'); | 32 static final _camelCaseTester = new RegExp(r'^([_$]*)([A-Z?$]+[a-z0-9]*)+$'); |
32 | 33 |
33 final String value; | 34 final String value; |
34 CamelCaseString(this.value) { | 35 CamelCaseString(this.value) { |
35 if (!isCamelCase(value)) { | 36 if (!isCamelCase(value)) { |
36 throw new ArgumentError('$value is not CamelCase'); | 37 throw new ArgumentError('$value is not CamelCase'); |
37 } | 38 } |
38 } | 39 } |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 } | 424 } |
424 | 425 |
425 class _LintCode extends LintCode { | 426 class _LintCode extends LintCode { |
426 static final registry = <String, LintCode>{}; | 427 static final registry = <String, LintCode>{}; |
427 | 428 |
428 factory _LintCode(String name, String message) => registry.putIfAbsent( | 429 factory _LintCode(String name, String message) => registry.putIfAbsent( |
429 name + message, () => new _LintCode._(name, message)); | 430 name + message, () => new _LintCode._(name, message)); |
430 | 431 |
431 _LintCode._(String name, String message) : super(name, message); | 432 _LintCode._(String name, String message) : super(name, message); |
432 } | 433 } |
OLD | NEW |