Fix a batch of long lines

Change-Id: I9ae610f7e6e588ecec961af9ea72dcf6ee1751b7
Reviewed-on: https://dart-review.googlesource.com/57506
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
This commit is contained in:
Peter von der Ahé 2018-05-31 12:25:22 +00:00 committed by commit-bot@chromium.org
parent 796f5301dd
commit b3bae4262d
14 changed files with 93 additions and 80 deletions

View file

@ -94,8 +94,8 @@ class CompilerOptions {
/// program.
///
/// The components provided here should be closed and acyclic: any libraries
/// that they reference should be defined in a component in [linkedDependencies]
/// or any of the [inputSummaries] or [sdkSummary].
/// that they reference should be defined in a component in
/// [linkedDependencies] or any of the [inputSummaries] or [sdkSummary].
List<Uri> linkedDependencies = [];
/// URI of the SDK summary file (typically a "file:" URI).
@ -175,8 +175,8 @@ class CompilerOptions {
// verbose data (Issue #30056)
bool verbose = false;
/// Whether to run extra verification steps to validate that compiled components
/// are well formed.
/// Whether to run extra verification steps to validate that compiled
/// components are well formed.
///
/// Errors are reported via the [onError] callback.
// TODO(sigmund): ensure we don't print errors to stdout (Issue #30056)

View file

@ -83,8 +83,8 @@ class ErrorSeverity implements Comparable<ErrorSeverity> {
static const ErrorSeverity INFO = const ErrorSeverity('INFO', 1, "I", "info");
/**
* The severity representing a warning. Warnings can become errors if the `-Werror` command
* line flag is specified.
* The severity representing a warning. Warnings can become errors if the
* `-Werror` command line flag is specified.
*/
static const ErrorSeverity WARNING =
const ErrorSeverity('WARNING', 2, "W", "warning");

View file

@ -104,18 +104,18 @@ class ProcessedOptions {
/// The SDK summary, or `null` if it has not been read yet.
///
/// A summary, also referred to as "outline" internally, is a [Component] where
/// all method bodies are left out. In essence, it contains just API
/// signatures and constants. When strong-mode is enabled, the summary already
/// includes inferred types.
/// A summary, also referred to as "outline" internally, is a [Component]
/// where all method bodies are left out. In essence, it contains just API
/// signatures and constants. When strong-mode is enabled, the summary
/// already includes inferred types.
Component _sdkSummaryComponent;
/// The summary for each uri in `options.inputSummaries`.
///
/// A summary, also referred to as "outline" internally, is a [Component] where
/// all method bodies are left out. In essence, it contains just API
/// signatures and constants. When strong-mode is enabled, the summary already
/// includes inferred types.
/// A summary, also referred to as "outline" internally, is a [Component]
/// where all method bodies are left out. In essence, it contains just API
/// signatures and constants. When strong-mode is enabled, the summary
/// already includes inferred types.
List<Component> _inputSummariesComponents;
/// Other components that are meant to be linked and compiled with the input

View file

@ -34,24 +34,28 @@ abstract class BasicSource extends Source {
}
/**
* The interface `Source` defines the behavior of objects representing source code that can be
* analyzed by the analysis engine.
* The interface `Source` defines the behavior of objects representing source
* code that can be analyzed by the analysis engine.
*
* Implementations of this interface need to be aware of some assumptions made by the analysis
* engine concerning sources:
* * Sources are not required to be unique. That is, there can be multiple instances representing
* the same source.
* * Sources are long lived. That is, the engine is allowed to hold on to a source for an extended
* period of time and that source must continue to report accurate and up-to-date information.
* Because of these assumptions, most implementations will not maintain any state but will delegate
* to an authoritative system of record in order to implement this API. For example, a source that
* represents files on disk would typically query the file system to determine the state of the
* file.
* Implementations of this interface need to be aware of some assumptions made
* by the analysis engine concerning sources:
*
* If the instances that implement this API are the system of record, then they will typically be
* unique. In that case, sources that are created that represent non-existent files must also be
* retained so that if those files are created at a later date the long-lived sources representing
* those files will know that they now exist.
* * Sources are not required to be unique. That is, there can be multiple
* instances representing the same source.
* * Sources are long lived. That is, the engine is allowed to hold on to a
* source for an extended period of time and that source must continue to
* report accurate and up-to-date information.
*
* Because of these assumptions, most implementations will not maintain any
* state but will delegate to an authoritative system of record in order to
* implement this API. For example, a source that represents files on disk
* would typically query the file system to determine the state of the file.
*
* If the instances that implement this API are the system of record, then they
* will typically be unique. In that case, sources that are created that
* represent non-existent files must also be retained so that if those files
* are created at a later date the long-lived sources representing those files
* will know that they now exist.
*/
abstract class Source implements AnalysisTarget {
/**
@ -63,8 +67,8 @@ abstract class Source implements AnalysisTarget {
* Get the contents and timestamp of this source.
*
* Clients should consider using the method [AnalysisContext.getContents]
* because contexts can have local overrides of the content of a source that the source is not
* aware of.
* because contexts can have local overrides of the content of a source that
* the source is not aware of.
*
* @return the contents and timestamp of the source
* @throws Exception if the contents of this source could not be accessed
@ -72,8 +76,8 @@ abstract class Source implements AnalysisTarget {
TimestampedData<String> get contents;
/**
* Return an encoded representation of this source that can be used to create a source that is
* equal to this source.
* Return an encoded representation of this source that can be used to create
* a source that is equal to this source.
*
* @return an encoded representation of this source
* See [SourceFactory.fromEncoding].
@ -81,9 +85,9 @@ abstract class Source implements AnalysisTarget {
String get encoding;
/**
* Return the full (long) version of the name that can be displayed to the user to denote this
* source. For example, for a source representing a file this would typically be the absolute path
* of the file.
* Return the full (long) version of the name that can be displayed to the
* user to denote this source. For example, for a source representing a file
* this would typically be the absolute path of the file.
*
* @return a name that can be displayed to the user to denote this source
*/
@ -112,9 +116,10 @@ abstract class Source implements AnalysisTarget {
* Return the modification stamp for this source, or a negative value if the
* source does not exist. A modification stamp is a non-negative integer with
* the property that if the contents of the source have not been modified
* since the last time the modification stamp was accessed then the same value
* will be returned, but if the contents of the source have been modified one
* or more times (even if the net change is zero) the stamps will be different.
* since the last time the modification stamp was accessed then the same
* value will be returned, but if the contents of the source have been
* modified one or more times (even if the net change is zero) the stamps
* will be different.
*
* Clients should consider using the method
* [AnalysisContext.getModificationStamp] because contexts can have local
@ -123,8 +128,9 @@ abstract class Source implements AnalysisTarget {
int get modificationStamp;
/**
* Return a short version of the name that can be displayed to the user to denote this source. For
* example, for a source representing a file this would typically be the name of the file.
* Return a short version of the name that can be displayed to the user to
* denote this source. For example, for a source representing a file this
* would typically be the name of the file.
*
* @return a name that can be displayed to the user to denote this source
*/
@ -141,22 +147,23 @@ abstract class Source implements AnalysisTarget {
Uri get uri;
/**
* Return the kind of URI from which this source was originally derived. If this source was
* created from an absolute URI, then the returned kind will reflect the scheme of the absolute
* URI. If it was created from a relative URI, then the returned kind will be the same as the kind
* of the source against which the relative URI was resolved.
* Return the kind of URI from which this source was originally derived. If
* this source was created from an absolute URI, then the returned kind will
* reflect the scheme of the absolute URI. If it was created from a relative
* URI, then the returned kind will be the same as the kind of the source
* against which the relative URI was resolved.
*
* @return the kind of URI from which this source was originally derived
*/
UriKind get uriKind;
/**
* Return `true` if the given object is a source that represents the same source code as
* this source.
* Return `true` if the given object is a source that represents the same
* source code as this source.
*
* @param object the object to be compared with this object
* @return `true` if the given object is a source that represents the same source code as
* this source
* @return `true` if the given object is a source that represents the same
* source code as this source
* See [Object.==].
*/
@override
@ -166,8 +173,9 @@ abstract class Source implements AnalysisTarget {
* Return `true` if this source exists.
*
* Clients should consider using the method [AnalysisContext.exists] because
* contexts can have local overrides of the content of a source that the source is not aware of
* and a source with local content is considered to exist even if there is no file on disk.
* contexts can have local overrides of the content of a source that the
* source is not aware of and a source with local content is considered to
* exist even if there is no file on disk.
*
* @return `true` if this source exists
*/

View file

@ -3,8 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
/**
* The enumeration `UriKind` defines the different kinds of URI's that are known to the
* analysis engine. These are used to keep track of the kind of URI associated with a given source.
* The enumeration `UriKind` defines the different kinds of URI's that are
* known to the analysis engine. These are used to keep track of the kind of
* URI associated with a given source.
*/
class UriKind implements Comparable<UriKind> {
/**

View file

@ -60,8 +60,8 @@ abstract class GeneratedContent {
for (GeneratedContent target in targets) {
bool ok = await target.check(pkgPath);
if (!ok) {
print(
'${target.output(pkgPath).absolute} does not have expected contents.');
print("${target.output(pkgPath).absolute}"
" doesn't have expected contents.");
generateNeeded = true;
}
}

View file

@ -12,8 +12,8 @@ import 'ticker.dart' show Ticker;
/// A compilation target.
///
/// A target reads source files with [read], builds outlines when
/// [buildOutlines] is called and builds the full component when [buildComponent]
/// is called.
/// [buildOutlines] is called and builds the full component when
/// [buildComponent] is called.
abstract class Target {
final Ticker ticker;

View file

@ -227,10 +227,10 @@ class TypeConstraintGatherer {
var subtypeArg = subtype.typeArguments[0];
if (supertype is InterfaceType &&
identical(supertype.classNode, environment.futureOrClass)) {
// `FutureOr<P>` is a subtype match for `FutureOr<Q>` with respect to `L`
// under constraints `C`:
// - If `P` is a subtype match for `Q` with respect to `L` under constraints
// `C`.
// `FutureOr<P>` is a subtype match for `FutureOr<Q>` with respect to
// `L` under constraints `C`:
// - If `P` is a subtype match for `Q` with respect to `L` under
// constraints `C`.
var supertypeArg = supertype.typeArguments[0];
return _isSubtypeMatch(subtypeArg, supertypeArg);
}
@ -252,8 +252,8 @@ class TypeConstraintGatherer {
// constraints `C`:
// - If `P` is a subtype match for `Future<Q>` with respect to `L` under
// constraints `C`.
// - Or `P` is not a subtype match for `Future<Q>` with respect to `L` under
// constraints `C`
// - Or `P` is not a subtype match for `Future<Q>` with respect to `L`
// under constraints `C`
// - And `P` is a subtype match for `Q` with respect to `L` under
// constraints `C`
var supertypeArg = supertype.typeArguments[0];

View file

@ -235,8 +235,8 @@ abstract class TypeInferenceEngine {
/// corresponding fields.
void finishTopLevelInitializingFormals();
/// Gets ready to do top level type inference for the component having the given
/// [hierarchy], using the given [coreTypes].
/// Gets ready to do top level type inference for the component having the
/// given [hierarchy], using the given [coreTypes].
void prepareTopLevel(CoreTypes coreTypes, ClassHierarchy hierarchy);
/// Records that the given initializing [formal] will need top level type

View file

@ -483,16 +483,16 @@ abstract class TypePromoterImpl extends TypePromoter {
/// represents all facts that are known to hold at a certain point in the
/// component.
///
/// The fact is said to "apply" to a given point in the execution of the component
/// if the fact is part of the current fact state at the point the parser
/// reaches that point in the component.
/// The fact is said to "apply" to a given point in the execution of the
/// component if the fact is part of the current fact state at the point the
/// parser reaches that point in the component.
///
/// Note: just because a fact "applies" to a given point in the execution of the
/// component doesn't mean a type will be promoted--it simply means that the fact
/// was deduced at a previous point in the straight line execution of the code.
/// It's possible that the fact will be overshadowed by a later fact, or its
/// effect will be cancelled by a later assignment. The final detemination of
/// whether promotion occurs is left to [_computePromotedType].
/// Note: just because a fact "applies" to a given point in the execution of
/// the component doesn't mean a type will be promoted--it simply means that
/// the fact was deduced at a previous point in the straight line execution of
/// the code. It's possible that the fact will be overshadowed by a later
/// fact, or its effect will be cancelled by a later assignment. The final
/// detemination of whether promotion occurs is left to [_computePromotedType].
abstract class TypePromotionFact {
/// The variable this fact records information about, or `null` if this fact
/// records information about general flow control.

View file

@ -49,7 +49,8 @@ class ScannerErrorCode extends ErrorCode {
const ScannerErrorCode(
'UNTERMINATED_MULTI_LINE_COMMENT', "Unterminated multi-line comment.",
correction: "Try terminating the comment with '*/', or "
"removing any unbalanced occurances of '/*' (because comments nest in Dart).");
"removing any unbalanced occurances of '/*'"
" (because comments nest in Dart).");
static const ScannerErrorCode UNTERMINATED_STRING_LITERAL =
const ScannerErrorCode(

View file

@ -333,7 +333,8 @@ class TypeInfoTest {
'handleType int )',
'handleNoName )',
'handleFormalParameterWithoutValue )',
'beginTypeVariables null null ) FormalParameterKind.mandatory MemberKind.GeneralizedFunctionType',
'beginTypeVariables null null ) FormalParameterKind.mandatory'
' MemberKind.GeneralizedFunctionType',
'endFormalParameters 1 ( ) MemberKind.GeneralizedFunctionType',
'endFunctionType Function m',
]);

View file

@ -114,7 +114,8 @@ Future writeDepsFile(
//
// It's broken if it says something like this:
//
// ninja explain: expected depfile 'vm_platform.dill.d' to mention 'vm_platform.dill', got '/.../xcodebuild/ReleaseX64/vm_platform.dill'
// ninja explain: expected depfile 'vm_platform.dill.d' to mention \
// 'vm_platform.dill', got '/.../xcodebuild/ReleaseX64/vm_platform.dill'
return Uri.parse(relativizeUri(uri, base: Uri.base)).toFilePath();
}

View file

@ -20,8 +20,9 @@ main(List<String> args) {
writeComponentToText(component);
}
/// Creates a component that contains all of the context code marked as external,
/// and all libraries defined in partial.dill as they are written in that file.
/// Creates a component that contains all of the context code marked as
/// external, and all libraries defined in partial.dill as they are written in
/// that file.
Component _loadComponent(List<String> args) {
List<int> partialInput = new File(args[0]).readAsBytesSync();