Skip to content

Spelling utils #42458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
33f2906
spelling: actions
jsoref Apr 17, 2022
93f7750
spelling: administrators
jsoref Apr 17, 2022
7a889a8
spelling: against
jsoref Apr 17, 2022
a296687
spelling: between
jsoref Apr 17, 2022
a653225
spelling: clazz
jsoref Apr 17, 2022
6af887f
spelling: configuration
jsoref Apr 17, 2022
3d1e901
spelling: definitions
jsoref Apr 17, 2022
f310b33
spelling: describe
jsoref Apr 17, 2022
062f196
spelling: display
jsoref Apr 17, 2022
46eda2b
spelling: equipped
jsoref Apr 17, 2022
01bde49
spelling: forwarded
jsoref Apr 17, 2022
658f441
spelling: heuristic
jsoref Apr 17, 2022
dd47c3b
spelling: includes
jsoref Apr 17, 2022
aaf1ddc
spelling: inherits
jsoref Apr 17, 2022
ca76e2c
spelling: migrate
jsoref Apr 17, 2022
97649ee
spelling: multi
jsoref Apr 17, 2022
6c79195
spelling: nonsensical
jsoref Apr 17, 2022
4eae57f
spelling: optimizer
jsoref Apr 17, 2022
8aa2a99
spelling: option
jsoref Apr 17, 2022
667aba0
spelling: overridden
jsoref Apr 17, 2022
336caae
spelling: package
jsoref Apr 17, 2022
73dc2ec
spelling: parser
jsoref Apr 17, 2022
caad924
spelling: platform
jsoref Apr 17, 2022
c81cad6
spelling: predefined
jsoref Apr 17, 2022
62f8148
spelling: return
jsoref Apr 17, 2022
4611caf
spelling: separately
jsoref Apr 17, 2022
2b5bb20
spelling: simultaneously
jsoref Apr 17, 2022
ca9a199
spelling: specifying
jsoref Apr 17, 2022
f75688f
spelling: that
jsoref Apr 17, 2022
7f04dca
spelling: the
jsoref Apr 17, 2022
de23580
spelling: toolchain
jsoref Apr 17, 2022
aec1cab
spelling: uncategorized
jsoref Apr 17, 2022
50e9ae3
spelling: unsupported
jsoref Apr 17, 2022
5460443
spelling: utility
jsoref Apr 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions utils/analyze_code_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,14 @@ def print_summary(self, section_size):
(category[0], category[1], category[2]))
print("%60s: %8d (%6.2f%%)" % ('TOTAL', total_size, float(100)))

def uncatorizedSymbols(self):
def uncategorizedSymbols(self):
category = self.categories.get('Unknown')
if category:
return category.symbols
return None

def print_uncategorizedSymbols(self):
syms = self.uncatorizedSymbols()
syms = self.uncategorizedSymbols()
if syms:
for symbol in syms:
print(symbol.mangled_name + " " + symbol.name + " " +
Expand Down
4 changes: 2 additions & 2 deletions utils/api_checker/swift-api-checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ def main():
basic_group.add_argument('--separate-by-module',
action='store_true',
help='When importing entire SDK, dump content '
'seprately by module names')
'separately by module names')

basic_group.add_argument('--zippered',
action='store_true',
help='dump module content to a dir with files for'
'seprately targets')
'separately targets')

basic_group.add_argument('--abi',
action='store_true',
Expand Down
2 changes: 1 addition & 1 deletion utils/bug_reducer/bug_reducer/func_bug_reducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def function_bug_reducer(input_file, nm, sil_opt_invoker, sil_extract_invoker,

print("Base case crashes! Trying to reduce *.sib file")

# Otherwise, reduce the list of pases that cause the optimzier to crash.
# Otherwise, reduce the list of pases that cause the optimizer to crash.
tester = OptimizerTester(sil_opt_invoker, pass_list)
r = ReduceMiscompilingFunctions(functions, sil_extract_invoker,
tester)
Expand Down
4 changes: 2 additions & 2 deletions utils/build-presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@ skip-test-foundation
skip-test-libdispatch
skip-test-xctest

# Builds enough of the the toolchain to build a swift pacakge on macOS.
# Builds enough of the toolchain to build a swift package on macOS.
[preset: mixin_swiftpm_package_macos_platform]
mixin-preset=mixin_swiftpm_macos_platform

Expand All @@ -1708,7 +1708,7 @@ skip-watchos
skip-test-llbuild
skip-test-swiftpm

# Builds enough of the the toolchain to build a swift pacakge on Linux.
# Builds enough of the toolchain to build a swift package on Linux.
[preset: mixin_swiftpm_package_linux_platform]
mixin-preset=mixin_swiftpm_linux_platform

Expand Down
6 changes: 3 additions & 3 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ umask 0022
# The --skip-build parameter, with no product name, does not affect the
# configuration (CMake parameters). You can turn this option on and
# off in different invocations of the script for the same build
# directory without affecting configutation.
# directory without affecting configuration.
#
# skip-build-* and build-* parameters affect the CMake configuration
# (enable/disable those components).
Expand Down Expand Up @@ -3442,10 +3442,10 @@ for host in "${ALL_HOSTS[@]}"; do
# The usage for this script says that lipo happens before
# dsym extraction but that's not really what happens. At this point,
# we're processing an individual host (eg macosx-x86_64) but targeting
# the (shared) SYMROOT which can cause mutliple hosts to stomp on each
# the (shared) SYMROOT which can cause multiple hosts to stomp on each
# other. As a hack, I'm segregating the hosts in the symroot but it
# would probably be better to make the script behave as the usage
# descibes
# describes
host_symroot="${INSTALL_SYMROOT}/${host}"

set -x
Expand Down
2 changes: 1 addition & 1 deletion utils/build-toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function usage() {
echo "Customize the preset invoked by prepending a prefix"
echo ""
echo "--use-os-runtime"
echo "Require this toolchain to link against against the OS runtime rather than the toolchains packaged runtime"
echo "Require this toolchain to link against the OS runtime rather than the toolchains packaged runtime"
echo ""
}

Expand Down
2 changes: 1 addition & 1 deletion utils/build-tooling-libs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# utils/build-tooling-libs - Helper tool for building the SwiftSyntax paresr
# utils/build-tooling-libs - Helper tool for building the SwiftSyntax parser
# and SwiftStaticMirror libraries -*- python -*-
#
# This source file is part of the Swift.org open source project
Expand Down
2 changes: 1 addition & 1 deletion utils/build-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:: - REPO_SCHEME: Optional. The scheme name to checkout.

:: REQUIRED PERMISSIONS
:: Practically, it is easier to be in the Adminstrators group to run the
:: Practically, it is easier to be in the Administrators group to run the
:: script, but it should be possible to execute as a normal user.
:: The user will need permission to write files into the Windows SDK and the
:: VisualC++ folder.
Expand Down
2 changes: 1 addition & 1 deletion utils/build_swift/build_swift/argparse/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def __init__(self, option_strings, **kwargs):
# -----------------------------------------------------------------------------

class UnsupportedAction(Action):
"""Action that denotes an unsupported argument or opiton and subsequently
"""Action that denotes an unsupported argument or option and subsequently
raises an ArgumentError.
"""

Expand Down
4 changes: 2 additions & 2 deletions utils/build_swift/build_swift/argparse/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __call__(self, *args):

class _PartialAction(Action):
"""Action that is partially applied, creating a factory closure used to
defer initialization of acitons in the builder DSL.
defer initialization of actions in the builder DSL.
"""

def __init__(self, action_class):
Expand Down Expand Up @@ -185,7 +185,7 @@ def mutually_exclusive_group(self, **kwargs):
# -----------------------------------------------------------------------------

class ArgumentParser(argparse.ArgumentParser):
"""A thin extension class to the standard ArgumentParser which incluldes
"""A thin extension class to the standard ArgumentParser which includes
methods to interact with a builder instance.
"""

Expand Down
2 changes: 1 addition & 1 deletion utils/build_swift/build_swift/cache_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


"""
Cache related utitlity functions and decorators.
Cache related utility functions and decorators.
"""

import functools
Expand Down
4 changes: 2 additions & 2 deletions utils/build_swift/build_swift/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _default_llvm_lto_link_jobs():
"""Use the formula (GB Memory - 3)/6.0GB to get the number of parallel
link threads we can support. This gives the OS 3 GB of room to work with.

This is a bit conservative, but I have found that this hueristic prevents
This is a bit conservative, but I have found that this heuristic prevents
me from swapping on my test machine.
"""

Expand All @@ -99,7 +99,7 @@ def _default_swift_lto_link_jobs():
"""Use the formula (GB Memory - 3)/8.0GB to get the number of parallel
link threads we can support. This gives the OS 3 GB of room to work with.

This is a bit conservative, but I have found that this hueristic prevents
This is a bit conservative, but I have found that this heuristic prevents
me from swapping on my test machine.
"""

Expand Down
4 changes: 2 additions & 2 deletions utils/build_swift/build_swift/presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def __str__(self):


class DuplicatePresetError(PresetError):
"""Raised when an existing preset would be overriden.
"""Raised when an existing preset would be overridden.
"""

def __init__(self, preset_name):
Expand Down Expand Up @@ -306,7 +306,7 @@ def read_files(self, filenames):
@_catch_duplicate_option_error
@_catch_duplicate_section_error
def read_string(self, string):
"""Reads and parses a string containing preset definintions.
"""Reads and parses a string containing preset definitions.
"""

fp = io.StringIO(string)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def test_last_wins(self):
self.assertFalse(args.foo)


class TestUnuspportedAction(unittest.TestCase):
class TestUnsupportedAction(unittest.TestCase):

def test_default_attributes(self):
action = actions.UnsupportedAction(['--foo'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_assert_exists(self):
path_type(__file__)

with self.assertRaises(ArgumentTypeError):
path_type('/nonsensisal/path/')
path_type('/nonsensical/path/')

with self.assertRaises(ArgumentTypeError):
path_type('~/not-a-real/path to a file')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def test(self):
[option.option_string])
# The argument should never show up in the namespace
self.assertFalse(hasattr(namespace, option.dest))
# It should instead be forwareded to unknown_args
# It should instead be forwarded to unknown_args
self.assertEqual(unknown_args, [option.option_string])

return test
Expand Down
2 changes: 1 addition & 1 deletion utils/build_swift/tests/build_swift/test_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _get_sdk_target_names(sdk_names):


# -----------------------------------------------------------------------------
# Mirgrate Swift SDKs
# Migrate Swift SDKs

class TestMigrateSwiftSDKsMeta(type):
"""Metaclass used to dynamically generate test methods.
Expand Down
2 changes: 1 addition & 1 deletion utils/build_swift/tests/build_swift/test_presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'darwin_toolchain_alias': 'Alias',
'darwin_toolchain_bundle_identifier': 'BundleIdentifier',
'darwin_toolchain_display_name': 'DisplayName',
'darwin_toolchain_display_name_short': 'DispalyNameShort',
'darwin_toolchain_display_name_short': 'DisplayNameShort',
'darwin_toolchain_version': '1.0',
'darwin_toolchain_xctoolchain_name': 'default',
'extra_swift_args': '',
Expand Down
2 changes: 1 addition & 1 deletion utils/build_swift/tests/build_swift/test_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class TestSubprocessWrappers(unittest.TestCase):

# NOTE: Testing the Popen class is harder than it might appear. We're not
# able to mock out the subprocess.Popen superclass as one might initially
# expect. Rather that shell.Popen class object already exists and inherts
# expect. Rather that shell.Popen class object already exists and inherits
# from subprocess.Popen, thus mocking it out does not change the behavior.
# Ultimately this class is merely a wrapper that uses already tested
# decorators to add functionality so testing here might not provide any
Expand Down
4 changes: 2 additions & 2 deletions utils/build_swift/tests/expected_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class DisableOption(_BaseOption):


class ChoicesOption(_BaseOption):
"""Option that accepts an argument from a predifined list of choices."""
"""Option that accepts an argument from a predefined list of choices."""

def __init__(self, *args, **kwargs):
self.choices = kwargs.pop('choices', None)
Expand Down Expand Up @@ -752,7 +752,7 @@ class BuildScriptImplOption(_BaseOption):
UnsupportedOption('--skip-test-optimize-none-with-implicit-dynamic'),
UnsupportedOption('--skip-test-optimized'),

# Options forwared to build-script-impl
# Options forwarded to build-script-impl
BuildScriptImplOption('--skip-test-swift', dest='impl_skip_test_swift'),
BuildScriptImplOption('--install-swift', dest='impl_install_swift'),

Expand Down
2 changes: 1 addition & 1 deletion utils/incrparse/incr_transfer_round_trip.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def main():
# markup for testing incremental parsing
# =========================================================================

# Gather command line arguments for swift-syntax-test specifiying the
# Gather command line arguments for swift-syntax-test specifying the
# performed edits in this list
incremental_edit_args = []
reparse_args = []
Expand Down
4 changes: 2 additions & 2 deletions utils/incrparse/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def serializeIncrParseMarkupFile(test_file, test_case, mode,
# markup for testing incremental parsing
# =========================================================================

# Gather command line arguments for swift-syntax-test specifiying the
# Gather command line arguments for swift-syntax-test specifying the
# performed edits in this list
incremental_edit_args = []
reparse_args = []
Expand Down Expand Up @@ -237,7 +237,7 @@ def main():
description='Utility for testing incremental syntax parsing',
epilog='''
This utility can parse a special markup to dedicate a pre-edit and a
post-edit version of a file simulateously and generate a serialized version
post-edit version of a file simultaneously and generate a serialized version
of the libSyntax tree by parsing either the pre-edit file, the post-edit
file or the edits that are required to retrieve the post-edit file from the
pre-edit file incrementally.
Expand Down
2 changes: 1 addition & 1 deletion utils/python_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def parse_args():
parser.add_argument(
"--check",
action="store_true",
help="Don't format the file, just retun the status.",
help="Don't format the file, just return the status.",
)

parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion utils/scale-test
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def Nelder_Mead_simplex(objective, params, bounds, epsilon=1.0e-6):
# objective-at-those-params and the data. Then runs a simple
# coordinate_descent nonlinear optimization on the parameter space until it
# converges. Then calculates the r_squared (coefficient of determination
# a.k.a. goodness-of-fit, a number betwee 0 and 1 with 1 meaning "fits
# a.k.a. goodness-of-fit, a number between 0 and 1 with 1 meaning "fits
# perfectly") and finally returns (fit_params, r_squared).
def fit_function_to_data_by_least_squares(objective, params, bounds, xs, ys):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def compute_product_pipelines(self):
# Otherwise, we build an "early" swift-driver using the host
# toolchain, which the later-built compiler will forward
# `swiftc` invocations to. That is, if we find a Swift compiler
# in the host toolchain. If the host toolchain is not equpipped with
# in the host toolchain. If the host toolchain is not equipped with
# a Swift compiler, a warning is emitted. In the future, it may become
# mandatory that the host toolchain come with its own `swiftc`.
builder.add_product(products.EarlySwiftDriver,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ def should_install(self, host_target):
return self.args.install_swiftsyntax

def install(self, target_name):
# SwiftSyntax doesn't produce any products thate should be installed
# into the toolchein. All tools using it link against SwiftSyntax
# SwiftSyntax doesn't produce any products that should be installed
# into the toolchain. All tools using it link against SwiftSyntax
# statically.
pass

Expand Down
4 changes: 2 additions & 2 deletions utils/swift_build_support/swift_build_support/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def install_prefix():

def darwin_toolchain_prefix(darwin_install_prefix):
"""
Given the install prefix for a Darwin system, and assuming that that path
Given the install prefix for a Darwin system, and assuming that path
is to a .xctoolchain directory, return the path to the .xctoolchain
directory.
"""
Expand All @@ -439,7 +439,7 @@ def darwin_toolchain_prefix(darwin_install_prefix):

def toolchain_path(install_destdir, install_prefix):
"""
Given the install prefix for a Darwin system, and assuming that that path
Given the install prefix for a Darwin system, and assuming that path
is to a .xctoolchain directory, return the path to the .xctoolchain
directory in the given install directory.
This toolchain is being populated during the build-script invocation.
Expand Down
4 changes: 2 additions & 2 deletions utils/type-layout-fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def struct():
print("}")
print()

def clas():
def clazz():
defineRandomClass(name, depth)

def enum():
Expand All @@ -145,7 +145,7 @@ def enum():
print("}")
print()

kinds = [struct, clas, enum]
kinds = [struct, clazz, enum]
return random.choice(kinds)()


Expand Down
2 changes: 1 addition & 1 deletion utils/update_checkout/update_checkout/update_checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def skip_list_for_platform(config, all_repos):
return [] # Do not skip any platform-specific repositories

# If there is a platforms key only include the repo if the
# plaform is in the list
# platform is in the list
skip_list = []
platform_name = platform.system()

Expand Down