@@ -22,7 +22,6 @@ import 'package:analyzer/src/generated/sdk.dart';
22
22
import 'package:analyzer/src/generated/sdk_io.dart' ;
23
23
import 'package:analyzer/src/generated/source.dart' ;
24
24
import 'package:analyzer/src/generated/source_io.dart' ;
25
-
26
25
import 'package:path/path.dart' as p;
27
26
28
27
import 'src/generator.dart' ;
@@ -39,7 +38,7 @@ export 'src/package_meta.dart';
39
38
40
39
const String name = 'dartdoc' ;
41
40
// Update when pubspec version changes.
42
- const String version = '0.8.4-dev ' ;
41
+ const String version = '0.8.5 ' ;
43
42
44
43
final String defaultOutDir = p.join ('doc' , 'api' );
45
44
@@ -218,15 +217,6 @@ class DartDoc {
218
217
}
219
218
}
220
219
221
- /// The results of a [DartDoc.generateDocs] call.
222
- class DartDocResults {
223
- final PackageMeta packageMeta;
224
- final Package package;
225
- final Directory outDir;
226
-
227
- DartDocResults (this .packageMeta, this .package, this .outDir);
228
- }
229
-
230
220
/// This class is returned if dartdoc fails in an expected way (for instance, if
231
221
/// there is an analysis error in the library).
232
222
class DartDocFailure {
@@ -237,19 +227,25 @@ class DartDocFailure {
237
227
String toString () => message;
238
228
}
239
229
230
+ /// The results of a [DartDoc.generateDocs] call.
231
+ class DartDocResults {
232
+ final PackageMeta packageMeta;
233
+ final Package package;
234
+ final Directory outDir;
235
+
236
+ DartDocResults (this .packageMeta, this .package, this .outDir);
237
+ }
238
+
240
239
class _Error implements Comparable {
241
240
final AnalysisError error;
242
241
final LineInfo lineInfo;
243
242
final String projectPath;
244
243
245
244
_Error (this .error, this .lineInfo, this .projectPath);
246
245
247
- int get severity => error.errorCode.errorSeverity.ordinal;
248
- bool get isError => error.errorCode.errorSeverity == ErrorSeverity .ERROR ;
249
- String get severityName => error.errorCode.errorSeverity.displayName;
250
246
String get description => '${error .message } at ${location }, line ${line }.' ;
247
+ bool get isError => error.errorCode.errorSeverity == ErrorSeverity .ERROR ;
251
248
int get line => lineInfo.getLocation (error.offset).lineNumber;
252
-
253
249
String get location {
254
250
String path = error.source.fullName;
255
251
if (path.startsWith (projectPath)) {
@@ -258,6 +254,10 @@ class _Error implements Comparable {
258
254
return path;
259
255
}
260
256
257
+ int get severity => error.errorCode.errorSeverity.ordinal;
258
+
259
+ String get severityName => error.errorCode.errorSeverity.displayName;
260
+
261
261
int compareTo (_Error other) {
262
262
if (severity == other.severity) {
263
263
int cmp = error.source.fullName.compareTo (other.error.source.fullName);
0 commit comments