Skip to content

Commit

Permalink
Version 3.7.0-6.0.dev
Browse files Browse the repository at this point in the history
Merge d6e562c into dev
  • Loading branch information
Dart CI committed Oct 9, 2024
2 parents a8f89cc + d6e562c commit 83e7add
Show file tree
Hide file tree
Showing 20 changed files with 894 additions and 192 deletions.
3 changes: 3 additions & 0 deletions pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ class InheritanceManager3 {
@experimental
ExecutableElement2? getInherited3(InterfaceType type, Name name) {
var element = getInherited(type, name);
if (element is ExecutableMember) {
return element as ExecutableElement2;
}
return (element as ExecutableFragment?)?.element;
}

Expand Down
53 changes: 11 additions & 42 deletions pkg/analyzer/lib/src/generated/engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ typedef AnalyzeFunctionBodiesPredicate = bool Function(Source source);
/// An analysis context also represents the state of the analysis, which includes
/// knowing which sources have been included in the analysis (either directly or
/// indirectly) and the results of the analysis. Sources must be added and
/// removed from the context using the method [applyChanges], which is also used
/// to notify the context when sources have been modified and, consequently,
/// previously known results might have been invalidated.
/// removed from the context, which is also used to notify the context when
/// sources have been modified and, consequently, previously known results might
/// have been invalidated.
///
/// There are two ways to access the results of the analysis. The most common is
/// to use one of the 'get' methods to access the results. The 'get' methods have
Expand All @@ -63,8 +63,7 @@ typedef AnalyzeFunctionBodiesPredicate = bool Function(Source source);
/// However, this is not always acceptable. Some clients need to keep the
/// analysis results up-to-date. For such clients there is a mechanism that
/// allows them to incrementally perform needed analysis and get notified of the
/// consequent changes to the analysis results. This mechanism is realized by the
/// method [performAnalysisTask].
/// consequent changes to the analysis results.
///
/// Analysis engine allows for having more than one context. This can be used,
/// for example, to perform one analysis based on the state of files on disk and
Expand Down Expand Up @@ -196,12 +195,11 @@ class AnalysisOptionsImpl implements AnalysisOptions {
/// Return `true` if timing data should be gathered during execution.
bool enableTiming = false;

/// A list of error processors that are to be used when reporting errors in
/// some analysis context.
List<ErrorProcessor>? _errorProcessors;
@override
List<ErrorProcessor> errorProcessors = [];

/// A list of exclude patterns used to exclude some sources from analysis.
List<String>? _excludePatterns;
@override
List<String> excludePatterns = [];

/// The associated `analysis_options.yaml` file (or `null` if there is none).
File? file;
Expand All @@ -212,12 +210,11 @@ class AnalysisOptionsImpl implements AnalysisOptions {
@override
bool warning = true;

/// The lint rules that are to be run in an analysis context if [lint] returns
/// `true`.
List<LintRule>? _lintRules;
@override
List<LintRule> lintRules = [];

/// Indicates whether linter exceptions should be propagated to the caller (by
/// re-throwing them)
/// re-throwing them).
bool propagateLinterExceptions = false;

/// Whether implicit casts should be reported as potential problems.
Expand Down Expand Up @@ -290,25 +287,6 @@ class AnalysisOptionsImpl implements AnalysisOptions {
@Deprecated("Use 'enabledLegacyPluginNames' instead")
List<String> get enabledPluginNames => enabledLegacyPluginNames;

@override
List<ErrorProcessor> get errorProcessors =>
_errorProcessors ??= const <ErrorProcessor>[];

/// Set the list of error [processors] that are to be used when reporting
/// errors in some analysis context.
set errorProcessors(List<ErrorProcessor> processors) {
_errorProcessors = processors;
}

@override
List<String> get excludePatterns => _excludePatterns ??= const <String>[];

/// Set the exclude patterns used to exclude some sources from analysis to
/// those in the given list of [patterns].
set excludePatterns(List<String> patterns) {
_excludePatterns = patterns;
}

/// The set of enabled experiments.
ExperimentStatus get experimentStatus => _contextFeatures;

Expand All @@ -319,15 +297,6 @@ class AnalysisOptionsImpl implements AnalysisOptions {
@Deprecated("Use 'warning=' instead")
set hint(bool value) => warning = value;

@override
List<LintRule> get lintRules => _lintRules ??= const [];

/// Set the lint rules that are to be run in an analysis context if [lint]
/// returns `true`.
set lintRules(List<LintRule> rules) {
_lintRules = rules;
}

Uint32List get signature {
if (_signature == null) {
ApiSignature buffer = ApiSignature();
Expand Down
17 changes: 8 additions & 9 deletions pkg/analyzer/lib/src/lint/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
import 'package:analyzer/src/util/yaml.dart';
import 'package:yaml/yaml.dart';

/// Parse the given map into a lint config.
/// Return `null` if [optionsMap] is `null` or does not have `linter` map.
LintConfig? parseConfig(YamlMap? optionsMap) {
if (optionsMap != null) {
var options = optionsMap.valueAt('linter');
// Quick check of basic contract.
if (options is YamlMap) {
return LintConfig.parseMap(options);
}
/// Parses [optionsMap] into a [LintConfig], returning the config, or `null` if
/// [optionsMap] does not have `linter` map.
LintConfig? parseConfig(YamlMap optionsMap) {
var options = optionsMap.valueAt('linter');
// Quick check of basic contract.
if (options is YamlMap) {
return LintConfig.parseMap(options);
}

return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class ExpressionCompilerWorker {
Map<ExperimentalFlag, bool> explicitExperimentalFlags = const {},
Uri? sdkRoot,
bool trackWidgetCreation = false,
bool soundNullSafety = false,
bool soundNullSafety = true,
ModuleFormat moduleFormat = ModuleFormat.amd,
bool canaryFeatures = false,
bool enableAsserts = true,
Expand Down
Loading

0 comments on commit 83e7add

Please sign in to comment.