Skip to content

Commit

Permalink
Enable library lints and remove explicit library names (#3609)
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough authored Dec 27, 2023
1 parent 211d132 commit d5dc076
Show file tree
Hide file tree
Showing 25 changed files with 12 additions and 43 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 8.0.4-wip

* Remove explicit library names. (#3609)

## 8.0.3

* Remove `--format` flag that allows for generating Markdown-formatted docs.
Expand Down
3 changes: 3 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ linter:
- avoid_dynamic_calls
- avoid_slow_async_io
- avoid_unused_constructor_parameters
- dangling_library_doc_comments
- directives_ordering
- invalid_case_patterns
- library_annotations
- no_adjacent_strings_in_list
- no_literal_bool_comparisons
- omit_local_variable_types
Expand All @@ -38,6 +40,7 @@ linter:
- type_annotate_public_apis
- unawaited_futures
- unnecessary_lambdas
- unnecessary_library_directive
- unnecessary_parenthesis
- unnecessary_statements
- unnecessary_breaks
2 changes: 0 additions & 2 deletions bin/dartdoc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.bin;

import 'dart:async';

import 'package:dartdoc/src/dartdoc.dart';
Expand Down
2 changes: 1 addition & 1 deletion dartdoc_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dartdoc:
linkToSource:
root: '.'
uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v8.0.3/%f%#L%l%'
uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v8.0.4-wip/%f%#L%l%'
2 changes: 0 additions & 2 deletions lib/src/generator/html_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.html_generator;

import 'package:dartdoc/src/dartdoc_options.dart';
import 'package:dartdoc/src/generator/generator.dart';
import 'package:dartdoc/src/generator/generator_backend.dart';
Expand Down
2 changes: 0 additions & 2 deletions lib/src/model_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.model_utils;

import 'dart:io' show Platform;

import 'package:analyzer/dart/element/element.dart';
Expand Down
4 changes: 1 addition & 3 deletions lib/src/package_meta.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.package_meta;

import 'dart:io' show Platform;

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

/// Various relative paths that indicate that a root direoctory is an SDK (Dart
/// Various relative paths that indicate that a root directory is an SDK (Dart
/// or Flutter).
///
/// For a given directory to be detected as an SDK, at least one of the given
Expand Down
2 changes: 0 additions & 2 deletions lib/src/tool_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.tool_runner;

import 'dart:io' show Process, ProcessException;

import 'package:analyzer/file_system/file_system.dart';
Expand Down
2 changes: 0 additions & 2 deletions lib/src/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.utils;

final RegExp leadingWhiteSpace = RegExp(r'^([ \t]*)[^ ]');

Iterable<String> stripCommonWhitespace(String str) sync* {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const packageVersion = '8.0.3';
const packageVersion = '8.0.4-wip';
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: dartdoc
version: 8.0.3
version: 8.0.4-wip
description: A non-interactive HTML documentation generator for Dart source code.
repository: https://github.com/dart-lang/dartdoc

Expand Down
2 changes: 0 additions & 2 deletions test/comment_referable/comment_referable_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.comment_reference_test;

import 'package:collection/collection.dart';
import 'package:dartdoc/src/model/comment_referable.dart';
import 'package:dartdoc/src/model/model_object_builder.dart';
Expand Down
2 changes: 0 additions & 2 deletions test/dartdoc_options_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.options_test;

import 'package:analyzer/file_system/file_system.dart';
import 'package:dartdoc/src/dartdoc_options.dart';
import 'package:dartdoc/src/io_utils.dart';
Expand Down
2 changes: 0 additions & 2 deletions test/end2end/dartdoc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.dartdoc_test;

import 'dart:async';

import 'package:analyzer/file_system/file_system.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/end2end/model_special_cases_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/// that require different PackageGraph configurations. Since those
/// take a long time to initialize, isolate them here to keep model_test
/// fast.
library dartdoc.model_special_cases_test;
library;

import 'package:async/async.dart';
import 'package:dartdoc/src/matching_link_result.dart';
Expand Down
2 changes: 0 additions & 2 deletions test/end2end/model_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

// ignore_for_file: non_constant_identifier_names

library dartdoc.model_test;

import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/source/line_info.dart';
Expand Down
2 changes: 0 additions & 2 deletions test/io_utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.io_utils_test;

import 'package:dartdoc/src/io_utils.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 0 additions & 2 deletions test/markdown_processor_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.markdown_processor_test;

import 'package:dartdoc/src/markdown_processor.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 0 additions & 2 deletions test/model_utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.model_utils_test;

import 'package:dartdoc/src/model_utils.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 0 additions & 2 deletions test/mustachio/renderers_output_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.dartdoc_test;

import 'dart:async';
import 'dart:io';

Expand Down
2 changes: 0 additions & 2 deletions test/package_meta_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.package_utils_test;

import 'package:dartdoc/src/io_utils.dart';
import 'package:dartdoc/src/package_meta.dart';
import 'package:test/test.dart';
Expand Down
2 changes: 0 additions & 2 deletions test/resource_loader_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.resource_loader_test;

import 'package:analyzer/file_system/physical_file_system.dart';
import 'package:dartdoc/src/generator/resource_loader.dart';
import 'package:test/test.dart';
Expand Down
2 changes: 0 additions & 2 deletions test/source_linker_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.source_linker_test;

import 'package:dartdoc/src/dartdoc_options.dart';
import 'package:dartdoc/src/source_linker.dart';
import 'package:test/test.dart';
Expand Down
2 changes: 0 additions & 2 deletions test/tool_runner_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.model_test;

import 'dart:io';

import 'package:dartdoc/src/dartdoc_options.dart';
Expand Down
2 changes: 0 additions & 2 deletions test/utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

library dartdoc.utils_test;

import 'package:dartdoc/src/utils.dart';
import 'package:test/test.dart';

Expand Down

0 comments on commit d5dc076

Please sign in to comment.