diff --git a/source/dub/commandline.d b/source/dub/commandline.d index 8729b63..03a2521 100644 --- a/source/dub/commandline.d +++ b/source/dub/commandline.d @@ -867,7 +867,7 @@ /// Caption of the command category string caption; - /// List of commands contained inthis group + /// List of commands contained in this group Command[] commands; this(string caption, Command[] commands...) @safe pure nothrow @@ -926,8 +926,8 @@ "By default, the current working directory is used.", "", "Custom templates can be defined by packages by providing a sub-package called \"init-exec\". No default source files are added in this case.", - "The \"init-exec\" subpackage is compiled and executed inside the destination folder after the base project directory has been created.", - "Free arguments \"dub init -t custom -- free args\" are passed into the \"init-exec\" subpackage as app arguments." + "The \"init-exec\" sub-package is compiled and executed inside the destination folder after the base project directory has been created.", + "Free arguments \"dub init -t custom -- free args\" are passed into the \"init-exec\" sub-package as app arguments." ]; this.acceptsAppArgs = true; } @@ -1338,7 +1338,7 @@ // the user provided a version manually dep = VersionRange.fromString(packageParts.version_); } else if (packageParts.name.startsWith(":")) { - // Subpackages are always assumed to be present + // Sub-packages are always assumed to be present return 0; } else if (dub.packageManager.getBestPackage(packageParts.name)) { // found locally diff --git a/source/dub/compilers/buildsettings.d b/source/dub/compilers/buildsettings.d index 315dec0..c7b06b0 100644 --- a/source/dub/compilers/buildsettings.d +++ b/source/dub/compilers/buildsettings.d @@ -88,7 +88,7 @@ * Merges $(LREF bs) onto `this` BuildSettings instance. This is called for * sourceLibrary dependencies when they are included in the build to be * merged into the root package build settings as well as configuring - * targets for different build types such as release or unittest-cov. + * targets for different build types such as `release` or `unittest-cov`. */ void add(in BuildSettings bs) { @@ -188,14 +188,14 @@ : vals; } - // Append vals to arr without adding duplicates. + // Append `vals` to `arr` without adding duplicates. static void add(ref string[] arr, in string[] vals, bool noDuplicates = true) { // vals might contain duplicates, add each val individually foreach (val; vals) arr ~= filterDuplicates(arr, [val], noDuplicates); } - // Append vals to AA + // Append `vals` to `aa` static void add(ref string[string] aa, in string[string] vals) { // vals might contain duplicated keys, add each val individually @@ -203,7 +203,7 @@ if (key !in aa) aa[key] = val; } - // Update vals to AA + // Update `vals` to `aa` static void update(ref string[string] aa, in string[string] vals) { // If there are duplicate keys, they will be ignored and overwritten. @@ -222,7 +222,7 @@ assert(ary == ["-dip1000", "-vgc", "-dip1001", "-vgc", "-dupflag", "-notdupflag"]); } - // Prepend arr by vals without adding duplicates. + // Prepend `arr` by `vals` without adding duplicates. static void prepend(ref string[] arr, in string[] vals, bool noDuplicates = true) { import std.range : retro; @@ -389,7 +389,7 @@ profileGC = 1<<21, /// Profile runtime allocations pic = 1<<22, /// Generate position independent code betterC = 1<<23, /// Compile in betterC mode (-betterC) - lowmem = 1<<24, /// Compile in lowmem mode (-lowmem) + lowmem = 1<<24, /// Compile in low-memory mode (-lowmem) coverageCTFE = 1<<25, /// Enable code coverage analysis including at compile-time (-cov=ctfe) color = 1<<26, /// Colorize output (-color) diff --git a/source/dub/compilers/dmd.d b/source/dub/compilers/dmd.d index 2039747..166f6b5 100644 --- a/source/dub/compilers/dmd.d +++ b/source/dub/compilers/dmd.d @@ -128,7 +128,7 @@ arch_override ); - /// Replace archticture string in `bp.archtiecture` + /// Replace architecture string in `bp.architecture` void replaceArch(const string from, const string to) { const idx = bp.architecture.countUntil(from); diff --git a/source/dub/dependency.d b/source/dub/dependency.d index 8fc01ba..79392fb 100644 --- a/source/dub/dependency.d +++ b/source/dub/dependency.d @@ -104,7 +104,7 @@ this.m_value = rng; } - deprecated("Instantiate the `Repository` struct with the string directy") + deprecated("Instantiate the `Repository` struct with the string directly") this(Repository repository, string spec) @safe { assert(repository.m_ref is null); diff --git a/source/dub/description.d b/source/dub/description.d index f26563b..bf580bd 100644 --- a/source/dub/description.d +++ b/source/dub/description.d @@ -83,8 +83,8 @@ string mainSourceFile; string[] dflags; /// Flags passed to the D compiler string[] lflags; /// Flags passed to the linker - string[] libs; /// Librariy names to link against (typically using "-l") - string[] injectSourceFiles; /// Files that should be injected when this package is dependend upon by a binary image. + string[] libs; /// Library names to link against (typically using "-l") + string[] injectSourceFiles; /// Files that should be injected when this package is dependent upon by a binary image. string[] copyFiles; /// Files to copy to the target directory string[] extraDependencyFiles; /// Files to check for rebuild dub project string[] versions; /// D version identifiers to set diff --git a/source/dub/dub.d b/source/dub/dub.d index 7a78711..b469131 100644 --- a/source/dub/dub.d +++ b/source/dub/dub.d @@ -457,7 +457,7 @@ /** Loads a single file package. - Single-file packages are D files that contain a package receipe comment + Single-file packages are D files that contain a package recipe comment at their top. A recipe comment must be a nested `/+ ... +/` style comment, containing the virtual recipe file name and a colon, followed by the recipe contents (what would normally be in dub.sdl/dub.json). @@ -901,7 +901,7 @@ return m_packageManager.store(path, location, basePackageName, ver); } catch (ZipException e) { logInfo("Failed to extract zip archive for %s %s...", packageId, ver); - // rethrow the exception at the end of the loop + // re-throw the exception at the end of the loop if (i == 0) throw e; } @@ -1083,7 +1083,7 @@ m_packageManager.addSearchPath(makeAbsolute(path), system ? PlacementLocation.system : PlacementLocation.user); } - /** Unregisters a local directory search path. + /** Un-registers a local directory search path. Params: path = Path to a directory containing package directories @@ -1517,7 +1517,7 @@ { none = 0, upgrade = 1<<1, /// Upgrade existing packages - preRelease = 1<<2, /// inclde pre-release versions in upgrade + preRelease = 1<<2, /// include pre-release versions in upgrade forceRemove = 1<<3, /// Deprecated, does nothing. select = 1<<4, /// Update the dub.selections.json file with the upgraded versions dryRun = 1<<5, /// Instead of downloading new packages, just print a message to notify the user of their existence @@ -1654,7 +1654,7 @@ auto ret = appender!(TreeNodes[]); auto pack = getPackage(node.pack, node.config); if (!pack) { - // this can hapen when the package description contains syntax errors + // this can happen when the package description contains syntax errors logDebug("Invalid package in dependency tree: %s %s", node.pack, node.config); return null; } @@ -1874,8 +1874,8 @@ * * Versions of dub prior to v1.31.0 used to store artifact under the * project directory, but this led to issues with packages stored on - * read-only filesystem / location, and lingering artifacts scattered - * through the filesystem. + * read-only file system / location, and lingering artifacts scattered + * through the file system. */ NativePath cache; diff --git a/source/dub/generators/generator.d b/source/dub/generators/generator.d index 6aff2d6..2579880 100644 --- a/source/dub/generators/generator.d +++ b/source/dub/generators/generator.d @@ -772,8 +772,8 @@ * * Artifacts are usually stored in: * `$DUB_HOME/cache/$PKG_NAME/$PKG_VERSION[/+$SUB_PKG_NAME]/` - * Note that the leading `+` in the subpackage name is to avoid any ambiguity. - * Build artifacts are usually stored in a subfolder named "build", + * Note that the leading `+` in the sub-package name is to avoid any ambiguity. + * Build artifacts are usually stored in a sub-folder named "build", * as their names are based on user-supplied values. * * Params: @@ -1013,7 +1013,7 @@ /** Runs a list of build commands for a particular package. - This function sets all DUB speficic environment variables and makes sure + This function sets all DUB specific environment variables and makes sure that recursive dub invocations are detected and don't result in infinite command execution loops. The latter could otherwise happen when a command runs "dub describe" or similar functionality. diff --git a/source/dub/init.d b/source/dub/init.d index 2e835a6..bb7da7f 100644 --- a/source/dub/init.d +++ b/source/dub/init.d @@ -164,7 +164,7 @@ * most users. However, this file is not mandatory for `dub` to do its job, * so we do not depend on the content. * One important use case we need to support is people running `dub init` on - * a Github-initialized repository. Those might already contain a `.gitignore` + * a GitHub-initialized repository. Those might already contain a `.gitignore` * (and a README and a LICENSE), thus we should not bail out if the file already * exists, just ignore it. * diff --git a/source/dub/internal/configy/Attributes.d b/source/dub/internal/configy/Attributes.d index 7823471..7829064 100644 --- a/source/dub/internal/configy/Attributes.d +++ b/source/dub/internal/configy/Attributes.d @@ -121,7 +121,7 @@ /******************************************************************************* - A field which carries informations about whether it was set or not + A field which carries information about whether it was set or not Some configurations may need to know which fields were set explicitly while keeping defaults. An example of this is a `struct` where at least one field diff --git a/source/dub/internal/configy/Exceptions.d b/source/dub/internal/configy/Exceptions.d index e225303..00a6349 100644 --- a/source/dub/internal/configy/Exceptions.d +++ b/source/dub/internal/configy/Exceptions.d @@ -97,7 +97,7 @@ public override string toString () scope { - // Need to be overriden otherwise the overload is shadowed + // Need to be overridden, otherwise the overload is shadowed return super.toString(); } diff --git a/source/dub/internal/configy/FieldRef.d b/source/dub/internal/configy/FieldRef.d index a04a23c..1af4b67 100644 --- a/source/dub/internal/configy/FieldRef.d +++ b/source/dub/internal/configy/FieldRef.d @@ -33,7 +33,7 @@ To prevent this from happening, we always pass around a `FieldRef`, which wraps the parent struct type (`T`), the name of the field - as `FieldName`, and other informations. + as `FieldName`, and other information. To avoid any issue, eponymous usage is also avoided, hence the reference needs to be accessed using `Ref`. diff --git a/source/dub/internal/configy/Read.d b/source/dub/internal/configy/Read.d index f807456..44afcf1 100644 --- a/source/dub/internal/configy/Read.d +++ b/source/dub/internal/configy/Read.d @@ -98,7 +98,7 @@ Those forms are mutually exclusive, so a field with a unit suffix will error out if a mapping is used. This prevents surprises and ensures - that the error message, if any, is consistent accross user input. + that the error message, if any, is consistent across user input. To disable or change this behavior, one may use a `Converter` instead. @@ -109,7 +109,7 @@ This can be useful to catch typos or outdated configuration options. Post_Validation: - Some configuration will require validation accross multiple sections. + Some configuration will require validation across multiple sections. For example, two sections may be mutually exclusive as a whole, or may have fields which are mutually exclusive with another section's field(s). This kind of dependence is hard to account for declaratively, @@ -232,7 +232,7 @@ { return getopt( args, - // `caseInsensistive` is the default, but we need something + // `caseInsensitive` is the default, but we need something // with the same type for the ternary passThrough ? config.keepEndOfOptions : config.caseInsensitive, // Also the default, same reasoning @@ -682,7 +682,7 @@ Because a `struct` can be filled from either a mapping or a scalar, this function will first try the converter / fromString / string ctor - methods before defaulting to fieldwise construction. + methods before defaulting to field-wise construction. Note that optional fields are checked before recursion happens, so this method does not do this check. @@ -997,7 +997,7 @@ } } -/// Retun value of `isMappingEnabled` +/// Return value of `isMappingEnabled` private struct EnabledState { /// Used to determine which field controls a mapping enabled state diff --git a/source/dub/internal/dyaml/constructor.d b/source/dub/internal/dyaml/constructor.d index 2a660a6..a24b313 100644 --- a/source/dub/internal/dyaml/constructor.d +++ b/source/dub/internal/dyaml/constructor.d @@ -49,7 +49,7 @@ /** Constructs YAML values. * * Each YAML scalar, sequence or mapping has a tag specifying its data type. - * Constructor uses user-specifyable functions to create a node of desired + * Constructor uses user-specifiable functions to create a node of desired * data type from a scalar, sequence or mapping. * * diff --git a/source/dub/internal/dyaml/node.d b/source/dub/internal/dyaml/node.d index 45a25b7..687337c 100644 --- a/source/dub/internal/dyaml/node.d +++ b/source/dub/internal/dyaml/node.d @@ -429,7 +429,7 @@ /** Equality test. * - * If T is Node, recursively compares all subnodes. + * If T is Node, recursively compares all sub-nodes. * This might be quite expensive if testing entire documents. * * If T is not Node, gets a value of type T from the node and tests @@ -486,7 +486,7 @@ /** Get the value of the node as specified type. * - * If the specifed type does not match type in the node, + * If the specified type does not match type in the node, * conversion is attempted. The stringConversion template * parameter can be used to disable conversion from non-string * types to strings. @@ -494,8 +494,8 @@ * Numeric values are range checked, throwing if out of range of * requested type. * - * Timestamps are stored as std.datetime.SysTime. - * Binary values are decoded and stored as ubyte[]. + * Timestamps are stored as `std.datetime.SysTime`. + * Binary values are decoded and stored as `ubyte[]`. * * To get a null value, use get!YAMLNull . This is to * prevent getting null values for types such as strings or classes. @@ -1126,7 +1126,7 @@ * * If the node is a mapping and no key matches index, a new key-value * pair is added to the mapping. In sequences the index must be in - * range. This ensures behavior siilar to D arrays and associative + * range. This ensures behavior similar to D arrays and associative * arrays. * * To set element at a null index, use YAMLNull for index. @@ -1899,7 +1899,7 @@ assert("a" in iNode); } - /** Remove first (if any) occurence of a value in a collection. + /** Remove first (if any) occurrence of a value in a collection. * * This method can only be called on collection nodes. * @@ -1950,7 +1950,7 @@ * key matches index. * * If the node is a mapping and no key matches index, nothing is removed - * and no exception is thrown. This ensures behavior siilar to D arrays + * and no exception is thrown. This ensures behavior similar to D arrays * and associative arrays. * * Params: index = Index to remove at. diff --git a/source/dub/internal/dyaml/reader.d b/source/dub/internal/dyaml/reader.d index c294ab0..45836ba 100644 --- a/source/dub/internal/dyaml/reader.d +++ b/source/dub/internal/dyaml/reader.d @@ -95,7 +95,7 @@ /// `""` if the buffer is the contents of a string. /// /// Throws: ReaderException on a UTF decoding error or if there are - /// nonprintable Unicode characters illegal in YAML. + /// non-printable Unicode characters illegal in YAML. this(ubyte[] buffer, string name = "") @safe pure { name_ = name; diff --git a/source/dub/internal/dyaml/scanner.d b/source/dub/internal/dyaml/scanner.d index 3be567f..0e652a3 100644 --- a/source/dub/internal/dyaml/scanner.d +++ b/source/dub/internal/dyaml/scanner.d @@ -360,7 +360,7 @@ // restrictive than what the specification requires. // if(pedantic_ && flowLevel_ > 0 && indent_ > column) // { - // throw new ScannerException("Invalid intendation or unclosed '[' or '{'", + // throw new ScannerException("Invalid indentation or unclosed '[' or '{'", // reader_.mark) // } return; @@ -399,7 +399,7 @@ ///Add STREAM-END token. void fetchStreamEnd() @safe { - //Set intendation to -1 . + //Set indentation to -1 . unwindIndent(-1); removePossibleSimpleKey(); allowSimpleKey_ = false; @@ -412,7 +412,7 @@ /// Add DIRECTIVE token. void fetchDirective() @safe { - // Set intendation to -1 . + // Set indentation to -1 . unwindIndent(-1); // Reset simple keys. removePossibleSimpleKey(); @@ -497,7 +497,7 @@ void blockChecks(string type, TokenID id)() { enum context = type ~ " keys are not allowed here"; - // Are we allowed to start a key (not neccesarily a simple one)? + // Are we allowed to start a key (not necessarily a simple one)? enforce(allowSimpleKey_, new ScannerException(context, reader_.mark)); if(addIndent(reader_.column)) @@ -1001,7 +1001,7 @@ /// The specification does not restrict characters for anchors and /// aliases. This may lead to problems, for instance, the document: /// [ *alias, value ] - /// can be interpteted in two ways, as + /// can be interpreted in two ways, as /// [ "value" ] /// and /// [ *alias , "value" ] @@ -1208,7 +1208,7 @@ } } - // If chompint is Keep, we keep (commit) the last scanned line breaks + // If chomping is Keep, we keep (commit) the last scanned line breaks // (which are at the end of the scalar). Otherwise re remove them (end the // transaction). if(chomping == Chomping.keep) { breaksTransaction.commit(); } @@ -1360,7 +1360,7 @@ return endMark; } - /// Scan a qouted flow scalar token with specified quotes. + /// Scan a quoted flow scalar token with specified quotes. Token scanFlowScalar(const ScalarStyle quotes) @safe { const startMark = reader_.mark; @@ -1381,7 +1381,7 @@ return scalarToken(startMark, reader_.mark, slice, quotes); } - /// Scan nonspace characters in a flow scalar. + /// Scan non-space characters in a flow scalar. /// /// Assumes that the caller is building a slice in Reader, and puts the scanned /// characters into that slice. diff --git a/source/dub/internal/dyaml/serializer.d b/source/dub/internal/dyaml/serializer.d index 89402f4..ae0d727 100644 --- a/source/dub/internal/dyaml/serializer.d +++ b/source/dub/internal/dyaml/serializer.d @@ -30,7 +30,7 @@ struct Serializer { private: - ///Resolver used to determine which tags are automaticaly resolvable. + ///Resolver used to determine which tags are automatically resolvable. Resolver resolver_; ///Do all document starts have to be specified explicitly? @@ -56,7 +56,7 @@ * Construct a Serializer. * * Params: - * resolver = Resolver used to determine which tags are automaticaly resolvable. + * resolver = Resolver used to determine which tags are automatically resolvable. * explicitStart = Do all document starts have to be specified explicitly? * explicitEnd = Do all document ends have to be specified explicitly? * YAMLVersion = YAML version string. @@ -108,9 +108,9 @@ * Used to prevent associating every single repeating scalar with an * anchor/alias - only nodes long enough can use anchors. * - * Params: node = Node to check for anchorability. + * Params: node = Node to check for anchor-ability. * - * Returns: True if the node is anchorable, false otherwise. + * Returns: True if the node is anchor-able, false otherwise. */ static bool anchorable(ref Node node) @safe { @@ -142,7 +142,7 @@ assert(anchorable(node6)); } - ///Add an anchor to the node if it's anchorable and not anchored yet. + ///Add an anchor to the node if it's anchor-able and not anchored yet. void anchorNode(ref Node node) @safe { if(!anchorable(node)){return;} @@ -187,7 +187,7 @@ return appender.data; } - ///Serialize a node and all its subnodes. + ///Serialize a node and all its sub-nodes. void serializeNode(EmitterT)(ref EmitterT emitter, ref Node node) @safe { //If the node has an anchor, emit an anchor (as aliasEvent) on the diff --git a/source/dub/internal/logging.d b/source/dub/internal/logging.d index 9149a2f..777cdbb 100644 --- a/source/dub/internal/logging.d +++ b/source/dub/internal/logging.d @@ -2,7 +2,7 @@ Handles all the console output of the Dub package manager, by providing useful methods for handling colored text. The module also disables colors when stdout and stderr are not a TTY in order to avoid ASCII escape sequences in piped - output. The module can autodetect and configure itself in this regard by + output. The module can auto-detect and configure itself in this regard by calling initLogging() at the beginning of the program. But, whether to color text or not can also be set manually with setLoggingColorsEnabled(bool). @@ -12,8 +12,8 @@ '----------' fixed width - the "tag" part can be colored (most oftenly will be) and always has a fixed - width, which is defined as a const at the beginning of this module. + the "tag" part can be colored (most often will be) and always has a fixed + width, which is defined as a constant at the beginning of this module. The output for the log levels debug and diagnostic will be just the plain string. @@ -231,7 +231,7 @@ /** Shorthand function to log a message with info level, this version prints an empty tag automatically (which is different from not having a tag - in this - case there will be an identation of tagWidth chars on the left anyway). + case there will be an indentation of tagWidth chars on the left anyway). Params: fmt = See http://dlang.org/phobos/std_format.html#format-string @@ -377,7 +377,7 @@ logInfo("Tag", Color.green, "My %s log message", "colored".color(Color.red)); - without worring whether or not colored output is enabled or not. + without worrying whether or not colored output is enabled or not. Also a mode can be specified, such as bold/underline/etc... diff --git a/source/dub/internal/sdlang/ast.d b/source/dub/internal/sdlang/ast.d index d892ca2..446bc09 100644 --- a/source/dub/internal/sdlang/ast.d +++ b/source/dub/internal/sdlang/ast.d @@ -145,14 +145,14 @@ auto allAttrsIndex = _parent.allAttributes.countUntil(this); _parent.allAttributes.removeIndex(allAttrsIndex); - // Remove from _parent.attributeIndicies - auto sameNamespaceAttrs = _parent.attributeIndicies[_namespace]; - auto attrIndiciesIndex = sameNamespaceAttrs.countUntil(allAttrsIndex); - _parent.attributeIndicies[_namespace].removeIndex(attrIndiciesIndex); + // Remove from _parent.attributeIndices + auto sameNamespaceAttrs = _parent.attributeIndices[_namespace]; + auto attrIndicesIndex = sameNamespaceAttrs.countUntil(allAttrsIndex); + _parent.attributeIndices[_namespace].removeIndex(attrIndicesIndex); - // Fixup other indicies - foreach(ns, ref nsAttrIndicies; _parent.attributeIndicies) - foreach(k, ref v; nsAttrIndicies) + // Fixup other indices + foreach(ns, ref nsAttrIndices; _parent.attributeIndices) + foreach(k, ref v; nsAttrIndices) if(v > allAttrsIndex) v--; @@ -316,8 +316,8 @@ private Tag[] allTags; // In same order as specified in SDL file. private string[] allNamespaces; // In same order as specified in SDL file. - private size_t[][string] attributeIndicies; // allAttributes[ attributes[namespace][i] ] - private size_t[][string] tagIndicies; // allTags[ tags[namespace][i] ] + private size_t[][string] attributeIndices; // allAttributes[ attributes[namespace][i] ] + private size_t[][string] tagIndices; // allTags[ tags[namespace][i] ] private Attribute[][string][string] _attributes; // attributes[namespace or "*"][name][i] private Tag[][string][string] _tags; // tags[namespace or "*"][name][i] @@ -359,7 +359,7 @@ attr._parent = this; allAttributes ~= attr; - attributeIndicies[attr._namespace] ~= allAttributes.length-1; + attributeIndices[attr._namespace] ~= allAttributes.length-1; _attributes[attr._namespace][attr._name] ~= attr; _attributes["*"] [attr._name] ~= attr; @@ -393,7 +393,7 @@ tag._parent = this; allTags ~= tag; - tagIndicies[tag._namespace] ~= allTags.length-1; + tagIndices[tag._namespace] ~= allTags.length-1; _tags[tag._namespace][tag._name] ~= tag; _tags["*"] [tag._name] ~= tag; @@ -433,14 +433,14 @@ auto allTagsIndex = _parent.allTags.countUntil(this); _parent.allTags.removeIndex(allTagsIndex); - // Remove from _parent.tagIndicies - auto sameNamespaceTags = _parent.tagIndicies[_namespace]; - auto tagIndiciesIndex = sameNamespaceTags.countUntil(allTagsIndex); - _parent.tagIndicies[_namespace].removeIndex(tagIndiciesIndex); + // Remove from _parent.tagIndices + auto sameNamespaceTags = _parent.tagIndices[_namespace]; + auto tagIndicesIndex = sameNamespaceTags.countUntil(allTagsIndex); + _parent.tagIndices[_namespace].removeIndex(tagIndicesIndex); - // Fixup other indicies - foreach(ns, ref nsTagIndicies; _parent.tagIndicies) - foreach(k, ref v; nsTagIndicies) + // Fixup other indices + foreach(ns, ref nsTagIndices; _parent.tagIndices) + foreach(k, ref v; nsTagIndices) if(v > allTagsIndex) v--; @@ -452,24 +452,24 @@ private void removeNamespaceIfEmpty(string namespace) { - // If namespace has no attributes, remove it from attributeIndicies/_attributes - if(namespace in attributeIndicies && attributeIndicies[namespace].length == 0) + // If namespace has no attributes, remove it from attributeIndices/_attributes + if(namespace in attributeIndices && attributeIndices[namespace].length == 0) { - attributeIndicies.remove(namespace); + attributeIndices.remove(namespace); _attributes.remove(namespace); } - // If namespace has no tags, remove it from tagIndicies/_tags - if(namespace in tagIndicies && tagIndicies[namespace].length == 0) + // If namespace has no tags, remove it from tagIndices/_tags + if(namespace in tagIndices && tagIndices[namespace].length == 0) { - tagIndicies.remove(namespace); + tagIndices.remove(namespace); _tags.remove(namespace); } // If namespace is now empty, remove it from allNamespaces if( - namespace !in tagIndicies && - namespace !in attributeIndicies + namespace !in tagIndices && + namespace !in attributeIndices ) { auto allNamespacesIndex = allNamespaces.length - allNamespaces.find(namespace).length; @@ -584,7 +584,7 @@ } } - struct MemberRange(T, string allMembers, string memberIndicies, string membersGrouped) + struct MemberRange(T, string allMembers, string memberIndices, string membersGrouped) { private Tag tag; private string namespace; // "*" indicates "all namespaces" (ok since it's not a valid namespace name) @@ -602,8 +602,8 @@ if(namespace == "*") initialEndIndex = mixin("tag."~allMembers~".length"); - else if(namespace in mixin("tag."~memberIndicies)) - initialEndIndex = mixin("tag."~memberIndicies~"[namespace].length"); + else if(namespace in mixin("tag."~memberIndices)) + initialEndIndex = mixin("tag."~memberIndices~"[namespace].length"); else initialEndIndex = 0; @@ -694,7 +694,7 @@ if(namespace == "*") return mixin("tag."~allMembers~"[ frontIndex+index ]"); else - return mixin("tag."~allMembers~"[ tag."~memberIndicies~"[namespace][frontIndex+index] ]"); + return mixin("tag."~allMembers~"[ tag."~memberIndices~"[namespace][frontIndex+index] ]"); } alias NamedMemberRange!(T,membersGrouped) ThisNamedMemberRange; @@ -862,8 +862,8 @@ if(frontIndex == 0 && endIndex == tag.allNamespaces.length) { return - namespace in tag.attributeIndicies || - namespace in tag.tagIndicies; + namespace in tag.attributeIndices || + namespace in tag.tagIndices; } else // Slower fallback method @@ -878,8 +878,8 @@ TagRange tags; } - alias MemberRange!(Attribute, "allAttributes", "attributeIndicies", "_attributes") AttributeRange; - alias MemberRange!(Tag, "allTags", "tagIndicies", "_tags" ) TagRange; + alias MemberRange!(Attribute, "allAttributes", "attributeIndices", "_attributes") AttributeRange; + alias MemberRange!(Tag, "allTags", "tagIndices", "_tags" ) TagRange; static assert(isRandomAccessRange!AttributeRange); static assert(isRandomAccessRange!TagRange); static assert(isRandomAccessRange!NamespaceRange); diff --git a/source/dub/internal/sdlang/lexer.d b/source/dub/internal/sdlang/lexer.d index 3eb44a8..245ebbc 100644 --- a/source/dub/internal/sdlang/lexer.d +++ b/source/dub/internal/sdlang/lexer.d @@ -462,7 +462,7 @@ static keywordsInited = false; if(!keywordsInited) { - // Value (as a std.variant-based type) can't be statically inited + // Value (as a std.variant-based type) can't be statically init-ed keywords[0] = Key("true", Value(true )); keywords[1] = Key("false", Value(false)); keywords[2] = Key("on", Value(true )); @@ -621,7 +621,7 @@ } } else if(isNewline(ch)) - error("Newline not alowed in character literal."); + error("Newline not allowed in character literal."); else value = ch; advanceChar(ErrorOnEOF.Yes); // Skip the character itself @@ -1340,7 +1340,7 @@ /// Advances past whitespace and comments private void eatWhite(bool allowComments=true) { - // -- Comment/Whitepace Lexer ------------- + // -- Comment/Whitespace Lexer ------------- enum State { diff --git a/source/dub/internal/sdlang/symbol.d b/source/dub/internal/sdlang/symbol.d index 04de244..fd60059 100644 --- a/source/dub/internal/sdlang/symbol.d +++ b/source/dub/internal/sdlang/symbol.d @@ -38,7 +38,7 @@ /// Symbol is essentially the "type" of a Token. /// Token is like an instance of a Symbol. /// -/// This only represents terminals. Nonterminal tokens aren't +/// This only represents terminals. Non-terminal tokens aren't /// constructed since the AST is built directly during parsing. /// /// You can't create a Symbol directly. Instead, use the 'symbol' diff --git a/source/dub/internal/sdlang/token.d b/source/dub/internal/sdlang/token.d index c308ef0..b11846c 100644 --- a/source/dub/internal/sdlang/token.d +++ b/source/dub/internal/sdlang/token.d @@ -59,7 +59,7 @@ } /++ -SDL's datatypes map to D's datatypes as described below. +SDL's data-types map to D's datatypes as described below. Most are straightforward, but take special note of the date/time-related types. Boolean: bool @@ -323,7 +323,7 @@ sink.put(']'); } -/// This only represents terminals. Nonterminals aren't +/// This only represents terminals. Non-terminals aren't /// constructed since the AST is directly built during parsing. struct Token { diff --git a/source/dub/internal/utils.d b/source/dub/internal/utils.d index 5b68728..de3bf2a 100644 --- a/source/dub/internal/utils.d +++ b/source/dub/internal/utils.d @@ -59,7 +59,7 @@ { // The Lock can't be unlinked as someone could try to lock an already // opened fd while a new file with the same name gets created. - // Exclusive filesystem locks (O_EXCL, mkdir) could be deleted but + // Exclusive file system locks (O_EXCL, mkdir) could be deleted but // aren't automatically freed when a process terminates, see #1149. private File f; } diff --git a/source/dub/internal/vibecompat/core/file.d b/source/dub/internal/vibecompat/core/file.d index 8467857..6de9241 100644 --- a/source/dub/internal/vibecompat/core/file.d +++ b/source/dub/internal/vibecompat/core/file.d @@ -56,7 +56,7 @@ from = NativePath of the source file to = NativePath for the destination file overwrite = If true, any file existing at the destination path will be - overwritten. If this is false, an excpetion will be thrown should + overwritten. If this is false, an exception will be thrown should a file already exist at the destination path. Throws: diff --git a/source/dub/internal/vibecompat/data/serialization.d b/source/dub/internal/vibecompat/data/serialization.d index 8216310..2fac24d 100644 --- a/source/dub/internal/vibecompat/data/serialization.d +++ b/source/dub/internal/vibecompat/data/serialization.d @@ -870,7 +870,7 @@ static struct Box(T) { T value; } - // Also to berepresented as the boxed value when serialized, but has + // Also to be represented as the boxed value when serialized, but has // a different way to access the value. static struct Box2(T) { private T v; diff --git a/source/dub/internal/vibecompat/data/utils.d b/source/dub/internal/vibecompat/data/utils.d index fd75584..64dc9b6 100644 --- a/source/dub/internal/vibecompat/data/utils.d +++ b/source/dub/internal/vibecompat/data/utils.d @@ -127,7 +127,7 @@ /** - Determins if a member is a public, non-static data field. + Determines if a member is a public, non-static data field. */ template isRWPlainField(T, string M) { diff --git a/source/dub/internal/vibecompat/inet/path.d b/source/dub/internal/vibecompat/inet/path.d index 26cad1a..745ebc0 100644 --- a/source/dub/internal/vibecompat/inet/path.d +++ b/source/dub/internal/vibecompat/inet/path.d @@ -145,7 +145,7 @@ return ret.data; } - /// Tests if `rhs` is an anchestor or the same as this path. + /// Tests if `rhs` is an ancestor or the same as this path. bool startsWith(const NativePath rhs) const { if( rhs.m_nodes.length > m_nodes.length ) return false; foreach( i; 0 .. rhs.m_nodes.length ) @@ -186,7 +186,7 @@ /// The parent path @property NativePath parentPath() const { return this[0 .. length-1]; } - /// The ist of path entries of which this path is composed + /// The list of path entries of which this path is composed @property immutable(PathEntry)[] nodes() const { return m_nodes; } /// The number of path entries of which this path is composed @@ -300,7 +300,7 @@ int opCmp(string rhs) const scope @safe pure nothrow @nogc { return m_name.cmp(rhs); } } -/// Joins two path strings. subpath must be relative. +/// Joins two path strings. sub-path must be relative. string joinPath(string basepath, string subpath) { NativePath p1 = NativePath(basepath); diff --git a/source/dub/package_.d b/source/dub/package_.d index c77e872..368f807 100644 --- a/source/dub/package_.d +++ b/source/dub/package_.d @@ -360,7 +360,7 @@ /** Returns all BuildSettings for the given platform and configuration. - This will gather the effective build settings declared in tha package + This will gather the effective build settings declared in the package recipe for when building on a particular platform and configuration. Root build settings and configuration specific settings will be merged. @@ -760,7 +760,7 @@ if (m_parentPackage) { if (m_parentPackage.path != path) { if (this.recipe.license.length && this.recipe.license != m_parentPackage.recipe.license) - logWarn("Warning: License in subpackage %s is different than its parent package, this is discouraged.", name); + logWarn("Warning: License in sub-package %s is different than its parent package, this is discouraged.", name); } } if (name.empty) logWarn("Warning: The package in %s has no name.", path); diff --git a/source/dub/packagemanager.d b/source/dub/packagemanager.d index d63ab37..706b904 100644 --- a/source/dub/packagemanager.d +++ b/source/dub/packagemanager.d @@ -89,7 +89,7 @@ * Dub versions because v1.31 eagerly scan all available repositories, * leading to slowdown for the most common operation - `dub build` with * already resolved dependencies. - * From v1.31 onwards, those locations are not scanned eagerly, + * From v1.31 onward, those locations are not scanned eagerly, * unless one of the function requiring eager scanning does, * such as `getBestPackage` - as it needs to iterate the list * of available packages. @@ -100,7 +100,7 @@ /** Instantiate an instance with a single search path - This constructor is used when dub is invoked with the '--bar' CLI switch. + This constructor is used when dub is invoked with the '--bare' CLI switch. The instance will not look up the default repositories (e.g. ~/.dub/packages), using only `path` instead. @@ -340,7 +340,7 @@ /** For a given SCM repository, returns the corresponding package. An SCM repository is provided as its remote URL, the repository is cloned - and in the dependency speicfied commit is checked out. + and in the dependency specified commit is checked out. If the target directory already exists, just returns the package without cloning. @@ -416,7 +416,7 @@ /** * Searches for the latest version of a package matching the version range. * - * This will search the local filesystem only (it doesn't connect + * This will search the local file system only (it doesn't connect * to the registry) for the "best" (highest version) that matches `range`. * An overload with a single version exists to search for an exact version. * @@ -717,7 +717,7 @@ logDebug("Extracting from zip."); - // In a github zip, the actual contents are in a subfolder + // In a GitHub zip, the actual contents are in a sub-folder alias PSegment = typeof(NativePath.init.head); PSegment[] zip_prefix; outer: foreach(ArchiveMember am; archive.directory) { @@ -899,7 +899,7 @@ this.m_repositories[type].writeLocalPackageList(); foreach(ver, name; removed) - logInfo("Deregistered package: %s (version: %s)", name, ver); + logInfo("De-registered package: %s (version: %s)", name, ver); } /// For the given type add another path where packages will be looked up. @@ -977,13 +977,13 @@ return digest[].dup; } - /// Adds the package and scans for subpackages. + /// Adds the package and scans for sub-packages. private void addPackages(ref Package[] dst_repos, Package pack) const { // Add the main package. dst_repos ~= pack; - // Additionally to the internally defined subpackages, whose metadata + // Additionally to the internally defined sub-packages, whose metadata // is loaded with the main dub.json, load all externally defined // packages after the package is available with all the data. foreach (spr; pack.subPackages) { @@ -1001,7 +1001,7 @@ sp = Package.load(path, NativePath.init, pack); } else sp = new Package(spr.recipe, pack.path, pack); - // Add the subpackage. + // Add the sub-package. try { dst_repos ~= sp; } catch (Exception e) { @@ -1278,7 +1278,7 @@ auto existing = refresh ? null : this.fromPath; if (this.packagePath !is NativePath.init) { // For the internal location, we use `fromPath` to store packages - // loaded by the user (e.g. the project and its subpackages), + // loaded by the user (e.g. the project and its sub-packages), // so don't clean it. this.fromPath = null; } @@ -1331,7 +1331,7 @@ if (!p) p = Package.load(pack_path, packageFile); mgr.addPackages(this.fromPath, p); } catch (ConfigException exc) { - // Confiy error message already include the path + // Configy error message already include the path logError("Invalid recipe for local package: %S", exc); } catch (Exception e) { logError("Failed to load package in %s: %s", pack_path, e.msg); diff --git a/source/dub/packagesuppliers/maven.d b/source/dub/packagesuppliers/maven.d index 492b13e..7673b2e 100644 --- a/source/dub/packagesuppliers/maven.d +++ b/source/dub/packagesuppliers/maven.d @@ -121,7 +121,7 @@ SearchResult[] searchPackages(string query) { // Only exact search is supported - // This enables retrival of dub packages on dub run + // This enables retrieval of dub packages on dub run auto md = getMetadata(query); if (md.type == Json.Type.null_) return null; diff --git a/source/dub/platform.d b/source/dub/platform.d index 37122d7..6ee31b2 100644 --- a/source/dub/platform.d +++ b/source/dub/platform.d @@ -6,7 +6,7 @@ CI slave machines. It also contains means to match build platforms against a platform - specification string as used in package reciptes. + specification string as used in package recipes. Copyright: © 2012-2017 rejectedsoftware e.K. License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file. @@ -59,7 +59,7 @@ version(X86) version(CRuntime_DigitalMars) ret ~= "x86_omf"; // Hack: see #1059 // When compiling with --arch=x86_mscoff build_platform.architecture is equal to ["x86"] and canFind below is false. - // This hack prevents unnesessary warning 'Failed to apply the selected architecture x86_mscoff. Got ["x86"]'. + // This hack prevents unnecessary warning 'Failed to apply the selected architecture x86_mscoff. Got ["x86"]'. // And also makes "x86_mscoff" available as a platform specifier in the package recipe version(X86) version(CRuntime_Microsoft) ret ~= "x86_mscoff"; version(X86_64) ret ~= "x86_64"; @@ -177,7 +177,7 @@ `"-dmd"`, `"-arm"`, `"-arm-dmd"`, `"-windows-dmd"` Params: - platform = The build platform to match agains the platform specification + platform = The build platform to match against the platform specification specification = The specification being matched. It must either be an empty string or start with a dash. diff --git a/source/dub/project.d b/source/dub/project.d index f473839..dc3a849 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -679,7 +679,7 @@ createEdge(cidx, createConfig(d.name, sc)); } - // create a graph of all possible package configurations (package, config) -> (subpackage, subconfig) + // create a graph of all possible package configurations (package, config) -> (sub-package, sub-config) void determineAllConfigs(in Package p) { auto idx = allconfigs_path.countUntil(p.name); diff --git a/source/dub/recipe/packagerecipe.d b/source/dub/recipe/packagerecipe.d index d282233..81ee3f4 100644 --- a/source/dub/recipe/packagerecipe.d +++ b/source/dub/recipe/packagerecipe.d @@ -110,7 +110,7 @@ @Optional ToolchainRequirements toolchainRequirements; /** - * Speficies an optional list of build configurations + * Specifies an optional list of build configurations * * By default, the first configuration present in the package recipe * will be used, except for special configurations (e.g. "unittest"). @@ -153,7 +153,7 @@ * Sub-packages path or definitions * * Sub-packages allow to break component of a large framework into smaller - * packages. In the recipe file, subpackages entry can take one of two forms: + * packages. In the recipe file, sub-packages entry can take one of two forms: * either the path to a sub-folder where a recipe file exists, * or an object of the same format as a recipe file (or `PackageRecipe`). */ @@ -184,9 +184,9 @@ * Given a YAML parser, recurses into `recipe` or use `path` * depending on the node type. * - * Two formats are supported for `subpackages`: a string format, - * which is just the path to the subpackage, and embedding the - * full subpackage recipe into the parent package recipe. + * Two formats are supported for sub-packages: a string format, + * which is just the path to the sub-package, and embedding the + * full sub-package recipe into the parent package recipe. * * To support such a dual syntax, Configy requires the use * of a `fromYAML` method, as it exposes the underlying format. @@ -336,7 +336,7 @@ * Used by Configy to provide rich error message when parsing. * * Exceptions thrown from `validate` methods will be wrapped with field/file - * informations and rethrown from Configy, providing the user + * information and rethrown from Configy, providing the user * with the location of the configuration that triggered the error. */ public void validate () const diff --git a/source/dub/semver.d b/source/dub/semver.d index 7682e84..3edd6f1 100644 --- a/source/dub/semver.d +++ b/source/dub/semver.d @@ -1,8 +1,8 @@ /** - Implementes version validation and comparison according to the semantic + Implements version validation and comparison according to the semantic versioning specification. - The general format of a semantiv version is: a.b.c[-x.y...][+x.y...] + The general format of a semantic version is: a.b.c[-x.y...][+x.y...] a/b/c must be integer numbers with no leading zeros, and x/y/... must be either numbers or identifiers containing only ASCII alphabetic characters or hyphens. Identifiers may not start with a digit. @@ -229,7 +229,7 @@ minor version will be selected. If the patch or minor versions are skipped, the next major version will be selected. - This function corresponds to the semantivs of the "~>" comparison operator's + This function corresponds to the semantics of the "~>" comparison operator's upper bound. The semantics of this are the same as for the "approximate" version @@ -249,7 +249,7 @@ auto to_inc = splitted.length == 3? 1 : 0; splitted = splitted[0 .. to_inc+1]; splitted[to_inc] = to!string(to!int(splitted[to_inc]) + 1); - // Fill up to three compontents to make valid SemVer version. + // Fill up to three components to make valid SemVer version. while (splitted.length < 3) splitted ~= "0"; return splitted.join("."); } @@ -269,7 +269,7 @@ Prerelease and build metadata information is removed. - This implements the "^" comparison operator, which represents "nonbreaking semver compatibility." + This implements the "^" comparison operator, which represents "non-breaking SemVer compatibility." With 0.x.y releases, any release can break. With x.y.z releases, only major releases can break. */ @@ -299,7 +299,7 @@ /** Takes a partial version and expands it to a valid SemVer version. - This function corresponds to the semantivs of the "~>" comparison operator's + This function corresponds to the semantics of the "~>" comparison operator's lower bound. See_Also: `bumpVersion` @@ -322,7 +322,7 @@ assert("1.0.0" == expandVersion("1")); assert("1.0.0" == expandVersion("1.0")); assert("1.0.0" == expandVersion("1.0.0")); - // These are rather excotic variants... + // These are rather exotic variants... assert("1.0.0-pre.release" == expandVersion("1-pre.release")); assert("1.0.0+meta" == expandVersion("1+meta")); assert("1.0.0-pre.release+meta" == expandVersion("1-pre.release+meta")); @@ -345,7 +345,7 @@ } if (anumber && bnumber) { - // the !empty value might be an indentifier instead of a number, but identifiers always have precedence + // the !empty value might be an identifier instead of a number, but identifiers always have precedence if (aempty != bempty) return bempty - aempty; return res; } else {