Skip to content

Commit d5dc076

Browse files
authored
Enable library lints and remove explicit library names (#3609)
1 parent 211d132 commit d5dc076

25 files changed

+12
-43
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 8.0.4-wip
2+
3+
* Remove explicit library names. (#3609)
4+
15
## 8.0.3
26

37
* Remove `--format` flag that allows for generating Markdown-formatted docs.

analysis_options.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ linter:
2323
- avoid_dynamic_calls
2424
- avoid_slow_async_io
2525
- avoid_unused_constructor_parameters
26+
- dangling_library_doc_comments
2627
- directives_ordering
2728
- invalid_case_patterns
29+
- library_annotations
2830
- no_adjacent_strings_in_list
2931
- no_literal_bool_comparisons
3032
- omit_local_variable_types
@@ -38,6 +40,7 @@ linter:
3840
- type_annotate_public_apis
3941
- unawaited_futures
4042
- unnecessary_lambdas
43+
- unnecessary_library_directive
4144
- unnecessary_parenthesis
4245
- unnecessary_statements
4346
- unnecessary_breaks

bin/dartdoc.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.bin;
6-
75
import 'dart:async';
86

97
import 'package:dartdoc/src/dartdoc.dart';

dartdoc_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
dartdoc:
22
linkToSource:
33
root: '.'
4-
uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v8.0.3/%f%#L%l%'
4+
uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v8.0.4-wip/%f%#L%l%'

lib/src/generator/html_generator.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.html_generator;
6-
75
import 'package:dartdoc/src/dartdoc_options.dart';
86
import 'package:dartdoc/src/generator/generator.dart';
97
import 'package:dartdoc/src/generator/generator_backend.dart';

lib/src/model_utils.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.model_utils;
6-
75
import 'dart:io' show Platform;
86

97
import 'package:analyzer/dart/element/element.dart';

lib/src/package_meta.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.package_meta;
6-
75
import 'dart:io' show Platform;
86

97
import 'package:analyzer/dart/element/element.dart';
@@ -22,7 +20,7 @@ class PackageMetaFailure extends DartdocFailure {
2220
PackageMetaFailure(super.message);
2321
}
2422

25-
/// Various relative paths that indicate that a root direoctory is an SDK (Dart
23+
/// Various relative paths that indicate that a root directory is an SDK (Dart
2624
/// or Flutter).
2725
///
2826
/// For a given directory to be detected as an SDK, at least one of the given

lib/src/tool_runner.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.tool_runner;
6-
75
import 'dart:io' show Process, ProcessException;
86

97
import 'package:analyzer/file_system/file_system.dart';

lib/src/utils.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.utils;
6-
75
final RegExp leadingWhiteSpace = RegExp(r'^([ \t]*)[^ ]');
86

97
Iterable<String> stripCommonWhitespace(String str) sync* {

lib/src/version.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
const packageVersion = '8.0.3';
1+
const packageVersion = '8.0.4-wip';

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: dartdoc
2-
version: 8.0.3
2+
version: 8.0.4-wip
33
description: A non-interactive HTML documentation generator for Dart source code.
44
repository: https://github.com/dart-lang/dartdoc
55

test/comment_referable/comment_referable_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.comment_reference_test;
6-
75
import 'package:collection/collection.dart';
86
import 'package:dartdoc/src/model/comment_referable.dart';
97
import 'package:dartdoc/src/model/model_object_builder.dart';

test/dartdoc_options_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.options_test;
6-
75
import 'package:analyzer/file_system/file_system.dart';
86
import 'package:dartdoc/src/dartdoc_options.dart';
97
import 'package:dartdoc/src/io_utils.dart';

test/end2end/dartdoc_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.dartdoc_test;
6-
75
import 'dart:async';
86

97
import 'package:analyzer/file_system/file_system.dart';

test/end2end/model_special_cases_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/// that require different PackageGraph configurations. Since those
88
/// take a long time to initialize, isolate them here to keep model_test
99
/// fast.
10-
library dartdoc.model_special_cases_test;
10+
library;
1111

1212
import 'package:async/async.dart';
1313
import 'package:dartdoc/src/matching_link_result.dart';

test/end2end/model_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
// ignore_for_file: non_constant_identifier_names
66

7-
library dartdoc.model_test;
8-
97
import 'package:analyzer/dart/element/element.dart';
108
import 'package:analyzer/dart/element/type.dart';
119
import 'package:analyzer/source/line_info.dart';

test/io_utils_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.io_utils_test;
6-
75
import 'package:dartdoc/src/io_utils.dart';
86
import 'package:test/test.dart';
97

test/markdown_processor_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.markdown_processor_test;
6-
75
import 'package:dartdoc/src/markdown_processor.dart';
86
import 'package:test/test.dart';
97

test/model_utils_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.model_utils_test;
6-
75
import 'package:dartdoc/src/model_utils.dart';
86
import 'package:test/test.dart';
97

test/mustachio/renderers_output_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.dartdoc_test;
6-
75
import 'dart:async';
86
import 'dart:io';
97

test/package_meta_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.package_utils_test;
6-
75
import 'package:dartdoc/src/io_utils.dart';
86
import 'package:dartdoc/src/package_meta.dart';
97
import 'package:test/test.dart';

test/resource_loader_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.resource_loader_test;
6-
75
import 'package:analyzer/file_system/physical_file_system.dart';
86
import 'package:dartdoc/src/generator/resource_loader.dart';
97
import 'package:test/test.dart';

test/source_linker_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.source_linker_test;
6-
75
import 'package:dartdoc/src/dartdoc_options.dart';
86
import 'package:dartdoc/src/source_linker.dart';
97
import 'package:test/test.dart';

test/tool_runner_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.model_test;
6-
75
import 'dart:io';
86

97
import 'package:dartdoc/src/dartdoc_options.dart';

test/utils_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library dartdoc.utils_test;
6-
75
import 'package:dartdoc/src/utils.dart';
86
import 'package:test/test.dart';
97

0 commit comments

Comments
 (0)