Skip to content

Commit 7ecf333

Browse files
parloughCommit Queue
authored and
Commit Queue
committed
[linter] Mark package_api_docs as removed
Resolves #59554 Change-Id: Ic843c827b1b7c9345132c4b8d901de040a56e1a2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396780 Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Reviewed-by: Phil Quitslund <[email protected]>
1 parent 981e560 commit 7ecf333

File tree

7 files changed

+13
-24
lines changed

7 files changed

+13
-24
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ main() {
5959
and with a `Flexible` widget.
6060
- Offer an assist to "inline" an else-block's inner if-statement with the
6161
else-block to read `else if`.
62-
(Thanks [@FMorschel](https://github.com/FMorschel) for the above enhacements!
62+
(Thanks [@FMorschel](https://github.com/FMorschel) for the above enhancements!
6363
- Add the experimental `specify_nonobvious_property_types` lint rule.
6464
- Add the experimental `omit_obvious_property_types` lint rule.
65-
- Deprecate the `package_api_docs` lint rule.
65+
- Remove the `package_api_docs` lint rule.
66+
- Remove the `unsafe_html` lint rule.
6667

6768
#### Dart format
6869

pkg/linter/CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# 3.7.0-wip
22

3-
- deprecated lint: `package_api_docs`
3+
- removed lint: `package_api_docs`
4+
- removed lint: `unsafe_html`
45
- _(soon to be)_ deprecated lint: `avoid_null_checks_in_equality_operators`
5-
- _(soon to be)_ deprecated lint: `unsafe_html`
66
- new _(experimental)_ lint: `omit_obvious_property_types`
77
- new _(experimental)_ lint: `specify_nonobvious_property_types`
8-
- removed lint: `unsafe_html`
98
- new _(experimental)_ lint: `unsafe_variance`
109

1110
# 3.6.0

pkg/linter/lib/src/lint_codes.g.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,12 +1017,6 @@ class LinterLintCode extends LintCode {
10171017
hasPublishedDocs: true,
10181018
);
10191019

1020-
static const LintCode package_api_docs = LinterLintCode(
1021-
LintNames.package_api_docs,
1022-
"Missing documentation for public API.",
1023-
correctionMessage: "Try adding a documentation comment.",
1024-
);
1025-
10261020
static const LintCode package_names = LinterLintCode(
10271021
LintNames.package_names,
10281022
"The package name '{0}' isn't a lower_case_with_underscores identifier.",

pkg/linter/lib/src/rules/package_api_docs.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ import 'package:pub_semver/pub_semver.dart';
66

77
import '../analyzer.dart';
88

9-
const _desc = r'Provide doc comments for all public APIs.';
10-
119
class PackageApiDocs extends LintRule {
1210
PackageApiDocs()
1311
: super(
14-
name: LintNames.package_api_docs,
15-
description: _desc,
16-
state: State.deprecated(since: Version(3, 7, 0)),
17-
);
12+
name: LintNames.package_api_docs,
13+
description: r'Provide doc comments for all public APIs.',
14+
state: State.removed(since: Version(3, 7, 0)));
1815

1916
@override
2017
LintCode get lintCode => LinterLintCode.removed_lint;

pkg/linter/lib/src/rules/unsafe_html.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ import 'package:pub_semver/pub_semver.dart';
66

77
import '../analyzer.dart';
88

9-
const _desc = '$_descPrefix.';
10-
const _descPrefix = r'Avoid unsafe HTML APIs';
11-
129
class UnsafeHtml extends LintRule {
1310
UnsafeHtml()
1411
: super(
1512
name: LintNames.unsafe_html,
16-
description: _desc,
13+
description: 'Avoid unsafe HTML APIs.',
1714
state: State.removed(since: Version(3, 7, 0)));
1815

1916
@override

pkg/linter/messages.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7401,10 +7401,11 @@ LintCode:
74017401
correctionMessage: "Try adding a documentation comment."
74027402
state:
74037403
stable: "2.0"
7404+
removed: "3.7"
74047405
categories: [effectiveDart, publicInterface]
74057406
hasPublishedDocs: false
74067407
deprecatedDetails: |-
7407-
**NOTE:** This lint is deprecated because it is has not
7408+
**NOTE:** This lint has been removed because it is has not
74087409
been fully functional since at least Dart 2.0.
74097410
Remove all inclusions of this lint from your analysis options.
74107411

pkg/linter/tool/machine/rules.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,11 +1629,11 @@
16291629
"effectiveDart",
16301630
"publicInterface"
16311631
],
1632-
"state": "deprecated",
1632+
"state": "removed",
16331633
"incompatible": [],
16341634
"sets": [],
16351635
"fixStatus": "noFix",
1636-
"details": "**NOTE:** This lint is deprecated because it is has not\nbeen fully functional since at least Dart 2.0.\nRemove all inclusions of this lint from your analysis options.\n\n**DO** provide doc comments for all public APIs.\n\nAs described in the [pub package layout doc](https://dart.dev/tools/pub/package-layout#implementation-files),\npublic APIs consist in everything in your package's `lib` folder, minus\nimplementation files in `lib/src`, adding elements explicitly exported with an\n`export` directive.\n\nFor example, given `lib/foo.dart`:\n```dart\nexport 'src/bar.dart' show Bar;\nexport 'src/baz.dart';\n\nclass Foo { }\n\nclass _Foo { }\n```\nits API includes:\n\n* `Foo` (but not `_Foo`)\n* `Bar` (exported) and\n* all *public* elements in `src/baz.dart`\n\nAll public API members should be documented with `///` doc-style comments.\n\n**BAD:**\n```dart\nclass Bar {\n void bar();\n}\n```\n\n**GOOD:**\n```dart\n/// A Foo.\nabstract class Foo {\n /// Start foo-ing.\n void start() => _start();\n\n _start();\n}\n```\n\nAdvice for writing good doc comments can be found in the\n[Doc Writing Guidelines](https://dart.dev/effective-dart/documentation).",
1636+
"details": "**NOTE:** This lint has been removed because it is has not\nbeen fully functional since at least Dart 2.0.\nRemove all inclusions of this lint from your analysis options.\n\n**DO** provide doc comments for all public APIs.\n\nAs described in the [pub package layout doc](https://dart.dev/tools/pub/package-layout#implementation-files),\npublic APIs consist in everything in your package's `lib` folder, minus\nimplementation files in `lib/src`, adding elements explicitly exported with an\n`export` directive.\n\nFor example, given `lib/foo.dart`:\n```dart\nexport 'src/bar.dart' show Bar;\nexport 'src/baz.dart';\n\nclass Foo { }\n\nclass _Foo { }\n```\nits API includes:\n\n* `Foo` (but not `_Foo`)\n* `Bar` (exported) and\n* all *public* elements in `src/baz.dart`\n\nAll public API members should be documented with `///` doc-style comments.\n\n**BAD:**\n```dart\nclass Bar {\n void bar();\n}\n```\n\n**GOOD:**\n```dart\n/// A Foo.\nabstract class Foo {\n /// Start foo-ing.\n void start() => _start();\n\n _start();\n}\n```\n\nAdvice for writing good doc comments can be found in the\n[Doc Writing Guidelines](https://dart.dev/effective-dart/documentation).",
16371637
"sinceDartSdk": "2.0"
16381638
},
16391639
{

0 commit comments

Comments
 (0)