mirror of
https://github.com/dart-lang/sdk
synced 2024-07-25 04:15:45 +00:00
Final todo updated format fixes
This should tidy up the last ones. 🤞 Sorry for the noise! Change-Id: I7104fc33282184acb0c843eae6e73f6fcc77d892 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336723 Commit-Queue: Phil Quitslund <pquitslund@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
c2e3f9dfa9
commit
07c77f59a2
|
@ -36,13 +36,12 @@ import 'package:watcher/watcher.dart';
|
|||
import 'package:yaml/yaml.dart';
|
||||
|
||||
/// Enables watching of files generated by Blaze.
|
||||
///
|
||||
// TODO(michalt): This is a temporary flag that we use to disable this
|
||||
/// functionality due its performance issues. We plan to benchmark and optimize
|
||||
/// it and re-enable it everywhere.
|
||||
/// Not private to enable testing.
|
||||
/// NB: If you set this to `false` remember to disable the
|
||||
/// `test/integration/serve/blaze_changes_test.dart`.
|
||||
// functionality due its performance issues. We plan to benchmark and optimize
|
||||
// it and re-enable it everywhere.
|
||||
// Not private to enable testing.
|
||||
// NB: If you set this to `false` remember to disable the
|
||||
// `test/integration/serve/blaze_changes_test.dart`.
|
||||
var experimentalEnableBlazeWatching = true;
|
||||
|
||||
/// Class that maintains a mapping from included/excluded paths to a set of
|
||||
|
@ -114,8 +113,8 @@ abstract class ContextManager {
|
|||
/// analyzed.
|
||||
///
|
||||
// TODO(paulberry): eliminate this interface, and instead have [ContextManager]
|
||||
/// operations return data structures describing how context state should be
|
||||
/// modified.
|
||||
// operations return data structures describing how context state should be
|
||||
// modified.
|
||||
abstract class ContextManagerCallbacks {
|
||||
/// Called after analysis contexts are created, usually when new analysis
|
||||
/// roots are set, or after detecting a change that required rebuilding
|
||||
|
|
|
@ -132,10 +132,10 @@ protocol.Notification createExistingImportsNotification(
|
|||
}
|
||||
|
||||
// TODO(dantup): We need to expose this because the Declarations code currently
|
||||
/// returns declarations with DeclarationKinds but the DartCompletionManager
|
||||
/// gives us a list of "included ElementKinds". Maybe it would be better to expose
|
||||
/// includedDeclarationKinds and then just map that list to ElementKinds once in
|
||||
/// domain_completion for the original protocol?
|
||||
// returns declarations with DeclarationKinds but the DartCompletionManager
|
||||
// gives us a list of "included ElementKinds". Maybe it would be better to expose
|
||||
// includedDeclarationKinds and then just map that list to ElementKinds once in
|
||||
// domain_completion for the original protocol?
|
||||
protocol.ElementKind protocolElementKind(DeclarationKind kind) {
|
||||
return switch (kind) {
|
||||
DeclarationKind.CLASS => protocol.ElementKind.CLASS,
|
||||
|
|
|
@ -736,13 +736,13 @@ class LegacyAnalysisServer extends AnalysisServer {
|
|||
/// Implementation for `analysis.setAnalysisRoots`.
|
||||
///
|
||||
// TODO(scheglov): implement complete projects/contexts semantics.
|
||||
///
|
||||
/// The current implementation is intentionally simplified and expected
|
||||
/// that only folders are given each given folder corresponds to the exactly
|
||||
/// one context.
|
||||
///
|
||||
/// So, we can start working in parallel on adding services and improving
|
||||
/// projects/contexts support.
|
||||
//
|
||||
// The current implementation is intentionally simplified and expected
|
||||
// that only folders are given each given folder corresponds to the exactly
|
||||
// one context.
|
||||
//
|
||||
// So, we can start working in parallel on adding services and improving
|
||||
// projects/contexts support.
|
||||
Future<void> setAnalysisRoots(String requestId, List<String> includedPaths,
|
||||
List<String> excludedPaths) async {
|
||||
final completer = analysisContextRebuildCompleter = Completer();
|
||||
|
@ -1114,12 +1114,12 @@ class ServerContextManagerCallbacks
|
|||
/// computer, we want it to run before spending time of sending notifications.
|
||||
///
|
||||
// TODO(scheglov): Consider replacing this with full priority based scheduler.
|
||||
///
|
||||
//
|
||||
// TODO(scheglov): Alternatively, if code completion work in a way that does
|
||||
/// not produce (at first) fully resolved unit, but only part of it - a single
|
||||
/// method, or a top-level declaration, we would not have this problem - the
|
||||
/// completion computer would be the only consumer of the partial analysis
|
||||
/// result.
|
||||
// not produce (at first) fully resolved unit, but only part of it - a single
|
||||
// method, or a top-level declaration, we would not have this problem - the
|
||||
// completion computer would be the only consumer of the partial analysis
|
||||
// result.
|
||||
void _runDelayed(Function() f) {
|
||||
Future(f);
|
||||
}
|
||||
|
|
|
@ -108,8 +108,8 @@ class StatementCompletionProcessor {
|
|||
final CorrectionUtils utils;
|
||||
|
||||
// TODO(brianwilkerson): Refactor the code so that the completion is returned
|
||||
/// from the methods in which it's computed rather than being a field that we
|
||||
/// have to test.
|
||||
// from the methods in which it's computed rather than being a field that we
|
||||
// have to test.
|
||||
StatementCompletion? completion;
|
||||
SourceChange change = SourceChange('statement-completion');
|
||||
List<engine.AnalysisError> errors = [];
|
||||
|
|
|
@ -179,8 +179,7 @@ List<SimpleIdentifier> findPrefixElementReferences(
|
|||
}
|
||||
|
||||
// TODO(scheglov): replace with nodes once there will be
|
||||
/// [CompilationUnit.getComments].
|
||||
///
|
||||
// [CompilationUnit.getComments].
|
||||
/// Returns [SourceRange]s of all comments in [unit].
|
||||
List<SourceRange> getCommentRanges(CompilationUnit unit) {
|
||||
var ranges = <SourceRange>[];
|
||||
|
|
|
@ -14,7 +14,7 @@ extension DartCompletionRequestExtensions on DartCompletionRequest {
|
|||
/// [element].
|
||||
///
|
||||
// TODO(scheglov): Validate that suggesting a tear-off instead of invocation
|
||||
/// is statistically a good choice.
|
||||
// is statistically a good choice.
|
||||
bool shouldSuggestTearOff(InterfaceElement element) {
|
||||
if (!libraryElement.featureSet.isEnabled(Feature.constructor_tearoffs)) {
|
||||
return false;
|
||||
|
|
|
@ -24,7 +24,7 @@ void main() {
|
|||
}
|
||||
|
||||
// TODO(scheglov): This class does not really belong here.
|
||||
/// Consider merging it into [AbstractContextTest].
|
||||
// Consider merging it into [AbstractContextTest].
|
||||
class PubPackageResolutionTest extends AbstractContextTest {
|
||||
late ResolvedUnitResult result;
|
||||
late FindNode findNode;
|
||||
|
|
|
@ -18,7 +18,7 @@ void main() {
|
|||
VerificationTests.defineTests();
|
||||
}
|
||||
|
||||
// /todo (pq): update w/ a FixKind that we're sure we want to support as a file fix
|
||||
// TODO(pq): update w/ a FixKind that we're sure we want to support as a file fix
|
||||
// @reflectiveTest
|
||||
// class MultiFixInFileTest extends FixInFileProcessorTest
|
||||
// with WithNullSafetyMixin {
|
||||
|
|
|
@ -11,7 +11,7 @@ import '../analyzer.dart';
|
|||
const _desc = r"Don't implicitly reopen classes.";
|
||||
|
||||
// TODO(pq): link out to (upcoming) dart.dev docs.
|
||||
/// https://github.com/dart-lang/site-www/issues/4833
|
||||
// https://github.com/dart-lang/site-www/issues/4833
|
||||
const _details = r'''
|
||||
Using an `interface`, `base`, `final`, or `sealed` modifier on a class,
|
||||
or a `base` modifier on a mixin,
|
||||
|
|
|
@ -252,7 +252,7 @@ class InvalidCasePatterns extends LintRule {
|
|||
group: Group.errors);
|
||||
|
||||
// TODO(pq): update to add specific messages w/ specific corrections
|
||||
/// https://github.com/dart-lang/linter/issues/4172
|
||||
// https://github.com/dart-lang/linter/issues/4172
|
||||
@override
|
||||
LintCode get lintCode => code;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ For more information, see https://github.com/dart-lang/linter
|
|||
}
|
||||
|
||||
// TODO(pq): consider using `dart analyze` where possible
|
||||
/// see: https://github.com/dart-lang/linter/pull/2537
|
||||
// see: https://github.com/dart-lang/linter/pull/2537
|
||||
Future<void> runLinter(List<String> args) async {
|
||||
// Force the rule registry to be populated.
|
||||
registerLintRules();
|
||||
|
|
Loading…
Reference in a new issue