|
1 | | -## 0.2.0-dev |
| 1 | +## 0.2.0 |
2 | 2 |
|
3 | | -- Require version `7.4.x` of the `analyzer` package. |
| 3 | +- Require version `^8.0.0` of the `analyzer` package. |
| 4 | +- Require Dart SDK version `^3.5.0`. |
| 5 | +- Plugins can now register assists. See the [documentation][writing assists] |
| 6 | + for details. |
| 7 | +- With the initial release of the new `analyzer_testing` package, there is now |
| 8 | + a framework for testing analysis rules. See the |
| 9 | + [documentation][testing_rules] for details. |
| 10 | +- Added documentation for several features: |
| 11 | + - [writing fixes][] |
| 12 | + - [writing assists][] |
| 13 | + - [enabling lint rules][] |
| 14 | +- Require that CorrectionProducers registered as fixes have a non-`null` |
| 15 | + `fixKind`, and that CorrectionProducers registered as assists have a |
| 16 | + non-`null` `assistKind`. |
| 17 | +- Various performance improvements are included. |
| 18 | +- Breaking change: The `DartFixContext.librariesWithExtensions` method now |
| 19 | + accepts a `Name` instead of a `String`, and only yields library elements that |
| 20 | + actually export an extension with a member of the given name. |
| 21 | +- `CorrectionProducer.errorLength` is renamed |
| 22 | + `CorrectionProducer.diagnosticLength`. |
| 23 | +- `CorrectionProducer.errorOffset` is renamed |
| 24 | + `CorrectionProducer.diagnosticOffset`. |
| 25 | +- `FixContext.error` is renamed `FixContext.diagnostic`. |
| 26 | +- The new minimum analyzer version contains a number of API changes that should |
| 27 | + be noted for use in this package: |
| 28 | + - `ErrorCode` is renamed `DiagnosticCode`. |
| 29 | + - `AnalysisError` is renamed `Diagnostic`. This class's `errorCode` field is |
| 30 | + now named `diagnosticCode`. |
| 31 | + - `ErrorListener` is renamed `DiagnosticListener`. |
| 32 | + - `ErrorReporter` is renamed `DiagnosticReporter`. |
| 33 | + - `LintRule` is split into two classses: `AnalysisRule`, for rules which |
| 34 | + report exactly one code, and `MultiAnalysisRule`, for rules which report |
| 35 | + multiple codes. These classes are public API. Classes that used to extend |
| 36 | + `LintRule` and either implemented the `lintCode` getter or the `lintCodes` |
| 37 | + getter now must implement `diagnosticCode` (for `AnalysisRule`) or |
| 38 | + `diagnosticCodes` (for `MultiAnalysisRule`). |
| 39 | + - `NodeLintRegistry` is renamed `RuleVisitorRegistry`. It is now public API. |
| 40 | + - A `LintCode`'s severity can now be specified when in the constructor call. |
| 41 | + - `LinterContext` is renamed `RuleContext`. It is now public API. |
| 42 | + - `LinterContextWithParsedResults` is renamed `RuleContextWithParsedResults`. |
| 43 | + - `LinterContextWithResolvedResults` is renamed |
| 44 | + `RuleContextWithResolvedResults`. |
| 45 | + - `LintRuleUnitContext` is renamed `RuleUnitContext`. It is now public API. |
| 46 | + - `CorrectionProducer.inheritanceManager` is deprecated, in favor of the |
| 47 | + methods found on `InterfaceElement`. |
| 48 | + |
| 49 | +[testing_rules]: https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server_plugin/doc/testing_rules.md |
| 50 | +[writing fixes]: https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server_plugin/doc/writing_fixes.md |
| 51 | +[writing assists]: https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server_plugin/doc/writing_assists.md |
| 52 | +[enabling lint rules]: https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server_plugin/doc/using_plugins.md#enabling-a-lint-rule |
4 | 53 |
|
5 | 54 | ## 0.1.0-dev.1 |
6 | 55 |
|
|
0 commit comments