mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 17:59:39 +00:00
disable pubspec linting
Disables the fix in https://dart-review.googlesource.com/c/sdk/+/164249 pending a fix to `sort_pub_dependencies` which is producing a false positive that is blocking the Flutter engine roll. See: https://github.com/dart-lang/sdk/issues/43529 See: https://github.com/dart-lang/linter/issues/2271 Change-Id: Ica6262153b89259ba67b5a43eeeafe2bdd482b44 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166703 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Dan Field <dnfield@google.com>
This commit is contained in:
parent
51c6ba0edb
commit
c21b906182
|
@ -818,26 +818,29 @@ class ContextManagerImpl implements ContextManager {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (visitors.isNotEmpty) {
|
||||
var sourceUri = resourceProvider.pathContext.toUri(path);
|
||||
var pubspecAst = Pubspec.parse(content,
|
||||
sourceUrl: sourceUri, resourceProvider: resourceProvider);
|
||||
var listener = RecordingErrorListener();
|
||||
var reporter = ErrorReporter(listener,
|
||||
resourceProvider.getFile(path).createSource(sourceUri),
|
||||
isNonNullableByDefault: false);
|
||||
for (var entry in visitors.entries) {
|
||||
entry.key.reporter = reporter;
|
||||
pubspecAst.accept(entry.value);
|
||||
}
|
||||
if (listener.errors.isNotEmpty) {
|
||||
convertedErrors ??= <protocol.AnalysisError>[];
|
||||
convertedErrors.addAll(converter.convertAnalysisErrors(
|
||||
listener.errors,
|
||||
lineInfo: lineInfo,
|
||||
options: driver.analysisOptions));
|
||||
}
|
||||
}
|
||||
// todo (pq): re-enable once `sort_pub_dependencies` is fixed
|
||||
// see: https://github.com/dart-lang/linter/issues/2271
|
||||
// see: See: https://github.com/dart-lang/sdk/issues/43529
|
||||
// if (visitors.isNotEmpty) {
|
||||
// var sourceUri = resourceProvider.pathContext.toUri(path);
|
||||
// var pubspecAst = Pubspec.parse(content,
|
||||
// sourceUrl: sourceUri, resourceProvider: resourceProvider);
|
||||
// var listener = RecordingErrorListener();
|
||||
// var reporter = ErrorReporter(listener,
|
||||
// resourceProvider.getFile(path).createSource(sourceUri),
|
||||
// isNonNullableByDefault: false);
|
||||
// for (var entry in visitors.entries) {
|
||||
// entry.key.reporter = reporter;
|
||||
// pubspecAst.accept(entry.value);
|
||||
// }
|
||||
// if (listener.errors.isNotEmpty) {
|
||||
// convertedErrors ??= <protocol.AnalysisError>[];
|
||||
// convertedErrors.addAll(converter.convertAnalysisErrors(
|
||||
// listener.errors,
|
||||
// lineInfo: lineInfo,
|
||||
// options: driver.analysisOptions));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
} catch (exception) {
|
||||
|
|
|
@ -482,6 +482,10 @@ version: 1.3.2
|
|||
expect(errors, hasLength(0));
|
||||
}
|
||||
|
||||
/// Re-enable once `sort_pub_dependencies` is fixed
|
||||
/// See: https://github.com/dart-lang/sdk/issues/43529
|
||||
/// See: https://github.com/dart-lang/linter/issues/2271
|
||||
@failingTest
|
||||
Future<void> test_pubspecFile_lint() async {
|
||||
var optionsPath = join(projectPath, 'analysis_options.yaml');
|
||||
newFile(optionsPath, content: '''
|
||||
|
|
Loading…
Reference in a new issue