Skip to content

Commit

Permalink
Remove extra the, be and of
Browse files Browse the repository at this point in the history
Fixes #dart-lang#47504

TEST=No tests needed, only comments affected.

Change-Id: Ie096307b5ce314d328fea6780f396aaa226ad3b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216182
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
  • Loading branch information
asashour authored and commit-bot@chromium.org committed Oct 20, 2021
1 parent 311760f commit d041cf0
Show file tree
Hide file tree
Showing 46 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ Updated the Linter to `0.1.129`, which includes:
and a corresponding `dart pub remove` that removes dependencies.

- New option `dart pub upgrade --major-versions` will update constraints in your
`pubspec.yaml` to match the the _resolvable_ column reported in
`pubspec.yaml` to match the _resolvable_ column reported in
`dart pub outdated`. This allows users to easily upgrade to latest version for
all dependencies where this is possible, even if such upgrade requires an
update to the version constraint in `pubspec.yaml`.
Expand Down
2 changes: 1 addition & 1 deletion docs/language/informal/generalized-void.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ the type void is treated as being the built-in class `Object`.

*Dart 1.x does not support generic function types dynamically, because they
are erased to regular function types during compilation. Hence there is no
need to specify the the typing relations for generic function types. In
need to specify the typing relations for generic function types. In
Dart 2, the subtype relationship for generic function types follows from
the rule that the type void is treated as `Object`.*

Expand Down
2 changes: 1 addition & 1 deletion docs/language/informal/instantiate-to-bound.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Based on [this description](https://github.com/dart-lang/sdk/issues/27526#issuecomment-260021397) by leafp@.

**This document** is an informal specification of the the instantiate to
**This document** is an informal specification of the instantiate to
bound mechanism in Dart 2. The feature described here, *instantiate to
bound*, makes it possible to omit some or all actual type arguments in some
types using generic classes. The missing type arguments will be added
Expand Down
2 changes: 1 addition & 1 deletion docs/language/informal/mixin-inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ set exists, then it is an error. Note that for well-formed programs, the only
free type variables in the `Ti` must by definition be drawn from the type
parameters to the enclosing class of the mixin application. Hence it follows
both that the `Ti` are well-formed types in the scope of the mixin application,
and that the the `Xi` do not occur free in the `Ti` since we have assumed that
and that the `Xi` do not occur free in the `Ti` since we have assumed that
classes are suitably renamed to avoid capture.

Let `[X0 extends B0, ..., Xj extends Bj]` be a set of type variable bounds such
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17475,7 +17475,7 @@ class LocationLink implements ToJsonable {
final Range targetRange;

/// The range that should be selected and revealed when this link is being
/// followed, e.g the name of a function. Must be contained by the the
/// followed, e.g the name of a function. Must be contained by the
/// `targetRange`. See also `DocumentSymbol#range`
final Range targetSelectionRange;

Expand Down
2 changes: 1 addition & 1 deletion pkg/analysis_server/lib/src/lsp/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ abstract class CustomSemanticTokenModifiers {
/// coloring it differently to the literal parts of the string.
///
/// Many tokens within interpolation expressions will get their own semantic
/// tokens so this is mainly to account for the the surrounding `${}` and
/// tokens so this is mainly to account for the surrounding `${}` and
/// tokens like parens and operators that may not get their own.
///
/// This is useful for editors that supply their own basic coloring initially
Expand Down
2 changes: 1 addition & 1 deletion pkg/analysis_server/lib/src/lsp/source_edits.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ ErrorOr<List<TextEdit>?> generateEditsForFormatting(
}
formattedResult = formatter.formatSource(code);
} on FormatterException {
// If the document fails to parse, just return no edits to avoid the the
// If the document fails to parse, just return no edits to avoid the
// use seeing edits on every save with invalid code (if LSP gains the
// ability to pass a context to know if the format was manually invoked
// we may wish to change this to return an error for that case).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ class KytheDartVisitor extends GeneralizingAstVisitor<void> with OutputUtils {
var identifier = node.identifier;
if (identifier != null) {
// The anchor and anchor edges generation are broken into two cases, the
// first case is "method(parameter_name) ...", where the the parameter
// first case is "method(parameter_name) ...", where the parameter
// character range only includes a parameter name. The second case is for
// parameter declarations which are prefixed with a type, 'var', or
// 'dynamic', as in "method(var parameter_name) ...".
Expand Down
2 changes: 1 addition & 1 deletion pkg/analysis_server/test/lsp/semantic_tokens_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ class SemanticTokensTest extends AbstractLspAnalysisServerTest {
''';

// Expect the correct tokens for the valid code before/after but don't
// check the the tokens for the invalid code as there are no concrete
// check the tokens for the invalid code as there are no concrete
// expectations for them.
final expected1 = [
_Token('/// class docs', SemanticTokenTypes.comment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ enum BlendMode {
/// ![](https://flutter.github.io/assets-for-api-docs/assets/dart-ui/blend_mode_colorDodge.png)
colorDodge,

/// Divide the inverse of the destination by the the source, and inverse the result.
/// Divide the inverse of the destination by the source, and inverse the result.
///
/// Inverting the components means that a fully saturated channel (opaque
/// white) is treated as the value 0.0, and values normally treated as 0.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/analysis_server/tool/lsp_spec/lsp_specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ interface LocationLink {

/**
* The range that should be selected and revealed when this link is being
* followed, e.g the name of a function. Must be contained by the the
* followed, e.g the name of a function. Must be contained by the
* `targetRange`. See also `DocumentSymbol#range`
*/
targetSelectionRange: Range;
Expand Down
2 changes: 1 addition & 1 deletion pkg/analyzer/lib/dart/analysis/context_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract class ContextBuilder {
/// Return an analysis context corresponding to the given [contextRoot].
///
/// If a set of [declaredVariables] is provided, the values will be used to
/// map the the variable names found in `fromEnvironment` invocations to the
/// map the variable names found in `fromEnvironment` invocations to the
/// constant value that will be returned. If none is given, then no variables
/// will be defined.
///
Expand Down
2 changes: 1 addition & 1 deletion pkg/analyzer/lib/dart/element/element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ abstract class Element implements AnalysisTarget {
/// presented to users.
///
/// If [withNullability] is `true`, then [NullabilitySuffix.question] and
/// [NullabilitySuffix.star] in types will be be represented as `?` and `*`.
/// [NullabilitySuffix.star] in types will be represented as `?` and `*`.
/// [NullabilitySuffix.none] does not have any explicit presentation.
///
/// If [withNullability] is `false`, nullability suffixes will not be
Expand Down
2 changes: 1 addition & 1 deletion pkg/analyzer/lib/dart/element/type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ abstract class DartType {
/// to users in contexts such as error messages.
///
/// If [withNullability] is `true`, then [NullabilitySuffix.question] and
/// [NullabilitySuffix.star] will be be represented as `?` and `*`.
/// [NullabilitySuffix.star] will be represented as `?` and `*`.
/// [NullabilitySuffix.none] does not have any explicit presentation.
///
/// If [withNullability] is `false`, nullability suffixes will not be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class InheritanceManager3 {

/// Return the member with the given [name].
///
/// If [concrete] is `true`, the the concrete implementation is returned,
/// If [concrete] is `true`, the concrete implementation is returned,
/// from the given [element], or its superclass.
///
/// If [forSuper] is `true`, then [concrete] is implied, and only concrete
Expand Down
4 changes: 2 additions & 2 deletions pkg/analyzer/lib/src/error/codes.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5969,7 +5969,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
* is a getter and `m'` is a method.
*
* Parameters:
* 0: the name of the the instance member with inconsistent inheritance.
* 0: the name of the instance member with inconsistent inheritance.
* 1: the name of the superinterface that declares the name as a getter.
* 2: the name of the superinterface that declares the name as a method.
*/
Expand Down Expand Up @@ -8257,7 +8257,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
// #### Description
//
// The analyzer produces this diagnostic when a value of a key-value pair in a
// map literal has a type that isn't assignable to the the value type of the
// map literal has a type that isn't assignable to the value type of the
// map.
//
// #### Example
Expand Down
2 changes: 1 addition & 1 deletion pkg/analyzer/lib/src/error/dead_code_verifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ class LegacyDeadCodeVerifier extends RecursiveAstVisitor<void> {
/// When an unreachable node is found, and [_firstDeadNode] is `null`, we
/// set [_firstDeadNode], so start a new dead nodes interval. The dead code
/// interval ends when [flowEnd] is invoked with a node that is the start
/// node, or contains it. So, we end the the end of the covering control flow.
/// node, or contains it. So, we end the end of the covering control flow.
class NullSafetyDeadCodeVerifier {
final TypeSystemImpl _typeSystem;
final ErrorReporter _errorReporter;
Expand Down
4 changes: 2 additions & 2 deletions pkg/analyzer/messages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5291,7 +5291,7 @@ CompileTimeErrorCode:
is a getter and `m'` is a method.

Parameters:
0: the name of the the instance member with inconsistent inheritance.
0: the name of the instance member with inconsistent inheritance.
1: the name of the superinterface that declares the name as a getter.
2: the name of the superinterface that declares the name as a method.
INCONSISTENT_LANGUAGE_VERSION_OVERRIDE:
Expand Down Expand Up @@ -7301,7 +7301,7 @@ CompileTimeErrorCode:
#### Description

The analyzer produces this diagnostic when a value of a key-value pair in a
map literal has a type that isn't assignable to the the value type of the
map literal has a type that isn't assignable to the value type of the
map.

#### Example
Expand Down
2 changes: 1 addition & 1 deletion pkg/analyzer/tool/diagnostics/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -8034,7 +8034,7 @@ _The element type '{0}' can't be assigned to the map value type '{1}'._
#### Description

The analyzer produces this diagnostic when a value of a key-value pair in a
map literal has a type that isn't assignable to the the value type of the
map literal has a type that isn't assignable to the value type of the
map.

#### Example
Expand Down
2 changes: 1 addition & 1 deletion pkg/analyzer_plugin/doc/tutorial/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ location at which an identifier is defined.

Navigation information can be requested both by an `analysis.getNavigation`
request and by a subscription. If the server has subscribed for navigation
information in some set of files, the the plugin should send the information in
information in some set of files, the plugin should send the information in
an `analysis.navigation` notification whenever the information needs to be
updated.

Expand Down
2 changes: 1 addition & 1 deletion pkg/compiler/lib/src/commandline_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class Flags {
// `--no-shipping` and `--canary` control sets of flags. For simplicity, these
// flags live in options.dart.
// Shipping features default to on, but can be disabled individually. All
// shipping features can be disabled with the the [noShipping] flag.
// shipping features can be disabled with the [noShipping] flag.
static const String noShipping = '--no-shipping';

// Canary features default to off, but can still be enabled individually. All
Expand Down
2 changes: 1 addition & 1 deletion pkg/compiler/lib/src/io/position_information.dart
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ class PositionTraceListener extends TraceListener
/// code using [kind] to determine what information to use.
///
/// For most nodes the start position of the source information is used.
/// For instance a return expression points to the the start position of the
/// For instance a return expression points to the start position of the
/// source information, typically the start of the return statement that
/// created the JavaScript return node:
///
Expand Down
2 changes: 1 addition & 1 deletion pkg/dart2js_info/lib/src/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ String longName(Info info, {bool useLibraryUri = false, bool forId = false}) {
if (!first) sb.write('.');
// TODO(sigmund): ensure that the first segment is a LibraryInfo.
// assert(!first || segment is LibraryInfo);
// (today might not be true for for closure classes).
// (today might not be true for closure classes).
if (segment is LibraryInfo) {
// TODO(kevmoo): Remove this when dart2js can be invoked with an app-root
// custom URI
Expand Down
2 changes: 1 addition & 1 deletion pkg/dds/test/dap/integration/debug_breakpoints_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void main(List<String> args) async {
),
);

// Step in and expect stopping in the the other package.
// Step in and expect stopping in the other package.
await Future.wait([
client.expectStop('step', sourceName: '$otherPackageUri'),
client.stepIn(stop.threadId!),
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev_compiler/lib/src/compiler/shared_compiler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ abstract class SharedCompiler<Library, Class, InterfaceType, FunctionNode> {
js_ast.Expression emitConstructorAccess(InterfaceType type);

/// When compiling the body of a `operator []=` method, this will be non-null
/// and will indicate the the value that should be returned from any `return;`
/// and will indicate the value that should be returned from any `return;`
/// statements.
js_ast.Identifier get _operatorSetResult {
var stack = _operatorSetResultStack;
Expand Down
2 changes: 1 addition & 1 deletion pkg/front_end/lib/src/fasta/builder/class_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ abstract class ClassBuilder implements DeclarationBuilder {
Member? lookupInstanceMember(ClassHierarchy hierarchy, Name name,
{bool isSetter: false, bool isSuper: false});

/// Looks up the constructor by [name] on the the class built by this class
/// Looks up the constructor by [name] on the class built by this class
/// builder.
///
/// If [isSuper] is `true`, constructors in the superclass are searched.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3106,7 +3106,7 @@ class ClassHierarchyNodeBuilder {
new DelayedTypeComputation(this, classMember, overriddenMembers);
hierarchy.registerDelayedTypeComputation(computation);

/// Declared members must be checked to validly override the the
/// Declared members must be checked to validly override the
/// overridden members.
hierarchy.registerOverrideCheck(
classBuilder as SourceClassBuilder, classMember, overriddenMembers);
Expand Down
4 changes: 2 additions & 2 deletions pkg/front_end/lib/src/kernel_generator_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Future<CompilerResult> generateKernelInternal(
List<Component> loadedComponents = <Component>[];

Component? sdkSummary = await options.loadSdkSummary(null);
// By using the nameRoot of the the summary, we enable sharing the
// By using the nameRoot of the summary, we enable sharing the
// sdkSummary between multiple invocations.
CanonicalName nameRoot = sdkSummary?.root ?? new CanonicalName.root();
if (sdkSummary != null) {
Expand Down Expand Up @@ -114,7 +114,7 @@ Future<CompilerResult> generateKernelInternal(
// Create the requested component ("truncating" or not).
//
// Note: we don't pass the library argument to the constructor to
// preserve the the libraries parent pointer (it should continue to point
// preserve the libraries parent pointer (it should continue to point
// to the component within KernelTarget).
Component trimmedSummaryComponent =
new Component(nameRoot: summaryComponent.root)
Expand Down
2 changes: 1 addition & 1 deletion pkg/js/proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ class Auth {
}

// Note: package:js will defined some helpers like this.
// More research is needed to find all of the the common patterns.
// More research is needed to find all of the common patterns.
static Stream<T> CreateStream<T>(
@JS() Func0 Function(Func1<T, void> nextOrObserver, [Func1 opt_error])
subscribeToEvent) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/modular_test/test/pipeline_common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ abstract class PipelineTestStrategy<S extends ModularStep> {
bool requestDependenciesData: true});

/// Create a step that applies [action] only on the main module [inputId] data
/// and the the [depId] data of transitive dependencies and finally emits a
/// and the [depId] data of transitive dependencies and finally emits a
/// result with the given [resultId].
///
/// [depId] may be the same as [inputId] but not [resultId] since this action
Expand Down
4 changes: 2 additions & 2 deletions pkg/nnbd_migration/test/edge_builder_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5367,7 +5367,7 @@ void g() {
Future<void>
test_methodInvocation_typeParameter_inferred_inGenericClass() async {
// this creates an edge case because the typeArguments are not equal in
// length the the typeFormals of the calleeType, due to the enclosing
// length the typeFormals of the calleeType, due to the enclosing
// generic class.
await analyze('''
class C<T> {
Expand All @@ -5393,7 +5393,7 @@ class C<T> {
Future<void>
test_methodInvocation_typeParameter_inferred_inGenericExtreme() async {
// this creates an edge case because the typeArguments are not equal in
// length the the typeFormals of the calleeType, due to the enclosing
// length the typeFormals of the calleeType, due to the enclosing
// generic class/functions.
await analyze('''
class C<T> {
Expand Down
2 changes: 1 addition & 1 deletion pkg/test_runner/lib/src/test_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* The first message should have [is_first_message] set, the last message
* should have [is_done] set. Status updates should have [is_status_update] set.
*
* The [message_content] can be be any content. In our case it will a list of
* The [message_content] can be any content. In our case it will a list of
* events encoded in JSON. See the next comment further down about what an event
* is.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* }
* </pre>
* <p>
* In addition the the [error codes](http://www.jsonrpc.org/specification#error_object) specified in
* In addition the [error codes](http://www.jsonrpc.org/specification#error_object) specified in
* the JSON-RPC spec, we use the following application specific error codes:
*
* <pre>
Expand Down
2 changes: 1 addition & 1 deletion runtime/bin/security_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ Dart_Handle X509Helper::GetDer(Dart_NativeArguments args) {
Dart_PropagateError(status);
}

// When the the second argument points to a non-NULL buffer address,
// When the second argument points to a non-NULL buffer address,
// i2d_X509 fills that buffer with the DER encoded cert data and increments
// the buffer pointer.
unsigned char* tmp = static_cast<unsigned char*>(dart_cert_bytes);
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/dart_entry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ ArrayPtr ArgumentsDescriptor::New(intptr_t type_args_len,
ASSERT(num_arguments >= 0);
const intptr_t num_pos_args = num_arguments - num_named_args;

// Build the arguments descriptor array, which consists of the the type
// Build the arguments descriptor array, which consists of the type
// argument vector length (0 if none); total argument count; the positional
// argument count; a sequence of (name, position) pairs, sorted by name, for
// each named optional argument; and a terminating null to simplify iterating
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class BreakpointLocation {
// There may be more than one CodeBreakpoint for one BreakpointLocation,
// e.g. when a function gets compiled as a regular function and as a closure.
// There may be more than one BreakpointLocation associated with CodeBreakpoint,
// one for for every isolate in a group that sets a breakpoint at particular
// one for every isolate in a group that sets a breakpoint at particular
// code location represented by the CodeBreakpoint.
// Each BreakpointLocation might be enabled/disabled based on whether it has
// any actual breakpoints associated with it.
Expand Down
2 changes: 1 addition & 1 deletion sdk/lib/_http/http.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ abstract class Cookie {

/**
* Returns the formatted string representation of the cookie. The
* string representation can be used for for setting the Cookie or
* string representation can be used for setting the Cookie or
* 'set-cookie' headers
*/
String toString();
Expand Down
2 changes: 1 addition & 1 deletion sdk/lib/_internal/vm/lib/string_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ abstract class _StringBase implements String {
if (replacement == null) throw new ArgumentError.notNull("replacement");

int startIndex = 0;
// String fragments that replace the the prefix [this] up to [startIndex].
// String fragments that replace the prefix [this] up to [startIndex].
List matches = [];
int length = 0; // Length of all fragments.
int replacementLength = replacement.length;
Expand Down
Loading

0 comments on commit d041cf0

Please sign in to comment.