diff --git a/docs/adrs/0276-problem-matchers.md b/docs/adrs/0276-problem-matchers.md index 5d7a034d179..e7320ee94fe 100644 --- a/docs/adrs/0276-problem-matchers.md +++ b/docs/adrs/0276-problem-matchers.md @@ -201,7 +201,7 @@ Coalesce empty with \"error\". For any other values, omit logging an issue and d #### Default severity level -Problem matchers are unable to interpret severity strings other than `warning` and `error`. The `severity` match group expects `warning` or `error` (case insensitive). +Problem matchers are unable to interpret severity strings other than `warning` and `error`. The `severity` match group expects `warning` or `error` (case-insensitive). However some tools indicate error/warning in different ways. For example `flake8` uses codes like `E100`, `W200`, and `F300` (error, warning, fatal, respectively). diff --git a/docs/adrs/0279-hashFiles-expression-function.md b/docs/adrs/0279-hashFiles-expression-function.md index 1de07a82747..177d6d90e0c 100644 --- a/docs/adrs/0279-hashFiles-expression-function.md +++ b/docs/adrs/0279-hashFiles-expression-function.md @@ -5,7 +5,7 @@ **Status**: Accepted ## Context -First party action `actions/cache` needs a input which is an explicit `key` used for restoring and saving the cache. For packages caching, the most common `key` might be the hash result of contents from all `package-lock.json` under `node_modules` folder. +First party action `actions/cache` needs an input which is an explicit `key` used for restoring and saving the cache. For packages caching, the most common `key` might be the hash result of contents from all `package-lock.json` under `node_modules` folder. There are serval different ways to get the hash `key` input for `actions/cache` action. diff --git a/docs/adrs/0297-base64-masking-trailing-characters.md b/docs/adrs/0297-base64-masking-trailing-characters.md index 4bd072311cf..af288739951 100644 --- a/docs/adrs/0297-base64-masking-trailing-characters.md +++ b/docs/adrs/0297-base64-masking-trailing-characters.md @@ -43,6 +43,6 @@ This will result in us only revealing length or bit information when a prefix or ## Consequences -- In the case where a secret has a prefix or suffix added before base64 encoding, we may now reveal up to 20 bits of information and the length of the original string modulo 3, rather then the original 16 bits and no length information +- In the case where a secret has a prefix or suffix added before base64 encoding, we may now reveal up to 20 bits of information and the length of the original string modulo 3, rather than the original 16 bits and no length information - Secrets with a suffix appended before encoding will now be masked across the board. Previously it was only masked if it was a multiple of 3 characters - Performance will suffer in a negligible way diff --git a/docs/adrs/0549-composite-run-steps.md b/docs/adrs/0549-composite-run-steps.md index 2f6ff35661d..c93e0eb27ff 100644 --- a/docs/adrs/0549-composite-run-steps.md +++ b/docs/adrs/0549-composite-run-steps.md @@ -314,7 +314,7 @@ runs: **We will not support "timeout-minutes" in a composite action for now. This functionality will be focused on in a future ADR.** -A composite action in its entirety is a job. You can set both timeout-minutes for the whole composite action or its steps as long as the sum of the `timeout-minutes` for each composite action step that has the attribute `timeout-minutes` is less than or equals to `timeout-minutes` for the composite action. There is no default timeout-minutes for each composite action step. +A composite action in its entirety is a job. You can set both timeout-minutes for the whole composite action or its steps as long as the sum of the `timeout-minutes` for each composite action step that has the attribute `timeout-minutes` is less than or equal to `timeout-minutes` for the composite action. There is no default timeout-minutes for each composite action step. If the time taken for any of the steps in combination or individually exceeds the whole composite action `timeout-minutes` attribute, the whole job will fail (1). If an individual step exceeds its own `timeout-minutes` attribute but the total time that has been used including this step is below the overall composite action `timeout-minutes`, the individual step will fail but the rest of the steps will run based on their own `timeout-minutes` attribute (they will still abide by condition (1) though). diff --git a/docs/adrs/1144-composite-actions.md b/docs/adrs/1144-composite-actions.md index 2e1c30461ab..223b2cd39da 100644 --- a/docs/adrs/1144-composite-actions.md +++ b/docs/adrs/1144-composite-actions.md @@ -8,7 +8,7 @@ We released [composite run steps](https://github.com/actions/runner/pull/554) la We want to support the `uses` steps from workflows in composite actions, including: - Container actions - - Javascript actions + - JavaScript actions - Other Composite actions (up to a limit of course!) - The pre and post steps these actions can generate @@ -80,7 +80,7 @@ We want to support the `uses` steps from workflows in composite actions, includi ### Defaults - Not being considered at this time -- In actions, we have the idea of [defaults](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun) , which allow you to specify a shell and working directory in one location, rather then on each step. +- In actions, we have the idea of [defaults](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun) , which allow you to specify a shell and working directory in one location, rather than on each step. - However, `shell` is currently required in composite run steps - In regular run steps, it is optional, and defaults to a different value based on the OS. - We want to prioritize the right experience for the consumer, and make the action author continue to explicitly set these values. We can consider improving this experience in the future. diff --git a/docs/adrs/1438-conditional-composite.md b/docs/adrs/1438-conditional-composite.md index c95405697f2..ad5728f02a6 100644 --- a/docs/adrs/1438-conditional-composite.md +++ b/docs/adrs/1438-conditional-composite.md @@ -12,7 +12,7 @@ However, one of the [most requested features](https://github.com/actions/runner/ ### Goals - We want to keep consistent with current behavior - We want to support conditionals via the `if` keyword -- Our built in functions like `success` should be implementable without calling them, for example you can do `job.status == success` rather then `success()` currently. +- Our built in functions like `success` should be implementable without calling them, for example you can do `job.status == success` rather than `success()` currently. ### How does composite currently work? @@ -32,7 +32,7 @@ Lets formalize that concept into a "real" idea. - We will add an `action_status` field to the github context to mimic the [job's context status](https://docs.github.com/en/actions/learn-github-actions/contexts#job-context). - We have an existing concept that does this `action_path` which is only set for composite actions on the github context. -- In a composite action during a main step, the `success()` function will check if `action_status == success`, rather then `job_status == success`. Failure will work the same way. +- In a composite action during a main step, the `success()` function will check if `action_status == success`, rather than `job_status == success`. Failure will work the same way. - Pre and post steps in composite actions will not change, they will continue to check the job status. @@ -57,7 +57,7 @@ For example, lets imagine a scenario with a simple nested composite action The child composite actions steps should run in this example, the child composite action has not yet failed, so it should run all steps until a step fails. This is consistent with how a composite action currently works in production if the main job fails but a composite action is invoked with `if:always()` or `if: failure()` ### Other options explored -We could add the `current_step_status` to the job context rather then `__status` to the steps context, however this comes with two major downsides: +We could add the `current_step_status` to the job context rather than `__status` to the steps context, however this comes with two major downsides: - We need to support the field for every type of step, because its non trivial to remove a field from the job context once it has been added (its readonly) - For all actions besides composite it would only every be `success` - Its weird to have a `current_step` value on the job context diff --git a/docs/adrs/1751-runner-job-hooks.md b/docs/adrs/1751-runner-job-hooks.md index 8e81f50e780..afcc70ef0fc 100644 --- a/docs/adrs/1751-runner-job-hooks.md +++ b/docs/adrs/1751-runner-job-hooks.md @@ -2,30 +2,30 @@ ## Context -This ADR details the design changes for supporting custom configurable hooks for on various runner events. This has been a long requested user feature [here](https://github.com/actions/runner/issues/1543), [here](https://github.com/actions/runner/issues/699) and [here](https://github.com/actions/runner/issues/1116) for users to have more information on runner observability, and for the ability to run cleanup and teardown jobs. +This ADR details the design changes for supporting custom configurable hooks for on various runner events. This has been a long requested user feature ([actions/runner#699](https://github.com/actions/runner/issues/699) [actions/runner#1116](https://github.com/actions/runner/issues/1116), and [actions/runner#1543](https://github.com/actions/runner/issues/1543)) for users to have more information on runner observability, and for the ability to run cleanup and teardown jobs. This feature is mainly intended for self hosted runner administrators. **What we hope to solve with this feature** -1. A runner admininstrator is able to add custom scripts to cleanup their runner environment at the start or end of a job -2. A runner admininstrator is able to add custom scripts to help setup their runner environment at the beginning of a job, for reasons like [caching](https://github.com/actions/runner/issues/1543#issuecomment-1050346279) +1. A runner administrator is able to add custom scripts to cleanup their runner environment at the start or end of a job +2. A runner administrator is able to add custom scripts to help setup their runner environment at the beginning of a job, for reasons like [caching](https://github.com/actions/runner/issues/1543#issuecomment-1050346279) 3. A runner administrator is able to grab custom telemetry of jobs running on their self hosted runner **What we don't think this will solve** - Policy features that require certain steps run at the beginning or end of all jobs - - This would be better solved to in a central place in settings, rather then decentralized on each runner. - - The Proposed `Notification Hooks for Runners` is limited to self hosted runners, we don't beileve Policy features should be -- Reuse scenarios between jobs are covered by [composite actions](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action) and [resuable workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows) + - This would be better solved to in a central place in settings, rather than decentralized on each runner. + - The Proposed `Notification Hooks for Runners` is limited to self hosted runners, we don't believe Policy features should be +- Reuse scenarios between jobs are covered by [composite actions](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action) and [reusable workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows) - Security applications, security should be handled on the policy side on the server, not decentralized on each runner ## Hooks -- We will expose 2 variables that users can set to enable hooks +- We will expose two variables that users can set to enable hooks - `ACTIONS_RUNNER_HOOK_JOB_STARTED` - `ACTIONS_RUNNER_HOOK_JOB_COMPLETED` You can set these variables to the **absolute** path of a `.sh` or `.ps1` file. -We will execute `pwsh` (fallback to `powershell`) or `bash` (fallback to `sh`) as appropriate. +We will execute `pwsh` (fall back to `powershell`) or `bash` (fall back to `sh`) as appropriate. - `.sh` files will execute with the args `-e {pathtofile}` - `.ps1` files will execute with the args `-command \". '{pathtofile}'\"` @@ -63,7 +63,7 @@ These are **synchronous** hooks, so they will block job execution while they are - There will be no support for `continue-on-error` ## Key Decisions -- We will expose 2 variables that users can set to enable hooks +- We will expose two variables that users can set to enable hooks - `ACTIONS_RUNNER_HOOK_JOB_STARTED` - `ACTIONS_RUNNER_HOOK_JOB_COMPLETED` - Users can set these variables to the path of a `.sh` or `.ps1` file, which we will execute when Jobs are started or completed. @@ -73,7 +73,7 @@ These are **synchronous** hooks, so they will block job execution while they are - These files will execute as the Runner user, outside of any container specification on the job - These are **synchronous** hooks - Runner admins can execute a background process for async hooks if they want - - We will fail the job and halt execution on any exit code that is not 0. The Runner admin is responsible for returning the correct exit code and ensuring resilency. + - We will fail the job and halt execution on any exit code that is not 0. The Runner admin is responsible for returning the correct exit code and ensuring resiliency. - This includes that the runner user needs access to the file in the env and the file must exist - There will be no `continue-on-error` type option on launch - There will be no `timeout` option on launch diff --git a/docs/adrs/1891-container-hooks.md b/docs/adrs/1891-container-hooks.md index 5c905e40588..ac56839d9dc 100644 --- a/docs/adrs/1891-container-hooks.md +++ b/docs/adrs/1891-container-hooks.md @@ -7,8 +7,8 @@ # Background [Job Hooks](https://github.com/actions/runner/blob/main/docs/adrs/1751-runner-job-hooks.md) have given users the ability to customize how their self hosted runners run a job. -Users also want the ability to customize how they run containers during the scope of the job, rather then being locked into the docker implementation we have in the runner. They may want to use podman, kubernetes, or even change the docker commands we run. -We should give them that option, and publish examples how how they can create their own hooks. +Users also want the ability to customize how they run containers during the scope of the job, rather than being locked into the docker implementation we have in the runner. They may want to use podman, kubernetes, or even change the docker commands we run. +We should give them that option, and publish examples how they can create their own hooks. # Guiding Principles - **Extensibility** is the focus, we need to make sure we are flexible enough to cover current and future scenarios, even at the cost of making it harder to utilize these hooks @@ -46,7 +46,7 @@ All text written to stdout or stderr should appear in the job or step logs. With 1. Wrapping the json in some unique tag and processing it like we do commands 2. Writing to a file -For 1, users typically view logging information as a safe action, so we worry someone accidentialy logging unsantized information and causing unexpected or un-secure behavior. We eventually plan to move off of stdout/stderr style commands in favor of a runner cli. +For 1, users typically view logging information as a safe action, so we worry someone accidentally logging unsanitized information and causing unexpected or insecure behavior. We eventually plan to move off of stdout/stderr style commands in favor of a runner cli. Investing in this area doesn't make a lot of sense at this time. While writing to a file to communicate isn't the most ideal pattern, its an existing pattern in the runner and serves us well, so lets reuse it. @@ -88,14 +88,14 @@ We will not version these hooks at launch. If needed, we can always major versio The [job context](https://docs.github.com/en/actions/learn-github-actions/contexts#example-contents-of-the-job-context) currently has a variety of fields that correspond to containers. We should consider allowing hooks to populate new fields in the job context. That is out of scope for this original release however. ## Hooks -Hooks are to be implemented at a very high level, and map to actions the runner does, rather then specific docker actions like `docker build` or `docker create`. By mapping to runner actions, we create a very extensible framework that is flexible enough to solve any user concerns in the future. By providing first party implementations, we give users easy starting points to customize specific hooks (like `docker build`) without having to write full blown solutions. +Hooks are to be implemented at a very high level, and map to actions the runner does, rather than specific docker actions like `docker build` or `docker create`. By mapping to runner actions, we create a very extensible framework that is flexible enough to solve any user concerns in the future. By providing first party implementations, we give users easy starting points to customize specific hooks (like `docker build`) without having to write full blown solutions. The other would be to provide hooks that mirror every docker call we make, and expose more hooks to help support k8s users, with the expectation that users may have to no-op on multiple hooks if they don't correspond to our use case. Why we don't want to go that way - It feels clunky, users need to understand which hooks they need to implement and which they can ignore, which isn't a great UX - It doesn't scale well, I don't want to build a solution where we may need to add more hooks, by mapping to runner actions, updating hooks is a painful experience for users -- Its overwhelming, its easier to tell users to build 4 hooks and track data themselves, rather then 16 hooks where the runner needs certain information and then needs to provide that information back into each hook. If we expose `Container Create`, you need to return the container you created, then we do `container run` which uses that container. If we just give you an image and say create and run this container, you don't need to store the container id in the runner, and it maps better to k8s scenarios where we don't really have container ids. +- Its overwhelming, its easier to tell users to build 4 hooks and track data themselves, rather than 16 hooks where the runner needs certain information and then needs to provide that information back into each hook. If we expose `Container Create`, you need to return the container you created, then we do `container run` which uses that container. If we just give you an image and say create and run this container, you don't need to store the container id in the runner, and it maps better to k8s scenarios where we don't really have container ids. ### Prepare_job hook The `prepare_job` hook is called when a job is started. We pass in any job or service containers the job has. We expect that you: @@ -286,9 +286,9 @@ jobContainer: **Optional** An Object containing information about the specified ### Cleanup Job The `cleanup_job` hook is called at the end of a job and expects you to: -- Stop any running service or job containers (or the equiavalent pod) +- Stop any running service or job containers (or the equivalent pod) - Stop the network (if one exists) -- Delete any job or service containers (or the equiavalent pod) +- Delete any job or service containers (or the equivalent pod) - Delete the network (if one exists) - Cleanup anything else that was created for the run diff --git a/docs/adrs/README.md b/docs/adrs/README.md index a5274b04797..3334190e26c 100644 --- a/docs/adrs/README.md +++ b/docs/adrs/README.md @@ -16,4 +16,4 @@ This folder includes ADRs for the actions runner. ADRs are proposed in the form --- -- More information about ADRs can be found [here](https://github.com/joelparkerhenderson/architecture_decision_record). +- More information about ADRs can be found in [joelparkerhenderson/architecture-decision-record](https://github.com/joelparkerhenderson/architecture_decision_record). diff --git a/docs/checks/actions.md b/docs/checks/actions.md index bdf3abfc1c8..9e90c5fb8be 100644 --- a/docs/checks/actions.md +++ b/docs/checks/actions.md @@ -80,4 +80,4 @@ Make sure the runner has access to actions service for GitHub.com or GitHub Ente ## Still not working? -Contact [GitHub Support](https://support.github.com) if you have further questuons, or log an issue at https://github.com/actions/runner if you think it's a runner issue. +Contact [GitHub Support](https://support.github.com) if you have further questions, or log an issue at https://github.com/actions/runner if you think it's a runner issue. diff --git a/docs/checks/sslcert.md b/docs/checks/sslcert.md index 2ab09b722d2..89c1628cbe9 100644 --- a/docs/checks/sslcert.md +++ b/docs/checks/sslcert.md @@ -24,9 +24,7 @@ Depends on how your SSL server certificate gets configured, you might need to do ### Trust CA certificate for the Runner -The actions runner is a dotnet core application which will follow how dotnet load SSL CA certificates on each OS. - -You can get full details documentation at [here](https://docs.microsoft.com/en-us/dotnet/standard/security/cross-platform-cryptography#x509store) +The actions runner is a dotnet core application which will follow how [dotnet load SSL CA certificates on each OS](https://docs.microsoft.com/en-us/dotnet/standard/security/cross-platform-cryptography#x509store). In short: - Windows: Load from Windows certificate store. @@ -40,7 +38,7 @@ To let the runner trusts your CA certificate, you will need to: - Windows: https://docs.microsoft.com/en-us/skype-sdk/sdn/articles/installing-the-trusted-root-certificate - macOS: ![trust ca cert](./../res/macOStrustCA.gif) - Linux: Refer to the distribution documentation - 1. RedHat: https://www.redhat.com/sysadmin/ca-certificates-cli + 1. Red Hat: https://www.redhat.com/sysadmin/ca-certificates-cli 2. Ubuntu: http://manpages.ubuntu.com/manpages/focal/man8/update-ca-certificates.8.html 3. Google search: "trust ca certificate on [linux distribution]" 4. If all approaches failed, set environment variable `SSL_CERT_FILE` to the CA bundle `.pem` file we get. diff --git a/scripts/README.md b/scripts/README.md index 9735150510b..405d693c31f 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,4 +1,3 @@ # Sample scripts for self-hosted runners -Here are some examples to work from if you'd like to automate your use of self-hosted runners. -See the docs [here](../docs/automate.md). +Here are some examples to work from if you'd like to [automate your use of self-hosted runners](../docs/automate.md). diff --git a/scripts/create-latest-svc.sh b/scripts/create-latest-svc.sh index 74b5a278dc3..e0c896954dd 100755 --- a/scripts/create-latest-svc.sh +++ b/scripts/create-latest-svc.sh @@ -110,7 +110,7 @@ fi sudo -u ${svc_user} mkdir runner # TODO: validate not in a container -# TODO: validate systemd or osx svc installer +# TODO: validate systemd or macOS svc installer #-------------------------------------- # Get a config token @@ -171,7 +171,7 @@ sudo chown -R $svc_user ./runner pushd ./runner #--------------------------------------- -# Unattend config +# Unattended config #--------------------------------------- runner_url="https://github.com/${runner_scope}" if [ -n "${ghe_hostname}" ]; then diff --git a/scripts/remove-svc.sh b/scripts/remove-svc.sh index 7fae4ca976e..ba9583239b0 100755 --- a/scripts/remove-svc.sh +++ b/scripts/remove-svc.sh @@ -51,7 +51,7 @@ runner_plat=linux echo echo "Generating a removal token..." -# if the scope has a slash, it's an repo runner +# if the scope has a slash, it's a repo runner base_api_url="https://api.github.com/orgs" if [[ "$runner_scope" == *\/* ]]; then base_api_url="https://api.github.com/repos" diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 9c069b12f6f..4e4feff7060 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -53,7 +53,7 @@ $(DefineConstants);DEBUG - + true diff --git a/src/Misc/dotnet-install.sh b/src/Misc/dotnet-install.sh index 924bdc2a80a..f6eacea1f05 100755 --- a/src/Misc/dotnet-install.sh +++ b/src/Misc/dotnet-install.sh @@ -618,7 +618,7 @@ validate_remote_local_file_sizes() fi else - say "Either downloaded or local package size can not be measured. One of them may be corrupted." + say "Either downloaded or local package size cannot be measured. One of them may be corrupted." fi } diff --git a/src/Misc/expressionFunc/hashFiles/README.md b/src/Misc/expressionFunc/hashFiles/README.md index 0f05b216154..ddc99e073ec 100644 --- a/src/Misc/expressionFunc/hashFiles/README.md +++ b/src/Misc/expressionFunc/hashFiles/README.md @@ -1,3 +1,3 @@ To compile this package (output will be stored in `Misc/layoutbin`) run `npm install && npm run prepare && npm run all`. -When you commit changes to the JSON or Typescript file, the javascript binary will be automatically re-compiled and added to the latest commit. +When you commit changes to the JSON or TypeScript file, the javascript binary will be automatically re-compiled and added to the latest commit. diff --git a/src/Misc/layoutbin/RunnerService.js b/src/Misc/layoutbin/RunnerService.js index 1024e8a5e77..fb8d595685f 100644 --- a/src/Misc/layoutbin/RunnerService.js +++ b/src/Misc/layoutbin/RunnerService.js @@ -98,7 +98,7 @@ var runService = function () { retriableFailureRetryCount++; if (retriableFailureRetryCount >= 10) { console.error( - "Stopping the runner after 10 consecutive re-tryable failures" + "Stopping the runner after 10 consecutive retryable failures" ); stopping = true; } @@ -110,7 +110,7 @@ var runService = function () { retriableFailureRetryCount++; if (retriableFailureRetryCount >= 10) { console.error( - "Stopping the runner after 10 consecutive re-tryable failures" + "Stopping the runner after 10 consecutive retryable failures" ); stopping = true; } diff --git a/src/Misc/layoutbin/installdependencies.sh b/src/Misc/layoutbin/installdependencies.sh index e979d1e0fe4..61e4b02551a 100755 --- a/src/Misc/layoutbin/installdependencies.sh +++ b/src/Misc/layoutbin/installdependencies.sh @@ -139,7 +139,7 @@ then exit 1 fi else - echo "Can not find 'dnf'" + echo "Cannot find 'dnf'" print_errormessage exit 1 fi @@ -155,7 +155,7 @@ then exit 1 fi else - echo "Can not find 'yum'" + echo "Cannot find 'yum'" print_errormessage exit 1 fi @@ -179,7 +179,7 @@ then exit 1 fi else - echo "Can not find 'zypper'" + echo "Cannot find 'zypper'" print_errormessage exit 1 fi @@ -210,7 +210,7 @@ then exit 1 fi else - echo "Can not find 'yum'" + echo "Cannot find 'yum'" print_rhel6errormessage exit 1 fi diff --git a/src/Misc/layoutbin/systemd.svc.sh.template b/src/Misc/layoutbin/systemd.svc.sh.template index 84298542937..a445562fc36 100644 --- a/src/Misc/layoutbin/systemd.svc.sh.template +++ b/src/Misc/layoutbin/systemd.svc.sh.template @@ -74,7 +74,7 @@ function install() sed "s/{{User}}/${run_as_user}/g; s/{{Description}}/$(echo ${SVC_DESCRIPTION} | sed -e 's/[\/&]/\\&/g')/g; s/{{RunnerRoot}}/$(echo ${RUNNER_ROOT} | sed -e 's/[\/&]/\\&/g')/g;" "${TEMPLATE_PATH}" > "${TEMP_PATH}" || failed "failed to create replacement temp file" mv "${TEMP_PATH}" "${UNIT_PATH}" || failed "failed to copy unit file" - # Recent Fedora based Linux (CentOS/Redhat) has SELinux enabled by default + # Recent Fedora based Linux (CentOS/Red Hat) has SELinux enabled by default # We need to restore security context on the unit file we added otherwise SystemD have no access to it. command -v getenforce > /dev/null if [ $? -eq 0 ] diff --git a/src/Misc/layoutbin/update.cmd.template b/src/Misc/layoutbin/update.cmd.template index 66267a7277e..8fc1efc5dc3 100644 --- a/src/Misc/layoutbin/update.cmd.template +++ b/src/Misc/layoutbin/update.cmd.template @@ -50,9 +50,9 @@ rem ./bin.2.100.0 rem ./externals.2.100.0 rem ./bin.2.99.0 rem ./externals.2.99.0 -rem by using the juction folder we can avoid file in use problem. +rem by using the junction folder we can avoid file in use problem. -rem if the bin/externals junction point already exist, we just need to delete the juction point then re-create to point to new bin/externals folder. +rem if the bin/externals junction point already exist, we just need to delete the junction point then re-create to point to new bin/externals folder. rem if the bin/externals still are real folders, we need to rename the existing folder to bin.version format then create junction point to new bin/externals folder. rem check bin folder @@ -83,7 +83,7 @@ if ERRORLEVEL 1 ( rem check externals folder dir "%rootfolder%" /AL 2>&1 | findstr "externals" >> "%logfile%" 2>&1 if ERRORLEVEL 1 ( - rem return code 1 means it can't find a externals folder that is a junction folder + rem return code 1 means it can't find an externals folder that is a junction folder rem so we need to move the current externals folder to externals.2.99.0 folder. echo [%date% %time%] move "%rootfolder%\externals" "%rootfolder%\externals.%existrunnerversion%" >> "%logfile%" 2>&1 move "%rootfolder%\externals" "%rootfolder%\externals.%existrunnerversion%" >> "%logfile%" 2>&1 @@ -92,7 +92,7 @@ if ERRORLEVEL 1 ( goto fail ) ) else ( - rem otherwise it find a externals folder that is a junction folder + rem otherwise it find an externals folder that is a junction folder rem we just need to delete the junction point. echo [%date% %time%] Delete existing junction externals folder >> "%logfile%" 2>&1 rmdir "%rootfolder%\externals" >> "%logfile%" 2>&1 @@ -124,7 +124,7 @@ type nul > update.finished echo [%date% %time%] update.finished file creation succeed >> "%logfile%" 2>&1 rem rename the update log file with %logfile%.succeed/.failed/succeedneedrestart -rem runner service host can base on the log file name determin the result of the runner update +rem runner service host can determine the result of the runner update based on the log file echo [%date% %time%] Rename "%logfile%" to be "%logfile%.succeed" >> "%logfile%" 2>&1 move "%logfile%" "%logfile%.succeed" >nul diff --git a/src/Misc/layoutbin/update.sh.template b/src/Misc/layoutbin/update.sh.template index 82ada18b917..d2f2f40d5ce 100755 --- a/src/Misc/layoutbin/update.sh.template +++ b/src/Misc/layoutbin/update.sh.template @@ -45,9 +45,9 @@ date "+[%F %T-%4N] Sleep 1 more second to make sure process exited" >> "$logfile # ./externals.2.100.0 # ./bin.2.99.0 # ./externals.2.99.0 -# by using the juction folder we can avoid file in use problem. +# by using the junction folder we can avoid file in use problem. -# if the bin/externals junction point already exist, we just need to delete the juction point then re-create to point to new bin/externals folder. +# if the bin/externals junction point already exist, we just need to delete the junction point then re-create to point to new bin/externals folder. # if the bin/externals still are real folders, we need to rename the existing folder to bin.version format then create junction point to new bin/externals folder. # check bin folder @@ -135,7 +135,7 @@ if [[ "$currentplatform" == 'darwin' && $restartinteractiverunner -eq 0 ]]; the then # inspect the open file handles to find the node process # we can't actually inspect the process using ps because it uses relative paths and doesn't follow symlinks - # Try finding node24 first, then fallback to earlier versions if needed + # Try finding node24 first, then fall back to earlier versions if needed nodever="node24" path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-) if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node20 @@ -208,7 +208,7 @@ touch update.finished date "+[%F %T-%4N] update.finished file creation succeed" >> "$logfile" # rename the update log file with %logfile%.succeed/.failed/succeedneedrestart -# runner service host can base on the log file name determin the result of the runner update +# runner service host can determine the result of the runner update based on the log file date "+[%F %T-%4N] Rename $logfile to be $logfile.succeed" >> "$logfile" 2>&1 mv -fv "$logfile" "$logfile.succeed" >> "$logfile" 2>&1 diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh index 14cc6bab0c3..54b07868c3d 100755 --- a/src/Misc/layoutroot/config.sh +++ b/src/Misc/layoutroot/config.sh @@ -14,7 +14,7 @@ then command -v ldd > /dev/null if [ $? -ne 0 ] then - echo "Can not find 'ldd'. Please install 'ldd' and try again." + echo "Cannot find 'ldd'. Please install 'ldd' and try again." exit 1 fi @@ -44,7 +44,7 @@ then if ! [ -x "$(command -v ldconfig)" ]; then LDCONFIG_COMMAND="/sbin/ldconfig" if ! [ -x "$LDCONFIG_COMMAND" ]; then - echo "Can not find 'ldconfig' in PATH and '/sbin/ldconfig' doesn't exists either. Please install 'ldconfig' and try again." + echo "Cannot find 'ldconfig' in PATH and '/sbin/ldconfig' doesn't exists either. Please install 'ldconfig' and try again." exit 1 fi else diff --git a/src/Misc/layoutroot/safe_sleep.sh b/src/Misc/layoutroot/safe_sleep.sh index 7b61c584ee9..1d05dca5d8a 100644 --- a/src/Misc/layoutroot/safe_sleep.sh +++ b/src/Misc/layoutroot/safe_sleep.sh @@ -30,7 +30,7 @@ if [ -n "$BASH_VERSION" ]; then fi fi -# fallback to a busy wait +# fall back to a busy wait SECONDS=0 while [[ $SECONDS -lt $1 ]]; do : diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs index 045e906637e..3f3cbf3be80 100644 --- a/src/Runner.Common/Constants.cs +++ b/src/Runner.Common/Constants.cs @@ -199,7 +199,7 @@ public static class NodeMigration public static readonly string ResultsUploadFailure = "RESULTS_UPLOAD_FAILURE"; public static readonly string UnsupportedCommandMessage = "The `{0}` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/"; public static readonly string UnsupportedCommandMessageDisabled = "The `{0}` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/"; - public static readonly string UnsupportedStopCommandTokenDisabled = "You cannot use a endToken that is an empty string, the string 'pause-logging', or another workflow command. For more information see: https://docs.github.com/actions/learn-github-actions/workflow-commands-for-github-actions#example-stopping-and-starting-workflow-commands or opt into insecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_STOPCOMMAND_TOKENS` environment variable to `true`."; + public static readonly string UnsupportedStopCommandTokenDisabled = "You cannot use an endToken that is an empty string, the string 'pause-logging', or another workflow command. For more information see: https://docs.github.com/actions/learn-github-actions/workflow-commands-for-github-actions#example-stopping-and-starting-workflow-commands or opt into insecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_STOPCOMMAND_TOKENS` environment variable to `true`."; public static readonly string UnsupportedSummarySize = "$GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of {0}k, got {1}k. For more information see: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary"; public static readonly string SummaryUploadError = "$GITHUB_STEP_SUMMARY upload aborted, an error occurred when uploading the summary. For more information see: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary"; } diff --git a/src/Runner.Common/HostContext.cs b/src/Runner.Common/HostContext.cs index ffb08684a53..aa3f1ca668d 100644 --- a/src/Runner.Common/HostContext.cs +++ b/src/Runner.Common/HostContext.cs @@ -321,7 +321,7 @@ public void LoadDefaultUserAgents() var orchestrationId = claims.FirstOrDefault(x => string.Equals(x.Type, "orch_id", StringComparison.OrdinalIgnoreCase))?.Value; if (string.IsNullOrEmpty(orchestrationId)) { - // fallback to orchid for C# actions-service + // fall back to orchid for C# actions-service orchestrationId = claims.FirstOrDefault(x => string.Equals(x.Type, "orchid", StringComparison.OrdinalIgnoreCase))?.Value; } @@ -407,7 +407,7 @@ public string GetDirectory(WellKnownDirectory directory) break; case WellKnownDirectory.Tools: - // TODO: Coallesce to just check RUNNER_TOOL_CACHE when images stabilize + // TODO: Coalesce to just check RUNNER_TOOL_CACHE when images stabilize path = Environment.GetEnvironmentVariable("RUNNER_TOOL_CACHE") ?? Environment.GetEnvironmentVariable("RUNNER_TOOLSDIRECTORY") ?? Environment.GetEnvironmentVariable("AGENT_TOOLSDIRECTORY") ?? Environment.GetEnvironmentVariable(Constants.Variables.Agent.ToolsDirectory); if (string.IsNullOrEmpty(path)) diff --git a/src/Runner.Common/JobServer.cs b/src/Runner.Common/JobServer.cs index eac20a2b983..58842df0c8e 100644 --- a/src/Runner.Common/JobServer.cs +++ b/src/Runner.Common/JobServer.cs @@ -258,7 +258,7 @@ public async Task AppendTimelineRecordFeedAsync(Guid scopeIdentifier, string hub catch (Exception ex) { failedAttemptsToPostBatchedLinesByWebsocket++; - Trace.Info($"Caught exception during append web console line to websocket, let's fallback to sending via non-websocket call (total calls: {totalBatchedLinesAttemptedByWebsocket}, failed calls: {failedAttemptsToPostBatchedLinesByWebsocket}, websocket state: {this._websocketClient?.State})."); + Trace.Info($"Caught exception during append web console line to websocket, let's fall back to sending via non-websocket call (total calls: {totalBatchedLinesAttemptedByWebsocket}, failed calls: {failedAttemptsToPostBatchedLinesByWebsocket}, websocket state: {this._websocketClient?.State})."); Trace.Verbose(ex.ToString()); if (totalBatchedLinesAttemptedByWebsocket > _minWebsocketBatchedLinesCountToConsider) { diff --git a/src/Runner.Common/JobServerQueue.cs b/src/Runner.Common/JobServerQueue.cs index 74c12bea28b..71159790ce6 100644 --- a/src/Runner.Common/JobServerQueue.cs +++ b/src/Runner.Common/JobServerQueue.cs @@ -56,7 +56,7 @@ public sealed class JobServerQueue : RunnerService, IJobServerQueue // indicate how many timelines we have, we will process _timelineUpdateQueue base on the order of timeline in this list private readonly List _allTimelines = new(); - // bufferd timeline records that fail to update + // buffered timeline records that fail to update private readonly Dictionary> _bufferedRetryRecords = new(); // Task for each queue's dequeue process @@ -183,7 +183,7 @@ public void Start(Pipelines.AgentJobRequestMessage jobRequest, bool resultsServi } // WebConsoleLine queue and FileUpload queue are always best effort - // TimelineUpdate queue error will become critical when timeline records contain output variabls. + // TimelineUpdate queue error will become critical when timeline records contain output variables. public async Task ShutdownAsync() { if (!_queueInProcess) @@ -214,7 +214,7 @@ public async Task ShutdownAsync() Trace.Info("Results upload queue drained."); // ProcessTimelinesUpdateQueueAsync() will throw exception during shutdown - // if there is any timeline records that failed to update contains output variabls. + // if there is any timeline records that failed to update contains output variables. Trace.Verbose("Draining timeline update queue."); await ProcessTimelinesUpdateQueueAsync(runOnce: true); Trace.Info("Timeline update queue drained."); @@ -891,8 +891,8 @@ private async Task UploadFile(UploadFileInfo file) } // Create a new record and only set the Log field - var attachmentUpdataRecord = new TimelineRecord() { Id = file.TimelineRecordId, Log = taskLog }; - QueueTimelineRecordUpdate(file.TimelineId, attachmentUpdataRecord); + var attachmentUpdateRecord = new TimelineRecord() { Id = file.TimelineRecordId, Log = taskLog }; + QueueTimelineRecordUpdate(file.TimelineId, attachmentUpdateRecord); } else { diff --git a/src/Runner.Common/ProcessExtensions.cs b/src/Runner.Common/ProcessExtensions.cs index 5ccda3e8abf..ea22627c772 100644 --- a/src/Runner.Common/ProcessExtensions.cs +++ b/src/Runner.Common/ProcessExtensions.cs @@ -300,7 +300,7 @@ public static string GetEnvironmentVariable(this Process process, IHostContext h string envContent = File.ReadAllText(envFile); if (!string.IsNullOrEmpty(envContent)) { - // on linux, environment variables are seprated by '\0' + // on linux, environment variables are separated by '\0' var envList = envContent.Split('\0', StringSplitOptions.RemoveEmptyEntries); foreach (var envStr in envList) { diff --git a/src/Runner.Common/ProcessInvoker.cs b/src/Runner.Common/ProcessInvoker.cs index 021c6db5e02..e04ed9d5105 100644 --- a/src/Runner.Common/ProcessInvoker.cs +++ b/src/Runner.Common/ProcessInvoker.cs @@ -101,7 +101,7 @@ Task ExecuteAsync( } // The implementation of the process invoker does not hook up DataReceivedEvent and ErrorReceivedEvent of Process, - // instead, we read both STDOUT and STDERR stream manually on seperate thread. + // instead, we read both STDOUT and STDERR stream manually on separate thread. // The reason is we find a huge perf issue about process STDOUT/STDERR with those events. // // Missing functionalities: diff --git a/src/Runner.Common/RunnerServer.cs b/src/Runner.Common/RunnerServer.cs index b2e4e498afb..7c7d3de2137 100644 --- a/src/Runner.Common/RunnerServer.cs +++ b/src/Runner.Common/RunnerServer.cs @@ -233,7 +233,7 @@ public Task> GetAgentsAsync(int agentPoolId, string agentName = public Task> GetAgentsAsync(string agentName) { - return GetAgentsAsync(0, agentName); // search in all all agentPools + return GetAgentsAsync(0, agentName); // search in all agentPools } public Task ReplaceAgentAsync(int agentPoolId, TaskAgent agent) diff --git a/src/Runner.Common/Util/TaskResultUtil.cs b/src/Runner.Common/Util/TaskResultUtil.cs index e82bb2896b9..d20f4b74b94 100644 --- a/src/Runner.Common/Util/TaskResultUtil.cs +++ b/src/Runner.Common/Util/TaskResultUtil.cs @@ -50,7 +50,7 @@ public static TaskResult MergeTaskResults(TaskResult? currentResult, TaskResult return currentResult.Value; } - // comming result is bad than current result + // incoming result is worse or equal, so use it if (comingResult >= currentResult) { return comingResult; diff --git a/src/Runner.Listener/Configuration/ConfigurationManager.cs b/src/Runner.Listener/Configuration/ConfigurationManager.cs index 2c18d8d60f6..820e34d57c5 100644 --- a/src/Runner.Listener/Configuration/ConfigurationManager.cs +++ b/src/Runner.Listener/Configuration/ConfigurationManager.cs @@ -493,7 +493,7 @@ public void DeleteLocalRunnerConfig() { bool isConfigured = _store.IsConfigured(); bool hasCredentials = _store.HasCredentials(); - //delete credential config files + // delete credential config files var currentAction = "Removing .credentials"; if (hasCredentials) { @@ -507,7 +507,7 @@ public void DeleteLocalRunnerConfig() _term.WriteLine("Does not exist. Skipping " + currentAction); } - //delete settings config file + // delete settings config file currentAction = "Removing .runner"; if (isConfigured) { @@ -528,7 +528,7 @@ public async Task UnconfigureAsync(CommandSettings command) try { - //stop, uninstall service and remove service config file + // stop, uninstall service and remove service config file if (_store.IsServiceConfigured()) { currentAction = "Removing service"; @@ -540,12 +540,12 @@ public async Task UnconfigureAsync(CommandSettings command) _term.WriteLine(); _term.WriteSuccessMessage("Runner service removed"); #else - // unconfig systemd or osx service first + // uninstall systemd or macOS service first throw new Exception("Uninstall service first"); #endif } - //delete agent from the server + // delete agent from the server currentAction = "Removing runner from the server"; bool isConfigured = _store.IsConfigured(); bool hasCredentials = _store.HasCredentials(); @@ -709,9 +709,9 @@ private async Task GetRunnerTokenAsync(CommandSettings command, string g var runnerToken = string.Empty; if (!string.IsNullOrEmpty(githubPAT)) { - Trace.Info($"Retriving runner {tokenType} token using GitHub PAT."); + Trace.Info($"Retrieving runner {tokenType} token using GitHub PAT."); var jitToken = await GetJITRunnerTokenAsync(githubUrl, githubPAT, tokenType); - Trace.Info($"Retrived runner {tokenType} token is good to {jitToken.ExpiresAt}."); + Trace.Info($"Retrieved runner {tokenType} token is good to {jitToken.ExpiresAt}."); HostContext.SecretMasker.AddValue(jitToken.Token); runnerToken = jitToken.Token; } diff --git a/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs b/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs index 173e0bbe6cb..dc1be33dc51 100644 --- a/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs +++ b/src/Runner.Listener/Configuration/NativeWindowsServiceHelper.cs @@ -192,7 +192,7 @@ public void DeleteLocalGroup(string groupName) { case ReturnCode.NERR_GroupNotFound: case ReturnCode.ERROR_NO_SUCH_ALIAS: - Trace.Info(StringUtil.Format("Group {0} not exists.", groupName)); + Trace.Info(StringUtil.Format("Group {0} does not exist.", groupName)); break; case ReturnCode.ERROR_ACCESS_DENIED: @@ -278,11 +278,11 @@ private bool IsGroupHasFullControl(string path, string groupName) DirectoryInfo dInfo = new DirectoryInfo(path); DirectorySecurity dSecurity = dInfo.GetAccessControl(); - var allAccessRuls = dSecurity.GetAccessRules(true, true, typeof(SecurityIdentifier)).Cast(); + var allAccessRules = dSecurity.GetAccessRules(true, true, typeof(SecurityIdentifier)).Cast(); SecurityIdentifier sid = (SecurityIdentifier)new NTAccount(groupName).Translate(typeof(SecurityIdentifier)); - if (allAccessRuls.Any(x => x.IdentityReference.Value == sid.ToString() && + if (allAccessRules.Any(x => x.IdentityReference.Value == sid.ToString() && x.AccessControlType == AccessControlType.Allow && x.FileSystemRights.HasFlag(FileSystemRights.FullControl) && x.InheritanceFlags == (InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit) && @@ -422,11 +422,11 @@ public void RemoveGroupFromFolderSecuritySetting(string folderPath, string group { DirectorySecurity dSecurity = dInfo.GetAccessControl(); - var allAccessRuls = dSecurity.GetAccessRules(true, true, typeof(SecurityIdentifier)).Cast(); + var allAccessRules = dSecurity.GetAccessRules(true, true, typeof(SecurityIdentifier)).Cast(); SecurityIdentifier sid = (SecurityIdentifier)new NTAccount(groupName).Translate(typeof(SecurityIdentifier)); - foreach (FileSystemAccessRule ace in allAccessRuls) + foreach (FileSystemAccessRule ace in allAccessRules) { if (String.Equals(sid.ToString(), ace.IdentityReference.Value, StringComparison.OrdinalIgnoreCase)) { @@ -560,9 +560,9 @@ public void InstallService(string serviceName, string serviceDisplayName, string sfa.lpsaActions = tmpBuf.ToInt64(); // Call the ChangeServiceFailureActions() abstraction of ChangeServiceConfig2() - bool falureActionsResult = ChangeServiceFailureActions(svcHndl, SERVICE_CONFIG_FAILURE_ACTIONS, ref sfa); + bool failureActionsResult = ChangeServiceFailureActions(svcHndl, SERVICE_CONFIG_FAILURE_ACTIONS, ref sfa); //Check the return - if (!falureActionsResult) + if (!failureActionsResult) { int lastErrorCode = (int)GetLastError(); Exception win32exception = new Win32Exception(lastErrorCode); @@ -846,7 +846,7 @@ public void GrantDirectoryPermissionForAccount(string accountName, IList Trace.Info(StringUtil.Format("Trying to add userName {0} to the group {1}", accountName, groupName)); AddMemberToLocalGroup(accountName, groupName); - // grant permssion for folders + // grant permission for folders foreach(var folder in folders) { if (Directory.Exists(folder)) @@ -1178,7 +1178,7 @@ public enum ServiceRights QueryConfig = 0x1, ChangeConfig = 0x2, QueryStatus = 0x4, - EnumerateDependants = 0x8, + EnumerateDependents = 0x8, Start = 0x10, Stop = 0x20, PauseContinue = 0x40, @@ -1187,7 +1187,7 @@ public enum ServiceRights Delete = 0x00010000, StandardRightsRequired = 0xF0000, AllAccess = - (StandardRightsRequired | QueryConfig | ChangeConfig | QueryStatus | EnumerateDependants | Start | Stop + (StandardRightsRequired | QueryConfig | ChangeConfig | QueryStatus | EnumerateDependents | Start | Stop | PauseContinue | Interrogate | UserDefinedControl) } diff --git a/src/Runner.Listener/Configuration/RSAFileKeyManager.cs b/src/Runner.Listener/Configuration/RSAFileKeyManager.cs index 532128a5700..b72335ae6c6 100644 --- a/src/Runner.Listener/Configuration/RSAFileKeyManager.cs +++ b/src/Runner.Listener/Configuration/RSAFileKeyManager.cs @@ -40,7 +40,7 @@ public RSA CreateKey() } else { - Trace.Warning("Unable to succesfully set permissions for RSA key parameters file {0}. Received exit code {1} from {2}", _keyFile, exitCode, chmodPath); + Trace.Warning("Unable to successfully set permissions for RSA key parameters file {0}. Received exit code {1} from {2}", _keyFile, exitCode, chmodPath); } } } diff --git a/src/Runner.Listener/Configuration/WindowsServiceControlManager.cs b/src/Runner.Listener/Configuration/WindowsServiceControlManager.cs index 085aaffc90d..b374239b9f7 100644 --- a/src/Runner.Listener/Configuration/WindowsServiceControlManager.cs +++ b/src/Runner.Listener/Configuration/WindowsServiceControlManager.cs @@ -126,7 +126,7 @@ public void UnconfigureService() if (!_windowsServiceHelper.IsRunningInElevatedMode()) { Trace.Error("Needs Administrator privileges for unconfigure windows service runner."); - throw new SecurityException("Needs Administrator privileges for unconfiguring runner that running as windows service."); + throw new SecurityException("Needs Administrator privileges to remove runner running as Windows service."); } string serviceConfigPath = HostContext.GetConfigFile(WellKnownConfigFile.Service); diff --git a/src/Runner.Listener/JobDispatcher.cs b/src/Runner.Listener/JobDispatcher.cs index bbc09593c92..1d3114dc59f 100644 --- a/src/Runner.Listener/JobDispatcher.cs +++ b/src/Runner.Listener/JobDispatcher.cs @@ -98,7 +98,7 @@ public void Run(Pipelines.AgentJobRequestMessage jobRequestMessage, bool runOnce Guid dispatchedJobId = _jobDispatchedQueue.Dequeue(); if (_jobInfos.TryGetValue(dispatchedJobId, out currentDispatch)) { - Trace.Verbose($"Retrive previous WorkerDispatcher for job {currentDispatch.JobId}."); + Trace.Verbose($"Retrieve previous WorkerDispatcher for job {currentDispatch.JobId}."); } } @@ -144,7 +144,7 @@ public bool Cancel(JobCancelMessage jobCancelMessage) WorkerDispatcher workerDispatcher; if (!_jobInfos.TryGetValue(jobCancelMessage.JobId, out workerDispatcher)) { - Trace.Verbose($"Job request {jobCancelMessage.JobId} is not a current running job, ignore cancllation request."); + Trace.Verbose($"Job request {jobCancelMessage.JobId} is not a current running job, ignore cancellation request."); return false; } else @@ -167,7 +167,7 @@ public async Task WaitAsync(CancellationToken token) dispatchedJobId = _jobDispatchedQueue.Dequeue(); if (_jobInfos.TryGetValue(dispatchedJobId, out currentDispatch)) { - Trace.Verbose($"Retrive previous WorkerDispatcher for job {currentDispatch.JobId}."); + Trace.Verbose($"Retrieve previous WorkerDispatcher for job {currentDispatch.JobId}."); } } else @@ -259,9 +259,9 @@ private async Task EnsureDispatchFinished(WorkerDispatcher jobDispatch, bool can // based on the current design, server will only send one job for a given runner at a time. // if the runner received a new job request while a previous job request is still running, this typically indicates two situations - // 1. a runner bug caused a server and runner mismatch on the state of the job request, e.g. the runner didn't renew the jobrequest - // properly but thinks it still owns the job reqest, however the server has already abandoned the jobrequest. - // 2. a server bug or design change that allowed the server to send more than one job request to an given runner that hasn't finished + // 1. a runner bug caused a server and runner mismatch on the state of the job request, e.g. the runner didn't renew the job request + // properly but thinks it still owns the job request, however the server has already abandoned the job request. + // 2. a server bug or design change that allowed the server to send more than one job request to a given runner that hasn't finished //. a previous job request. var runnerServer = HostContext.GetService(); TaskAgentJobRequest request = null; @@ -425,7 +425,7 @@ private async Task RunAsync(Pipelines.AgentJobRequestMessage message, string orc using (var processInvoker = HostContext.CreateService()) { // Start the process channel. - // It's OK if StartServer bubbles an execption after the worker process has already started. + // It's OK if StartServer bubbles an exception after the worker process has already started. // The worker will shutdown after 30 seconds if it hasn't received the job message. processChannel.StartServer( // Delegate to start the child process. @@ -678,7 +678,7 @@ await processChannel.SendAsync( // worker haven't exit within cancellation timeout. if (completedTask != workerProcessTask) { - Trace.Info($"worker process for job {message.JobId} haven't exit within cancellation timout, kill running worker."); + Trace.Info($"worker process for job {message.JobId} haven't exit within cancellation timeout, kill running worker."); workerProcessCancelTokenSource.Cancel(); try { @@ -778,7 +778,7 @@ private async Task RenewJobRequestAsync(IRunServer runServer, Guid planId, Guid } catch (OperationCanceledException) when (token.IsCancellationRequested) { - // OperationCanceledException may caused by http timeout or _lockRenewalTokenSource.Cance(); + // OperationCanceledException may caused by http timeout or _lockRenewalTokenSource.Cancel(); // Stop renew only on cancellation token fired. Trace.Info($"job renew has been cancelled, stop renew job {jobId}."); return; @@ -801,7 +801,7 @@ private async Task RenewJobRequestAsync(IRunServer runServer, Guid planId, Guid } else { - // retry till reach lockeduntil + 5 mins extra buffer. + // retry till reach locked until + 5 mins extra buffer. remainingTime = request.LockedUntil.Value + TimeSpan.FromMinutes(5) - DateTime.UtcNow; } @@ -894,7 +894,7 @@ private async Task RenewJobRequestAsync(IRunnerServer runnerServer, int poolId, } catch (OperationCanceledException) when (token.IsCancellationRequested) { - // OperationCanceledException may caused by http timeout or _lockRenewalTokenSource.Cance(); + // OperationCanceledException may caused by http timeout or _lockRenewalTokenSource.Cancel(); // Stop renew only on cancellation token fired. Trace.Info($"job renew has been cancelled, stop renew job request {requestId}."); return; @@ -917,7 +917,7 @@ private async Task RenewJobRequestAsync(IRunnerServer runnerServer, int poolId, } else { - // retry till reach lockeduntil + 5 mins extra buffer. + // retry until locked-until + 5 mins extra buffer. remainingTime = request.LockedUntil.Value + TimeSpan.FromMinutes(5) - DateTime.UtcNow; } @@ -1025,10 +1025,10 @@ private async Task TryUploadUnfinishedLogs(Pipelines.AgentJobRequestMessage mess var logNameParts = logName.Split('_', StringSplitOptions.RemoveEmptyEntries); if (logNameParts.Length != 3) { - Trace.Warning($"log file '{log}' doesn't follow naming convension 'GUID_GUID_INT'."); + Trace.Warning($"log file '{log}' doesn't follow naming convention 'GUID_GUID_INT'."); continue; } - var logPageSeperator = logName.IndexOf('_'); + var logPageSeparator = logName.IndexOf('_'); var logRecordId = Guid.Empty; var pageNumber = 0; @@ -1040,13 +1040,13 @@ private async Task TryUploadUnfinishedLogs(Pipelines.AgentJobRequestMessage mess if (!Guid.TryParse(logNameParts[1], out logRecordId)) { - Trace.Warning($"log file '{log}' doesn't follow naming convension 'GUID_GUID_INT'."); + Trace.Warning($"log file '{log}' doesn't follow naming convention 'GUID_GUID_INT'."); continue; } if (!int.TryParse(logNameParts[2], out pageNumber)) { - Trace.Warning($"log file '{log}' doesn't follow naming convension 'GUID_GUID_INT'."); + Trace.Warning($"log file '{log}' doesn't follow naming convention 'GUID_GUID_INT'."); continue; } diff --git a/src/Runner.Listener/Program.cs b/src/Runner.Listener/Program.cs index 80852d32c4d..ae362cc9801 100644 --- a/src/Runner.Listener/Program.cs +++ b/src/Runner.Listener/Program.cs @@ -141,7 +141,7 @@ private async static Task MainAsync(IHostContext context, string[] args) } catch (AccessDeniedException e) when (e.ErrorCode == 1) { - terminal.WriteError($"An error occured: {e.Message}"); + terminal.WriteError($"An error occurred: {e.Message}"); trace.Error(e); return Constants.Runner.ReturnCode.TerminatedError; } diff --git a/src/Runner.Listener/Runner.cs b/src/Runner.Listener/Runner.cs index 8262d31f12d..33c5a72f791 100644 --- a/src/Runner.Listener/Runner.cs +++ b/src/Runner.Listener/Runner.cs @@ -47,7 +47,7 @@ public sealed class Runner : RunnerService, IRunner // // Helps avoid excessive calls to Run Service when encountering non-retriable errors from /acquirejob. // Normally we rely on the HTTP clients to back off between retry attempts. However, acquiring a job - // involves calls to both Run Serivce and Broker. And Run Service and Broker communicate with each other + // involves calls to both Run Service and Broker. And Run Service and Broker communicate with each other // in an async fashion. // // When Run Service encounters a non-retriable error, it sends an async message to Broker. The runner will, @@ -190,7 +190,7 @@ public async Task ExecuteCommand(CommandSettings command) // warmup runner process (JIT/CLR) // In scenarios where the runner is single use (used and then thrown away), the system provisioning the runner can call `Runner.Listener --warmup` before the machine is made available to the pool for use. - // this will optimizes the runner process startup time. + // this will optimize the runner process startup time. if (command.Warmup) { var binDir = HostContext.GetDirectory(WellKnownDirectory.Bin); @@ -293,7 +293,7 @@ public async Task ExecuteCommand(CommandSettings command) // We need try our best to make the startup type accurate // The problem is coming from runner autoupgrade, which result an old version service host binary but a newer version runner binary // At that time the servicehost won't pass --startuptype to Runner.Listener while the runner is actually running as service. - // We will guess the startup type only when the runner is configured as service and the guess will based on whether STDOUT/STDERR/STDIN been redirect or not + // We will guess the startup type only when the runner is configured as service and the guess will be based on whether STDOUT/STDERR/STDIN been redirect or not Trace.Info($"Try determine runner startup type base on console redirects."); startType = (Console.IsErrorRedirected && Console.IsInputRedirected && Console.IsOutputRedirected) ? StartupType.Service : StartupType.Manual; } @@ -518,7 +518,7 @@ private async Task RunAsync(RunnerSettings settings, bool runOnce = false) autoUpdateInProgress = false; if (await selfUpdateTask) { - Trace.Info("Auto update task finished at backend, an runner update is ready to apply exit the current runner instance."); + Trace.Info("Auto update task finished at backend, a runner update is ready to apply exit the current runner instance."); Trace.Info("Stop message queue looping."); messageQueueLoopTokenSource.Cancel(); try @@ -819,7 +819,7 @@ await configUpdater.UpdateRunnerConfigAsync( catch (Exception ex) when (runOnce) { // ignore exception during delete session for ephemeral runner since the runner might already be deleted from the server side - // and the delete session call will ends up with 401. + // and the delete session call will end up with 401. Trace.Info($"Ignore any exception during DeleteSession for an ephemeral runner. {ex}"); } } @@ -1079,7 +1079,7 @@ private void PrintUsage(CommandSettings command) _term.WriteLine($@" Commands: .{separator}config.{ext} Configures the runner - .{separator}config.{ext} remove Unconfigures the runner + .{separator}config.{ext} remove Deconfigures the runner .{separator}run.{ext} Runs the runner interactively. Does not require any options. Options: @@ -1101,7 +1101,7 @@ private void PrintUsage(CommandSettings command) --replace Replace any existing runner with the same name (default false) --pat GitHub personal access token with repo scope. Used for checking network connectivity when executing `.{separator}run.{ext} --check` --disableupdate Disable self-hosted runner automatic update to the latest released version` - --ephemeral Configure the runner to only take one job and then let the service un-configure the runner after the job finishes (default false)"); + --ephemeral Configure the runner to only take one job and then let the service deconfigure the runner after the job finishes (default false)"); #if OS_WINDOWS _term.WriteLine($@" --runasservice Run the runner as a service"); diff --git a/src/Runner.Listener/SelfUpdater.cs b/src/Runner.Listener/SelfUpdater.cs index 6ebeebd8270..66f171c7f83 100644 --- a/src/Runner.Listener/SelfUpdater.cs +++ b/src/Runner.Listener/SelfUpdater.cs @@ -631,7 +631,7 @@ private async Task UpdateRunnerUpdateStateAsync(string currentState) } catch (VssResourceNotFoundException) { - // ignore VssResourceNotFoundException, this exception means the runner is configured against a old server that doesn't support report runner update detail. + // ignore VssResourceNotFoundException, this exception means the runner is configured against an old server that doesn't support report runner update detail. Trace.Info($"Catch VssResourceNotFoundException during report update state, ignore this error for backcompat."); } catch (Exception ex) diff --git a/src/Runner.Plugins/Artifact/FileContainerServer.cs b/src/Runner.Plugins/Artifact/FileContainerServer.cs index d924ae59b45..856383c1248 100644 --- a/src/Runner.Plugins/Artifact/FileContainerServer.cs +++ b/src/Runner.Plugins/Artifact/FileContainerServer.cs @@ -103,9 +103,9 @@ public async Task DownloadFromContainerAsync( } // container items will include both folders, files and even file with zero size - // Create all required empty folders and emptry files, gather a list of files that we need to download from server. + // Create all required empty folders and empty files, gather a list of files that we need to download from server. int foldersCreated = 0; - int emptryFilesCreated = 0; + int emptyFilesCreated = 0; List downloadFiles = new(); foreach (var item in containerItems.OrderBy(x => x.Path)) { @@ -134,7 +134,7 @@ public async Task DownloadFromContainerAsync( using (new FileStream(localPath, FileMode.Create)) { } - emptryFilesCreated++; + emptyFilesCreated++; } else { @@ -153,9 +153,9 @@ public async Task DownloadFromContainerAsync( context.Output($"{foldersCreated} folders created."); } - if (emptryFilesCreated > 0) + if (emptyFilesCreated > 0) { - context.Output($"{emptryFilesCreated} empty files created."); + context.Output($"{emptyFilesCreated} empty files created."); } if (downloadFiles.Count == 0) diff --git a/src/Runner.Plugins/Artifact/PublishArtifact.cs b/src/Runner.Plugins/Artifact/PublishArtifact.cs index 56408ea6544..553f3958f90 100644 --- a/src/Runner.Plugins/Artifact/PublishArtifact.cs +++ b/src/Runner.Plugins/Artifact/PublishArtifact.cs @@ -35,7 +35,7 @@ public async Task RunAsync( if (String.IsNullOrWhiteSpace(artifactName)) { - throw new ArgumentException($"Artifact name can not be empty string"); + throw new ArgumentException($"Artifact name cannot be empty string"); } if (Path.GetInvalidFileNameChars().Any(x => artifactName.Contains(x))) diff --git a/src/Runner.Plugins/Repository/GitCliManager.cs b/src/Runner.Plugins/Repository/GitCliManager.cs index 5a0790e7f9c..f37562af350 100644 --- a/src/Runner.Plugins/Repository/GitCliManager.cs +++ b/src/Runner.Plugins/Repository/GitCliManager.cs @@ -451,7 +451,7 @@ public async Task GitGetFetchUrl(RunnerActionPluginExecutionContext context } else { - context.Debug($"The Origin fetch url from git config: {remoteFetchUrl} is not a absolute well formed url."); + context.Debug($"The Origin fetch url from git config: {remoteFetchUrl} is not a well-formed absolute url."); } } else diff --git a/src/Runner.Plugins/Repository/v1.0/GitSourceProvider.cs b/src/Runner.Plugins/Repository/v1.0/GitSourceProvider.cs index bff5eccd64d..004f843d6fc 100644 --- a/src/Runner.Plugins/Repository/v1.0/GitSourceProvider.cs +++ b/src/Runner.Plugins/Repository/v1.0/GitSourceProvider.cs @@ -205,7 +205,7 @@ public async Task GetSourceAsync( int exitCode_clean = await gitCommandManager.GitClean(executionContext, targetPath); if (exitCode_clean != 0) { - executionContext.Debug($"'git clean -ffdx' failed with exit code {exitCode_clean}, this normally caused by:\n 1) Path too long\n 2) Permission issue\n 3) File in use\nFor futher investigation, manually run 'git clean -ffdx' on repo root: {targetPath} after each build."); + executionContext.Debug($"'git clean -ffdx' failed with exit code {exitCode_clean}, this normally caused by:\n 1) Path too long\n 2) Permission issue\n 3) File in use\nFor further investigation, manually run 'git clean -ffdx' on repo root: {targetPath} after each build."); softCleanSucceed = false; } @@ -215,7 +215,7 @@ public async Task GetSourceAsync( int exitCode_reset = await gitCommandManager.GitReset(executionContext, targetPath); if (exitCode_reset != 0) { - executionContext.Debug($"'git reset --hard HEAD' failed with exit code {exitCode_reset}\nFor futher investigation, manually run 'git reset --hard HEAD' on repo root: {targetPath} after each build."); + executionContext.Debug($"'git reset --hard HEAD' failed with exit code {exitCode_reset}\nFor further investigation, manually run 'git reset --hard HEAD' on repo root: {targetPath} after each build."); softCleanSucceed = false; } } @@ -228,7 +228,7 @@ public async Task GetSourceAsync( int exitCode_submoduleclean = await gitCommandManager.GitSubmoduleClean(executionContext, targetPath); if (exitCode_submoduleclean != 0) { - executionContext.Debug($"'git submodule foreach git clean -ffdx' failed with exit code {exitCode_submoduleclean}\nFor futher investigation, manually run 'git submodule foreach git clean -ffdx' on repo root: {targetPath} after each build."); + executionContext.Debug($"'git submodule foreach git clean -ffdx' failed with exit code {exitCode_submoduleclean}\nFor further investigation, manually run 'git submodule foreach git clean -ffdx' on repo root: {targetPath} after each build."); softCleanSucceed = false; } } @@ -238,7 +238,7 @@ public async Task GetSourceAsync( int exitCode_submodulereset = await gitCommandManager.GitSubmoduleReset(executionContext, targetPath); if (exitCode_submodulereset != 0) { - executionContext.Debug($"'git submodule foreach git reset --hard HEAD' failed with exit code {exitCode_submodulereset}\nFor futher investigation, manually run 'git submodule foreach git reset --hard HEAD' on repo root: {targetPath} after each build."); + executionContext.Debug($"'git submodule foreach git reset --hard HEAD' failed with exit code {exitCode_submodulereset}\nFor further investigation, manually run 'git submodule foreach git reset --hard HEAD' on repo root: {targetPath} after each build."); softCleanSucceed = false; } } @@ -306,7 +306,7 @@ public async Task GetSourceAsync( if (gitLfsSupport) { // Initialize git lfs by execute 'git lfs install' - executionContext.Debug("Setup the local Git hooks for Git LFS."); + executionContext.Debug("Set up the local Git hooks for Git LFS."); int exitCode_lfsInstall = await gitCommandManager.GitLFSInstall(executionContext, targetPath); if (exitCode_lfsInstall != 0) { @@ -351,7 +351,7 @@ public async Task GetSourceAsync( } // fetch lfs object upfront, this will avoid fetch lfs object during checkout which cause checkout taking forever - // since checkout will fetch lfs object 1 at a time, while git lfs fetch will fetch lfs object in parallel. + // since checkout will fetch lfs object one at a time, while git lfs fetch will fetch lfs object in parallel. if (gitLfsSupport) { int exitCode_lfsFetch = await gitCommandManager.GitLFSFetch(executionContext, targetPath, "origin", sourcesToBuild, string.Join(" ", additionalLfsFetchArgs), cancellationToken); diff --git a/src/Runner.Plugins/Repository/v1.1/GitSourceProvider.cs b/src/Runner.Plugins/Repository/v1.1/GitSourceProvider.cs index 1eddc0ba1ce..ae6f3be7214 100644 --- a/src/Runner.Plugins/Repository/v1.1/GitSourceProvider.cs +++ b/src/Runner.Plugins/Repository/v1.1/GitSourceProvider.cs @@ -189,7 +189,7 @@ public async Task GetSourceAsync( int exitCode_clean = await gitCommandManager.GitClean(executionContext, targetPath); if (exitCode_clean != 0) { - executionContext.Debug($"'git clean -ffdx' failed with exit code {exitCode_clean}, this normally caused by:\n 1) Path too long\n 2) Permission issue\n 3) File in use\nFor futher investigation, manually run 'git clean -ffdx' on repo root: {targetPath} after each build."); + executionContext.Debug($"'git clean -ffdx' failed with exit code {exitCode_clean}, this normally caused by:\n 1) Path too long\n 2) Permission issue\n 3) File in use\nFor further investigation, manually run 'git clean -ffdx' on repo root: {targetPath} after each build."); softCleanSucceed = false; } @@ -199,7 +199,7 @@ public async Task GetSourceAsync( int exitCode_reset = await gitCommandManager.GitReset(executionContext, targetPath); if (exitCode_reset != 0) { - executionContext.Debug($"'git reset --hard HEAD' failed with exit code {exitCode_reset}\nFor futher investigation, manually run 'git reset --hard HEAD' on repo root: {targetPath} after each build."); + executionContext.Debug($"'git reset --hard HEAD' failed with exit code {exitCode_reset}\nFor further investigation, manually run 'git reset --hard HEAD' on repo root: {targetPath} after each build."); softCleanSucceed = false; } } @@ -212,7 +212,7 @@ public async Task GetSourceAsync( int exitCode_submoduleclean = await gitCommandManager.GitSubmoduleClean(executionContext, targetPath); if (exitCode_submoduleclean != 0) { - executionContext.Debug($"'git submodule foreach git clean -ffdx' failed with exit code {exitCode_submoduleclean}\nFor futher investigation, manually run 'git submodule foreach git clean -ffdx' on repo root: {targetPath} after each build."); + executionContext.Debug($"'git submodule foreach git clean -ffdx' failed with exit code {exitCode_submoduleclean}\nFor further investigation, manually run 'git submodule foreach git clean -ffdx' on repo root: {targetPath} after each build."); softCleanSucceed = false; } } @@ -222,7 +222,7 @@ public async Task GetSourceAsync( int exitCode_submodulereset = await gitCommandManager.GitSubmoduleReset(executionContext, targetPath); if (exitCode_submodulereset != 0) { - executionContext.Debug($"'git submodule foreach git reset --hard HEAD' failed with exit code {exitCode_submodulereset}\nFor futher investigation, manually run 'git submodule foreach git reset --hard HEAD' on repo root: {targetPath} after each build."); + executionContext.Debug($"'git submodule foreach git reset --hard HEAD' failed with exit code {exitCode_submodulereset}\nFor further investigation, manually run 'git submodule foreach git reset --hard HEAD' on repo root: {targetPath} after each build."); softCleanSucceed = false; } } @@ -295,7 +295,7 @@ public async Task GetSourceAsync( if (gitLfsSupport) { // Initialize git lfs by execute 'git lfs install' - executionContext.Debug("Setup the local Git hooks for Git LFS."); + executionContext.Debug("Set up the local Git hooks for Git LFS."); int exitCode_lfsInstall = await gitCommandManager.GitLFSInstall(executionContext, targetPath); if (exitCode_lfsInstall != 0) { @@ -334,7 +334,7 @@ public async Task GetSourceAsync( } // fetch lfs object upfront, this will avoid fetch lfs object during checkout which cause checkout taking forever - // since checkout will fetch lfs object 1 at a time, while git lfs fetch will fetch lfs object in parallel. + // since checkout will fetch lfs object one at a time, while git lfs fetch will fetch lfs object in parallel. if (gitLfsSupport) { int exitCode_lfsFetch = await gitCommandManager.GitLFSFetch(executionContext, targetPath, "origin", sourcesToBuild, string.Join(" ", additionalLfsFetchArgs), cancellationToken); diff --git a/src/Runner.Sdk/ProcessInvoker.cs b/src/Runner.Sdk/ProcessInvoker.cs index 7270faf5dc9..25af0a6f283 100644 --- a/src/Runner.Sdk/ProcessInvoker.cs +++ b/src/Runner.Sdk/ProcessInvoker.cs @@ -297,7 +297,7 @@ public async Task ExecuteAsync( _stopWatch = Stopwatch.StartNew(); _proc.Start(); - // Decrease invoked process priority, in platform specifc way, relative to parent + // Decrease invoked process priority, in platform specific way, relative to parent if (!highPriorityProcess) { DecreaseProcessPriority(_proc); @@ -704,11 +704,11 @@ private void WindowsKillProcessTree() } Trace.Verbose($"Start killing process tree of process '{pid.Value}'."); - Stack processesNeedtoKill = new Stack(); - processesNeedtoKill.Push(new ProcessTerminationInfo(pid.Value, false)); - while (processesNeedtoKill.Count() > 0) + Stack processesToKill = new Stack(); + processesToKill.Push(new ProcessTerminationInfo(pid.Value, false)); + while (processesToKill.Count() > 0) { - ProcessTerminationInfo procInfo = processesNeedtoKill.Pop(); + ProcessTerminationInfo procInfo = processesToKill.Pop(); List childProcessesIds = new List(); if (!procInfo.ChildPidExpanded) { @@ -719,11 +719,11 @@ private void WindowsKillProcessTree() if (childProcessesIds.Count > 0) { Trace.Info($"Need kill all child processes trees before kill process '{procInfo.Pid}'."); - processesNeedtoKill.Push(new ProcessTerminationInfo(procInfo.Pid, true)); + processesToKill.Push(new ProcessTerminationInfo(procInfo.Pid, true)); foreach (var childPid in childProcessesIds) { Trace.Info($"Child process '{childPid}' needs be killed first."); - processesNeedtoKill.Push(new ProcessTerminationInfo(childPid, false)); + processesToKill.Push(new ProcessTerminationInfo(childPid, false)); } } else diff --git a/src/Runner.Sdk/Util/IOUtil.cs b/src/Runner.Sdk/Util/IOUtil.cs index e0b5b3394f7..7e07c0b8096 100644 --- a/src/Runner.Sdk/Util/IOUtil.cs +++ b/src/Runner.Sdk/Util/IOUtil.cs @@ -260,7 +260,7 @@ public static void MoveDirectory(string sourceDir, string targetDir, string stag /// /// Given a path and directory, return the path relative to the directory. If the path is not - /// under the directory the path is returned un modified. Examples: + /// under the directory then the path is returned unmodified. Examples: /// MakeRelative(@"d:\src\project\foo.cpp", @"d:\src") -> @"project\foo.cpp" /// MakeRelative(@"d:\src\project\foo.cpp", @"d:\specs") -> @"d:\src\project\foo.cpp" /// MakeRelative(@"d:\src\project\foo.cpp", @"d:\src\proj") -> @"d:\src\project\foo.cpp" @@ -326,7 +326,7 @@ public static string ResolvePath(String rootPath, String relativePath) } else if (Path.IsPathRooted(relativePath)) { - throw new InvalidOperationException($"{relativePath} can not be a rooted path."); + throw new InvalidOperationException($"{relativePath} cannot be a rooted path."); } else { diff --git a/src/Runner.Service/Windows/Resource.Designer.cs b/src/Runner.Service/Windows/Resource.Designer.cs index 503aca55614..4f3752c6614 100644 --- a/src/Runner.Service/Windows/Resource.Designer.cs +++ b/src/Runner.Service/Windows/Resource.Designer.cs @@ -133,7 +133,7 @@ internal static string RunnerUpdateSucceed { } /// - /// Looks up a localized string similar to Crash servicehost to trigger SCM restart the serivce.. + /// Looks up a localized string similar to Crash servicehost to trigger SCM restart the service. /// internal static string CrashServiceHost { get { diff --git a/src/Runner.Service/Windows/Resource.resx b/src/Runner.Service/Windows/Resource.resx index 56c2c16132d..63b3ccad9e4 100644 --- a/src/Runner.Service/Windows/Resource.resx +++ b/src/Runner.Service/Windows/Resource.resx @@ -139,7 +139,7 @@ Runner listener has been updated to latest, restart the service to update the servicehost itself. - Crash servicehost to trigger SCM restart the serivce. + Crash servicehost to trigger SCM restart the service. Runner listener exit with undefined return code, re-launch runner in 5 seconds. diff --git a/src/Runner.Service/Windows/RunnerService.cs b/src/Runner.Service/Windows/RunnerService.cs index ca2652f624e..a5c901cbef8 100644 --- a/src/Runner.Service/Windows/RunnerService.cs +++ b/src/Runner.Service/Windows/RunnerService.cs @@ -246,7 +246,7 @@ private RunnerUpdateResult HandleRunnerUpdate() FileInfo[] updateLogs = dirInfo.GetFiles("SelfUpdate-*-*.log.*") ?? new FileInfo[0]; if (updateLogs.Length == 0) { - // totally wrong, we are not even get a update log. + // totally wrong, we are not even able to get an update log. return RunnerUpdateResult.Failed; } else diff --git a/src/Runner.Worker/ActionManager.cs b/src/Runner.Worker/ActionManager.cs index e38ea4d28cd..51922cd24ee 100644 --- a/src/Runner.Worker/ActionManager.cs +++ b/src/Runner.Worker/ActionManager.cs @@ -700,7 +700,7 @@ private async Task BuildActionContainerAsync(IExecutionContext executionContext, catch (Exception ex) when (!executionContext.CancellationToken.IsCancellationRequested) // Do not retry if the run is cancelled. { // UnresolvableActionDownloadInfoException is a 422 client error, don't retry - // NonRetryableActionDownloadInfoException is an non-retryable exception from Actions + // NonRetryableActionDownloadInfoException is a non-retryable exception from Actions // Some possible cases are: // * Repo is rate limited // * Repo or tag doesn't exist, or isn't public @@ -855,7 +855,7 @@ private async Task DownloadRepositoryActionAsync(IExecutionContext executionCont } catch (InvalidDataException e) { - throw new InvalidActionArchiveException($"Can't un-zip archive file: {archiveFile}. action being checked out: {downloadInfo.NameWithOwner}@{downloadInfo.Ref}. error: {e}."); + throw new InvalidActionArchiveException($"Can't unzip archive file: {archiveFile}. action being checked out: {downloadInfo.NameWithOwner}@{downloadInfo.Ref}. error: {e}."); } #else string tar = WhichUtil.Which("tar", require: true, trace: Trace); diff --git a/src/Runner.Worker/ActionRunner.cs b/src/Runner.Worker/ActionRunner.cs index da967468a33..a4f0ad136ce 100644 --- a/src/Runner.Worker/ActionRunner.cs +++ b/src/Runner.Worker/ActionRunner.cs @@ -153,7 +153,7 @@ Action.Reference is Pipelines.RepositoryPathReference repoAction && ExecutionContext.SetGitHubContext("action_ref", null); } - // Setup container stephost for running inside the container. + // Set up container step host for running inside the container. if (ExecutionContext.Global.Container != null) { // Make sure the required container is already created @@ -245,7 +245,7 @@ Action.Reference is Pipelines.RepositoryPathReference repoAction && #else var envContext = ExecutionContext.ExpressionValues["env"] as CaseSensitiveDictionaryContextData; #endif - // Apply environment from env context, env context contains job level env and action's evn block + // Apply environment from env context, env context contains job level env and action's env block foreach (var env in envContext) { environment[env.Key] = env.Value.ToString(); @@ -312,7 +312,7 @@ public bool TryUpdateDisplayName(out bool updated) } catch (Exception ex) { - Trace.Warning("Caught exception while attempting to evaulate/update the step's DisplayName. Exception Details: {0}", ex); + Trace.Warning("Caught exception while attempting to evaluate/update the step's DisplayName. Exception Details: {0}", ex); } // For consistency with other implementations of TryUpdateDisplayName we use !string.IsNullOrEmpty below, diff --git a/src/Runner.Worker/Container/DockerUtil.cs b/src/Runner.Worker/Container/DockerUtil.cs index 8eb922493f9..b0af1134120 100644 --- a/src/Runner.Worker/Container/DockerUtil.cs +++ b/src/Runner.Worker/Container/DockerUtil.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; @@ -53,7 +53,7 @@ public static string ParsePathFromConfigEnv(IList configEnvLines) public static string ParseRegistryHostnameFromImageName(string name) { var nameSplit = name.Split('/'); - // Single slash is implictly from Dockerhub, unless first part has .tld or :port + // Single slash is implicitly from Dockerhub, unless first part has .tld or :port if (nameSplit.Length == 2 && (nameSplit[0].Contains(":") || nameSplit[0].Contains("."))) { return nameSplit[0]; diff --git a/src/Runner.Worker/ContainerOperationProvider.cs b/src/Runner.Worker/ContainerOperationProvider.cs index c5cccb77ef0..90bf8a10d9c 100644 --- a/src/Runner.Worker/ContainerOperationProvider.cs +++ b/src/Runner.Worker/ContainerOperationProvider.cs @@ -538,7 +538,7 @@ private async Task AssertCompatibleOS(IExecutionContext executionContext) { // Check whether we are inside a container. // Our container feature requires to map working directory from host to the container. - // If we are already inside a container, we will not able to find out the real working direcotry path on the host. + // If we are already inside a container, we will not able to find out the real working directory path on the host. #if OS_WINDOWS #pragma warning disable CA1416 // service CExecSvc is Container Execution Agent. diff --git a/src/Runner.Worker/DiagnosticLogManager.cs b/src/Runner.Worker/DiagnosticLogManager.cs index afc811b15e4..1ecd5e22d3d 100644 --- a/src/Runner.Worker/DiagnosticLogManager.cs +++ b/src/Runner.Worker/DiagnosticLogManager.cs @@ -129,7 +129,7 @@ private List GetWorkerDiagnosticLogFiles(string diagnosticFolder, DateTi var workerLogFiles = new List(); var directoryInfo = new DirectoryInfo(diagnosticFolder); - // Sometimes the timing is off between the job start time and the time the worker log file is created. + // Sometimes the timing is off between the job start time and the time when the worker log file is created. // This adds a small buffer that provides some leeway in case the worker log file was created slightly // before the time we log as job start time. int bufferInSeconds = -30; diff --git a/src/Runner.Worker/ExecutionContext.cs b/src/Runner.Worker/ExecutionContext.cs index 5646d46aa53..752149e7e1f 100644 --- a/src/Runner.Worker/ExecutionContext.cs +++ b/src/Runner.Worker/ExecutionContext.cs @@ -1498,7 +1498,7 @@ internal TemplateTraceWriter(IExecutionContext executionContext) public void Error(string format, params Object[] args) { - /* TraceWriter should be used for logging and not creating erros. */ + /* TraceWriter should be used for logging and not creating errors. */ if (logTemplateErrorsAsDebugMessages()) { _executionContext.Debug(string.Format(CultureInfo.CurrentCulture, format, args)); diff --git a/src/Runner.Worker/Expressions/HashFilesFunction.cs b/src/Runner.Worker/Expressions/HashFilesFunction.cs index ddd318c3c4a..515b09dcb60 100644 --- a/src/Runner.Worker/Expressions/HashFilesFunction.cs +++ b/src/Runner.Worker/Expressions/HashFilesFunction.cs @@ -56,7 +56,7 @@ protected sealed override Object EvaluateCore( } else { - throw new ArgumentOutOfRangeException($"Invalid glob option {parameterString}, avaliable option: '--follow-symbolic-links'."); + throw new ArgumentOutOfRangeException($"Invalid glob option {parameterString}, available option: '--follow-symbolic-links'."); } } } @@ -189,7 +189,7 @@ protected sealed override Object EvaluateCore( } else { - throw new ArgumentOutOfRangeException($"Invalid glob option {parameterString}, avaliable option: '--follow-symbolic-links'."); + throw new ArgumentOutOfRangeException($"Invalid glob option {parameterString}, available option: '--follow-symbolic-links'."); } } } diff --git a/src/Runner.Worker/Handlers/Handler.cs b/src/Runner.Worker/Handlers/Handler.cs index 5d77a051768..05622a17186 100644 --- a/src/Runner.Worker/Handlers/Handler.cs +++ b/src/Runner.Worker/Handlers/Handler.cs @@ -28,8 +28,8 @@ public interface IHandler : IRunnerService public abstract class Handler : RunnerService { #if OS_WINDOWS - // In windows OS the maximum supported size of a environment variable value is 32k. - // You can set environment variable greater then 32K, but that variable will not be able to read in node.exe. + // In windows OS the maximum supported size of an environment variable value is 32k. + // You can set environment variable greater than 32K, but that variable will not be able to read in node.exe. private const int _environmentVariableMaximumSize = 32766; #endif diff --git a/src/Runner.Worker/Handlers/ScriptHandler.cs b/src/Runner.Worker/Handlers/ScriptHandler.cs index b898f051ded..f32c8026fdc 100644 --- a/src/Runner.Worker/Handlers/ScriptHandler.cs +++ b/src/Runner.Worker/Handlers/ScriptHandler.cs @@ -247,7 +247,7 @@ public async Task RunAsync(ActionRunStage stage) string scriptFilePath, resolvedScriptPath; if (IsActionStep) { - // We do not not the full path until we know what shell is being used, so that we can determine the file extension + // We do not know the full path until we know what shell is being used, so that we can determine the file extension scriptFilePath = Path.Combine(tempDirectory, $"{Guid.NewGuid()}{ScriptHandlerHelpers.GetScriptFileExtension(shellCommand)}"); resolvedScriptPath = StepHost.ResolvePathForStepHost(ExecutionContext, scriptFilePath).Replace("\"", "\\\""); } diff --git a/src/Runner.Worker/Handlers/StepHost.cs b/src/Runner.Worker/Handlers/StepHost.cs index 211009658e4..52076fc0682 100644 --- a/src/Runner.Worker/Handlers/StepHost.cs +++ b/src/Runner.Worker/Handlers/StepHost.cs @@ -118,7 +118,7 @@ public string ResolvePathForStepHost(IExecutionContext executionContext, string ArgUtil.NotNull(Container, nameof(Container)); if (!FeatureManager.IsContainerHooksEnabled(executionContext.Global?.Variables)) { - // TODO: Remove nullcheck with executionContext.Global? by setting up ExecutionContext.Global at GitHub.Runner.Common.Tests.Worker.ExecutionContextL0.GetExpressionValues_ContainerStepHost + // TODO: Remove null check with executionContext.Global? by setting up ExecutionContext.Global at GitHub.Runner.Common.Tests.Worker.ExecutionContextL0.GetExpressionValues_ContainerStepHost ArgUtil.NotNullOrEmpty(Container.ContainerId, nameof(Container.ContainerId)); } @@ -161,7 +161,7 @@ public async Task DetermineNodeRuntimeVersion(IExecutionContext executio // Best effort to determine a compatible node runtime // There may be more variation in which libraries are linked than just musl/glibc, - // so determine based on known distribtutions instead + // so determine based on known distributions instead var osReleaseIdCmd = "sh -c \"cat /etc/*release | grep ^ID\""; var dockerManager = HostContext.GetService(); @@ -243,7 +243,7 @@ await containerHookManager.RunScriptStepAsync(context, // [ARG...] dockerCommandArgs.Add(arguments); - string dockerCommandArgstring = string.Join(" ", dockerCommandArgs); + string dockerCommandArgString = string.Join(" ", dockerCommandArgs); TranslateToContainerPath(environment); using (var processInvoker = HostContext.CreateService()) @@ -260,7 +260,7 @@ await containerHookManager.RunScriptStepAsync(context, #endif return await processInvoker.ExecuteAsync(workingDirectory: HostContext.GetDirectory(WellKnownDirectory.Work), fileName: dockerClientPath, - arguments: dockerCommandArgstring, + arguments: dockerCommandArgString, environment: environment, requireExitCodeZero: requireExitCodeZero, outputEncoding: outputEncoding, diff --git a/src/Runner.Worker/JobExtension.cs b/src/Runner.Worker/JobExtension.cs index ea36034ecb0..1289275f4a2 100644 --- a/src/Runner.Worker/JobExtension.cs +++ b/src/Runner.Worker/JobExtension.cs @@ -407,10 +407,10 @@ public async Task> InitializeJob(IExecutionContext jobContext, Pipel if (snapshotRequest != null) { var snapshotOperationProvider = HostContext.GetService(); - // Check that that runner is capable of taking a snapshot + // Check that the runner is capable of taking a snapshot snapshotOperationProvider.RunSnapshotPreflightChecks(context); - // Add postjob step to write snapshot file + // Add post job step to write snapshot file jobContext.RegisterPostJobStep(new JobExtensionRunner( runAsync: (executionContext, _) => snapshotOperationProvider.CreateSnapshotRequestAsync(executionContext, snapshotRequest), condition: snapshotRequest.Condition, diff --git a/src/Runner.Worker/JobRunner.cs b/src/Runner.Worker/JobRunner.cs index 72ee5a403ad..dde07e0b9e4 100644 --- a/src/Runner.Worker/JobRunner.cs +++ b/src/Runner.Worker/JobRunner.cs @@ -85,7 +85,7 @@ public async Task RunAsync(AgentJobRequestMessage message, Cancellat } else { - // Setup the job server and job server queue. + // Set up the job server and job server queue. var jobServer = HostContext.GetService(); VssCredentials jobServerCredential = VssUtil.GetVssCredential(systemConnection); Uri jobServerUrl = systemConnection.Url; @@ -528,7 +528,7 @@ private async Task WarningOutdatedRunnerAsync(IExecutionContext jobContext, Pipe if (result == TaskResult.Failed && warnOnFailedJob) { - jobContext.Warning($"This job failure may be caused by using an out of date version of GitHub runner on your self-hosted runner. You are currently using GitHub runner version {currentVersion}. Please update to the latest version {serverPackages[0].Version}"); + jobContext.Warning($"This job failure may be caused by using an out-of-date version of GitHub runner on your self-hosted runner. You are currently using GitHub runner version {currentVersion}. Please update to the latest version {serverPackages[0].Version}"); } else if (warnOnOldRunnerVersion) { diff --git a/src/Runner.Worker/Program.cs b/src/Runner.Worker/Program.cs index c4f23f943ec..f4f0056137d 100644 --- a/src/Runner.Worker/Program.cs +++ b/src/Runner.Worker/Program.cs @@ -25,7 +25,7 @@ public static async Task MainAsync(IHostContext context, string[] args) await WaitForDebugger(trace); } - // We may want to consider registering this handler in Worker.cs, similiar to the unloading/SIGTERM handler + // We may want to consider registering this handler in Worker.cs, similar to the unloading/SIGTERM handler //ITerminal registers a CTRL-C handler, which keeps the Runner.Worker process running //and lets the Runner.Listener handle gracefully the exit. var term = context.GetService(); diff --git a/src/Runner.Worker/Variables.cs b/src/Runner.Worker/Variables.cs index 916b82dc6a1..0dcf7fcb440 100644 --- a/src/Runner.Worker/Variables.cs +++ b/src/Runner.Worker/Variables.cs @@ -61,7 +61,7 @@ public Variables(IHostContext hostContext, IDictionary co } // DO NOT add file path variable to here. - // All file path variables needs to be retrive and set through ExecutionContext, so it can handle container file path translation. + // All file path variables needs to be retrieve and set through ExecutionContext, so it can handle container file path translation. public string Build_Number => Get(SdkConstants.Variables.Build.BuildNumber); #if OS_WINDOWS diff --git a/src/Runner.Worker/Worker.cs b/src/Runner.Worker/Worker.cs index 4784c169314..dd3465d7c29 100644 --- a/src/Runner.Worker/Worker.cs +++ b/src/Runner.Worker/Worker.cs @@ -152,7 +152,7 @@ private void InitializeSecretMasker(Pipelines.AgentJobRequestMessage message) var value = variable.Value.Value?.Trim() ?? string.Empty; // Add the entire value, even if it contains CR or LF. During expression tracing, - // invidual trace info may contain line breaks. + // individual trace info may contain line breaks. HostContext.SecretMasker.AddValue(value); // Also add each individual line. Typically individual lines are processed from STDOUT of child processes. diff --git a/src/Sdk/Common/Common/Authentication/IssuedTokenProvider.cs b/src/Sdk/Common/Common/Authentication/IssuedTokenProvider.cs index e098bfd7562..36d26c6592d 100644 --- a/src/Sdk/Common/Common/Authentication/IssuedTokenProvider.cs +++ b/src/Sdk/Common/Common/Authentication/IssuedTokenProvider.cs @@ -266,8 +266,8 @@ public async Task GetTokenAsync( { // It may seem strange to pass the string value of TotalSeconds into this method, but testing // showed that ETW is persnickety when you register a method in an EventSource that doesn't - // use strings or integers as its parameters. It is easier to simply give the method a string - // than figure out to get ETW to reliably accept a double or TimeSpan. + // use strings or integers as its parameters. It is easier to simply give a string to the method + // than figure out how to get ETW to reliably accept a double or TimeSpan. VssHttpEventSource.Log.AuthorizationDelayed(getTokenTime.TotalSeconds.ToString()); } } @@ -294,7 +294,7 @@ protected virtual Task OnGetTokenAsync( } /// - /// Invoked when the current token is being validated. When overriden in a derived class, + /// Invoked when the current token is being validated. When overridden in a derived class, /// validate and return the validated token. /// /// Is called inside a lock in ValidateToken diff --git a/src/Sdk/Common/Common/Authentication/VssCredentials.cs b/src/Sdk/Common/Common/Authentication/VssCredentials.cs index c29c5fa3119..ddf5156c839 100644 --- a/src/Sdk/Common/Common/Authentication/VssCredentials.cs +++ b/src/Sdk/Common/Common/Authentication/VssCredentials.cs @@ -71,7 +71,7 @@ public VssCredentials(FederatedCredential federatedCredential) /// credential. /// /// The federated credential to use for authentication - /// CredentialPromptType.PromptIfNeeded if interactive prompts are allowed, otherwise CredentialProptType.DoNotPrompt + /// CredentialPromptType.PromptIfNeeded if interactive prompts are allowed, otherwise CredentialPromptType.DoNotPrompt public VssCredentials( FederatedCredential federatedCredential, CredentialPromptType promptType) @@ -84,7 +84,7 @@ public VssCredentials( /// credential. /// /// The federated credential to use for authentication - /// CredentialPromptType.PromptIfNeeded if interactive prompts are allowed; otherwise, CredentialProptType.DoNotPrompt + /// CredentialPromptType.PromptIfNeeded if interactive prompts are allowed; otherwise, CredentialPromptType.DoNotPrompt /// An optional TaskScheduler to ensure credentials prompting occurs on the UI thread public VssCredentials( FederatedCredential federatedCredential, @@ -99,7 +99,7 @@ public VssCredentials( /// credential. /// /// The federated credential to use for authentication - /// CredentialPromptType.PromptIfNeeded if interactive prompts are allowed; otherwise, CredentialProptType.DoNotPrompt + /// CredentialPromptType.PromptIfNeeded if interactive prompts are allowed; otherwise, CredentialPromptType.DoNotPrompt /// An optional TaskScheduler to ensure credentials prompting occurs on the UI thread /// An optional IVssCredentialPrompt to perform prompting for credentials public VssCredentials( @@ -114,7 +114,7 @@ public VssCredentials( { // If we use TaskScheduler.FromCurrentSynchronizationContext() here and this is executing under the UI // thread, for example from an event handler in a WinForms applications, this TaskScheduler will capture - // the UI SyncrhonizationContext whose MaximumConcurrencyLevel is 1 and only has a single thread to + // the UI SynchronizationContext whose MaximumConcurrencyLevel is 1 and only has a single thread to // execute queued work. Then, if the UI thread invokes one of our synchronous methods that are just // wrappers that block until the asynchronous overload returns, and if the async Task queues work to // this TaskScheduler, like GitHub.Services.CommonGetTokenOperation.GetTokenAsync does, @@ -291,7 +291,7 @@ public bool TryGetTokenProvider( /// Determines if the web response is an authentication redirect for issued token providers. /// /// The web response - /// True if this is an token authentication redirect, false otherwise + /// True if this is a token authentication redirect, false otherwise internal bool IsAuthenticationChallenge(IHttpResponse webResponse) { if (webResponse == null) diff --git a/src/Sdk/Common/Common/ClientStorage/IVssClientStorage.cs b/src/Sdk/Common/Common/ClientStorage/IVssClientStorage.cs index d3529b9102b..1536f113253 100644 --- a/src/Sdk/Common/Common/ClientStorage/IVssClientStorage.cs +++ b/src/Sdk/Common/Common/ClientStorage/IVssClientStorage.cs @@ -38,13 +38,13 @@ public interface IVssClientStorageReader T ReadEntry(string path); /// - /// Reads one entry from the storage. If the entry does not exist or can not be converted to type T, the default value provided will be returned. + /// Reads one entry from the storage. If the entry does not exist or cannot be converted to type T, the default value provided will be returned. /// When T is not a simple type, and there is extra logic to determine the default value, the pattern: ReadEntry<T>(path) && GetDefault(); is /// preferred, so that method to retrieve the default is not evaluated unless the entry does not exist. /// /// The type to return. /// This is the path key for the data to retrieve. - /// The value to return if the key does not exist or the value can not be converted to type T + /// The value to return if the key does not exist or the value cannot be converted to type T /// T ReadEntry(string path, T defaultValue); @@ -65,7 +65,7 @@ public interface IVssClientStorageWriter /// /// Write one entry into the local data storage. /// - /// This is the key for the data to store. Providing a path allows data to be accessed hierarchicaly. + /// This is the key for the data to store. Providing a path allows data to be accessed hierarchically. /// The value to store at the specified path. Setting his to NULL will remove the entry. void WriteEntry(string path, object value); diff --git a/src/Sdk/Common/Common/ClientStorage/VssFileStorage.cs b/src/Sdk/Common/Common/ClientStorage/VssFileStorage.cs index 50a28169700..29d8853dd10 100644 --- a/src/Sdk/Common/Common/ClientStorage/VssFileStorage.cs +++ b/src/Sdk/Common/Common/ClientStorage/VssFileStorage.cs @@ -138,7 +138,7 @@ public static IVssClientStorage GetVssLocalFileStorage(string fullPath, char pat } #if DEBUG - Debug.Assert(fullPath.Equals(storage.m_filePath), string.Format("The same storage file is being referenced with different casing. This will cause issues when running in cross patform environments where the file system may be case sensitive. {0} != {1}", storage.m_filePath, normalizedFullPath)); + Debug.Assert(fullPath.Equals(storage.m_filePath), string.Format("The same storage file is being referenced with different casing. This will cause issues when running in cross platform environments where the file system may be case-sensitive. {0} != {1}", storage.m_filePath, normalizedFullPath)); #endif return storage; } @@ -220,7 +220,7 @@ internal static string ClientSettingsDirectory /// GetFolderPath throw) /// /// Folder to retrieve - /// Path if available, null othewise + /// Path if available, null otherwise private static string SafeGetFolderPath(Environment.SpecialFolder specialFolder) { try @@ -542,7 +542,7 @@ protected void SaveFile(IDictionary originalSettings, IDictionary< { // during testing, creating this backup provided reliability in the event of aborted threads, and // crashed processes. With this, I was not able to simulate a case where corruption happens, but there is no - // 100% gaurantee against corruption. + // 100% guarantee against corruption. string originalContent = JValue.Parse(JsonConvert.SerializeObject(originalSettings)).ToString(Formatting.Indented); SaveFile(m_bckUpFilePath, originalContent); } diff --git a/src/Sdk/Common/Common/RawHttpMessageHandler.cs b/src/Sdk/Common/Common/RawHttpMessageHandler.cs index e80e6a74727..2f83d3a0281 100644 --- a/src/Sdk/Common/Common/RawHttpMessageHandler.cs +++ b/src/Sdk/Common/Common/RawHttpMessageHandler.cs @@ -167,7 +167,7 @@ protected override async Task SendAsync( await BufferRequestContentAsync(request, tokenSource.Token).ConfigureAwait(false); // ConfigureAwait(false) enables the continuation to be run outside any captured - // SyncronizationContext (such as ASP.NET's) which keeps things from deadlocking... + // SynchronizationContext (such as ASP.NET's) which keeps things from deadlocking... response = await m_messageInvoker.SendAsync(request, tokenSource.Token).ConfigureAwait(false); responseWrapper = new HttpResponseMessageWrapper(response); diff --git a/src/Sdk/Common/Common/TaskCancellationExtensions.cs b/src/Sdk/Common/Common/TaskCancellationExtensions.cs index 9b9c0767fbd..72593d91060 100644 --- a/src/Sdk/Common/Common/TaskCancellationExtensions.cs +++ b/src/Sdk/Common/Common/TaskCancellationExtensions.cs @@ -67,7 +67,7 @@ public static async Task EnforceCancellation( } // However, we'd ideally like to throw the cancellation exception from the original task if we can. - // Thus, we'll give that task a few seconds to coallesce (e.g. write to a log) before we give up on it. + // Thus, we'll give that task a few seconds to coalesce (e.g. write to a log) before we give up on it. int seconds = 3; var lastChanceTcs = new TaskCompletionSource(RUN_CONTINUATIONS_ASYNCHRONOUSLY); using (var lastChanceTimer = new CancellationTokenSource(TimeSpan.FromSeconds(seconds))) diff --git a/src/Sdk/Common/Common/Utility/ArgumentUtility.cs b/src/Sdk/Common/Common/Utility/ArgumentUtility.cs index 55500639355..908ea28c13b 100644 --- a/src/Sdk/Common/Common/Utility/ArgumentUtility.cs +++ b/src/Sdk/Common/Common/Utility/ArgumentUtility.cs @@ -1151,7 +1151,7 @@ public static void CheckStringForInvalidCharacters(string[] stringArrayVar, stri } /// - /// Throws an exception if the provided value equals to infinity. + /// Throws an exception if the provided value equals infinity. /// /// value to check /// the variable or parameter name to display @@ -1161,7 +1161,7 @@ public static void CheckValueEqualsToInfinity(float value, string valueName) } /// - /// Throws an exception if the provided value equals to infinity. + /// Throws an exception if the provided value equals infinity. /// /// value to check /// the variable or parameter name to display @@ -1238,7 +1238,7 @@ public static bool HasMismatchedSurrogates(string strIn) return true; } - // skip the low surogate + // skip the low surrogate i++; } } diff --git a/src/Sdk/Common/Common/Utility/ArrayUtility.cs b/src/Sdk/Common/Common/Utility/ArrayUtility.cs index 39745d273b3..0b4c5805dc4 100644 --- a/src/Sdk/Common/Common/Utility/ArrayUtility.cs +++ b/src/Sdk/Common/Common/Utility/ArrayUtility.cs @@ -117,7 +117,7 @@ public unsafe static bool Equals(byte[] a1, byte[] a2, int length) //**************************************************************************************** /// - /// Convert the byte array to a lower case hex string. + /// Convert the byte array to a lowercase hex string. /// /// byte array to be converted. /// hex string converted from byte array. diff --git a/src/Sdk/Common/Common/Utility/DictionaryExtensions.cs b/src/Sdk/Common/Common/Utility/DictionaryExtensions.cs index 1dd010c6a22..aa60bb192c5 100644 --- a/src/Sdk/Common/Common/Utility/DictionaryExtensions.cs +++ b/src/Sdk/Common/Common/Utility/DictionaryExtensions.cs @@ -95,8 +95,8 @@ public static V AddOrUpdate(this IDictionary dictionary, /// /// Returns the value in an IReadonlyDictionary with values of type - /// casted as values of requested type, or the defualt if the key is not found or - /// if the value was found but not compatabile with the requested type. + /// casted as values of requested type, or the default if the key is not found or + /// if the value was found but not compatible with the requested type. /// /// The key type /// The requested type of the stored value @@ -112,8 +112,8 @@ public static V AddOrUpdate(this IDictionary dictionary, /// /// Returns the value in an IDictionary with values of type - /// casted as values of requested type, or the defualt if the key is not found or - /// if the value was found but not compatabile with the requested type. + /// casted as values of requested type, or the default if the key is not found or + /// if the value was found but not compatible with the requested type. /// /// The key type /// The requested type of the stored value @@ -129,8 +129,8 @@ public static V AddOrUpdate(this IDictionary dictionary, /// /// Returns the value in a Dictionary with values of type - /// casted as values of requested type, or the defualt if the key is not found or - /// if the value was found but not compatabile with the requested type. + /// casted as values of requested type, or the default if the key is not found or + /// if the value was found but not compatible with the requested type. /// /// /// This overload is necessary to prevent Ambiguous Match issues, as Dictionary implements both diff --git a/src/Sdk/Common/Common/Utility/EnumerableExtensions.cs b/src/Sdk/Common/Common/Utility/EnumerableExtensions.cs index 470317c6cab..e65976f7b74 100644 --- a/src/Sdk/Common/Common/Utility/EnumerableExtensions.cs +++ b/src/Sdk/Common/Common/Utility/EnumerableExtensions.cs @@ -88,7 +88,7 @@ public static PartitionResults Partition(this IEnumerable source, Predi } /// - /// Partitions items from a source IEnumerable into N+1 lists, where the first N lists are determened + /// Partitions items from a source IEnumerable into N+1 lists, where the first N lists are determined /// by the sequential check of the provided predicates, with the N+1 list containing those items /// which matched none of the provided predicates. /// diff --git a/src/Sdk/Common/Common/Utility/PartitioningResults.cs b/src/Sdk/Common/Common/Utility/PartitioningResults.cs index 4b0b82e73e7..c2bdd09afe4 100644 --- a/src/Sdk/Common/Common/Utility/PartitioningResults.cs +++ b/src/Sdk/Common/Common/Utility/PartitioningResults.cs @@ -3,7 +3,7 @@ namespace GitHub.Services.Common { /// - /// Contains results from two-way variant of EnuemrableExtensions.Partition() + /// Contains results from two-way variant of EnumerableExtensions.Partition() /// /// The type of the elements in the contained lists. public sealed class PartitionResults @@ -14,7 +14,7 @@ public sealed class PartitionResults } /// - /// Contains results from multi-partitioning variant of EnuemrableExtensions.Partition() + /// Contains results from multi-partitioning variant of EnumerableExtensions.Partition() /// /// The type of the elements in the contained lists. public sealed class MultiPartitionResults diff --git a/src/Sdk/Common/Common/Utility/PropertyValidation.cs b/src/Sdk/Common/Common/Utility/PropertyValidation.cs index e56222a7eec..9fffd64660d 100644 --- a/src/Sdk/Common/Common/Utility/PropertyValidation.cs +++ b/src/Sdk/Common/Common/Utility/PropertyValidation.cs @@ -278,7 +278,7 @@ public static void CheckPropertyLength(String propertyValue, Boolean allowNull, } /// - /// Verify that a propery is within the bounds of the specified range. + /// Verify that a property is within the bounds of the specified range. /// /// The property value /// The minimum value allowed diff --git a/src/Sdk/Common/Common/Utility/SecretUtility.cs b/src/Sdk/Common/Common/Utility/SecretUtility.cs index 20713ad60e3..f510edba9f2 100644 --- a/src/Sdk/Common/Common/Utility/SecretUtility.cs +++ b/src/Sdk/Common/Common/Utility/SecretUtility.cs @@ -209,7 +209,7 @@ private static string ScrubSecret(string message, string token, string mask, boo catch (Exception /*exception*/) { // With an exception here the message may still contain an unmasked password. - // We also do not want to interupt the current thread with this exception, because it may be constucting a message + // We also do not want to interrupt the current thread with this exception, because it may be constructing a message // for a different exception. Trace this exception and continue on using a generic exception message. //TeamFoundationTracingService.TraceExceptionRaw(99231, s_area, s_layer, exception); } diff --git a/src/Sdk/Common/Common/Utility/StreamParser.cs b/src/Sdk/Common/Common/Utility/StreamParser.cs index 1f2dd613d9c..1a8027dcdf0 100644 --- a/src/Sdk/Common/Common/Utility/StreamParser.cs +++ b/src/Sdk/Common/Common/Utility/StreamParser.cs @@ -60,7 +60,7 @@ public override bool CanRead { get { - return m_stream.CanRead && m_stream.Position <= this.EndingPostionOnOuterStream; + return m_stream.CanRead && m_stream.Position <= this.EndingPositionOnOuterStream; } } @@ -105,9 +105,9 @@ public override long Position } /// - /// Postion in larger stream where this substream starts + /// Position in larger stream where this substream starts /// - public long StartingPostionOnOuterStream + public long StartingPositionOnOuterStream { get { @@ -116,9 +116,9 @@ public long StartingPostionOnOuterStream } /// - /// Postion in larger stream where this substream ends + /// Position in larger stream where this substream ends /// - public long EndingPostionOnOuterStream + public long EndingPositionOnOuterStream { get { @@ -150,9 +150,9 @@ public override long Seek(long offset, SeekOrigin origin) } else if (origin == SeekOrigin.End && 0 >= offset && offset > -m_length) { - return m_stream.Seek(offset - ((m_stream.Length - 1) - this.EndingPostionOnOuterStream), origin); + return m_stream.Seek(offset - ((m_stream.Length - 1) - this.EndingPositionOnOuterStream), origin); } - else if (origin == SeekOrigin.Current && (offset + m_stream.Position) >= this.StartingPostionOnOuterStream && (offset + m_stream.Position) < this.EndingPostionOnOuterStream) + else if (origin == SeekOrigin.Current && (offset + m_stream.Position) >= this.StartingPositionOnOuterStream && (offset + m_stream.Position) < this.EndingPositionOnOuterStream) { return m_stream.Seek(offset, origin); } diff --git a/src/Sdk/Common/Common/Utility/TypeExtensionMethods.cs b/src/Sdk/Common/Common/Utility/TypeExtensionMethods.cs index 4483b141f53..40dad401478 100644 --- a/src/Sdk/Common/Common/Utility/TypeExtensionMethods.cs +++ b/src/Sdk/Common/Common/Utility/TypeExtensionMethods.cs @@ -10,7 +10,7 @@ namespace GitHub.Services.Common public static class TypeExtensionMethods { /// - /// Determins if a value is assignable to the requested type. It goes + /// Determines if a value is assignable to the requested type. It goes /// the extra step beyond IsAssignableFrom in that it also checks for /// IConvertible and attempts to convert the value. /// @@ -220,7 +220,7 @@ public static void SetMemberValue(this Type type, string name, object obj, objec /// /// Portable compliant way to get a constructor with specified arguments. This will return a constructor that is public or private as long as the arguments match. NULL will be returned if there is no match. - /// Note that it will pick the first one it finds that matches, which is not necesarily the best match. + /// Note that it will pick the first one it finds that matches, which is not necessarily the best match. /// /// The Type that has the constructor /// The type of the arguments for the constructor. @@ -232,7 +232,7 @@ public static ConstructorInfo GetFirstMatchingConstructor(this Type type, params /// /// Portable compliant way to get a constructor with specified arguments from a prefiltered list. This will return a constructor that is public or private as long as the arguments match. NULL will be returned if there is no match. - /// Note that it will pick the first one it finds that matches, which is not necesarily the best match. + /// Note that it will pick the first one it finds that matches, which is not necessarily the best match. /// /// Prefiltered list of constructors /// The type of the arguments for the constructor. diff --git a/src/Sdk/Common/Common/Utility/UriExtensions.cs b/src/Sdk/Common/Common/Utility/UriExtensions.cs index e25d8f0c8d6..6908894e373 100644 --- a/src/Sdk/Common/Common/Utility/UriExtensions.cs +++ b/src/Sdk/Common/Common/Utility/UriExtensions.cs @@ -62,7 +62,7 @@ public static Uri AppendQuery(this Uri uri, NameValueCollection queryValues) } /// - /// Performs an Add similar to the NameValuCollection 'Add' method where the value gets added as an item in a comma delimited list if the key is already present. + /// Performs an Add similar to the NameValueCollection 'Add' method where the value gets added as an item in a comma delimited list if the key is already present. /// /// /// diff --git a/src/Sdk/Common/Common/Utility/UriUtility.cs b/src/Sdk/Common/Common/Utility/UriUtility.cs index c80cb592c09..6501eae18da 100644 --- a/src/Sdk/Common/Common/Utility/UriUtility.cs +++ b/src/Sdk/Common/Common/Utility/UriUtility.cs @@ -33,7 +33,7 @@ public static class UriUtility /// inform the user that it is unsafe and prevent navigation. /// /// - /// Note: the data scheme is not in this list nor is it in the safe list either, this is by design. + /// Note: by design the data scheme is excluded from this list and the safe list. /// See http://msdn.microsoft.com/en-us/library/ie/cc848897(v=vs.85).aspx for a reference of the data protocol. /// See http://www.gnucitizen.org/blog/bugs-in-the-browser-firefoxs-data-url-scheme-vulnerability/ for attacks on the data protocol. /// @@ -48,7 +48,7 @@ public static class UriUtility /// /// /// "x-mvwit" is here as it is used and saved to work item history rich HTML changes. It is used to reference other work - /// items in the list. If we remove it from this list, it will not be a navigatable link in e.g. Web Access. + /// items in the list. If we remove it from this list, it will not be a navigable link in e.g. Web Access. /// private static readonly ICollection SafeUriSchemeList = new HashSet(new string[] { "http", "https", "ftp", "gopher", "mailto", "news", "telnet", "wais", @@ -89,7 +89,7 @@ public int GetHashCode(string obj) } /// - /// string comparer for uri, is not case sensitive and does not care about trailing '/' + /// string comparer for uri, is not case-sensitive and does not care about trailing '/' /// public static IEqualityComparer AbsoluteUriStringComparer = new _AbsoluteUriStringComparer(); @@ -146,7 +146,7 @@ public static bool IsUriLocalFile(Uri uri) /// returns the absolute Uri but in a consistent way such that the presence of a trailing slash doesnt affect the returned string, /// also converts the uri to lowerInvariant /// - /// Uri, cannot be null, must be Absolute + /// URI, cannot be null, must be Absolute /// public static string GetInvariantAbsoluteUri(Uri uri) { @@ -171,12 +171,12 @@ public static string GetInvariantAbsoluteUri(Uri uri) /// /// Joins a URI and a relativePath with a single forward slash. Duplicate slashes at the junction point are removed. /// - /// The base Uri. Must be an absolute Uri. The last segment of the Uri path (if any) is considered a virtual directory and not removed, even if it does not have a trailing forward slash. - /// The relative path to append to the Uri. + /// The base URI. Must be an absolute URI. The last segment of the URI path (if any) is considered a virtual directory and not removed, even if it does not have a trailing forward slash. + /// The relative path to append to the URI. /// If true, any leading forward slashes on the relative path argument are discarded. - /// The base Uri with the relativePath appended to it. + /// The base URI with the relativePath appended to it. /// - /// This is intended to be an alternative the Uri constructor, which can remove several path segments from your arguments. For example: + /// This is intended to be an alternative to the Uri constructor, which can remove several path segments from your arguments. For example: /// /// new Uri(new Uri("http://localhost/abc/efg/"), "/Hello/World") returns http://localhost/Hello/World ("/abc/efg/" removed due to absolute path argument) /// new Uri(new Uri("http://localhost/dir1/dir2"), "hi.txt") returns http://localhost/dir1/hi.txt ("dir2" removed due to lack of trailing slash) @@ -192,12 +192,12 @@ public static Uri Combine(string baseUri, String relativePath, Boolean treatAbso /// /// Joins a URI and a relativePath with a single forward slash. Duplicate slashes at the junction point are removed. /// - /// The base Uri. Must be an absolute Uri. The last segment of the Uri path (if any) is considered a virtual directory and not removed, even if it does not have a trailing forward slash. - /// The relative path to append to the Uri. + /// The base URI. Must be an absolute URI. The last segment of the URI path (if any) is considered a virtual directory and not removed, even if it does not have a trailing forward slash. + /// The relative path to append to the URI. /// If true, any leading forward slashes on the relative path argument are discarded. - /// The base Uri with the relativePath appended to it. + /// The base URI with the relativePath appended to it. /// - /// This is intended to be an alternative the Uri constructor, which can remove several path segments from your arguments. For example: + /// This is intended to be an alternative to the Uri constructor, which can remove several path segments from your arguments. For example: /// /// new Uri(new Uri("http://localhost/abc/efg/"), "/Hello/World") returns http://localhost/Hello/World ("/abc/efg/" removed due to absolute path argument) /// new Uri(new Uri("http://localhost/dir1/dir2"), "hi.txt") returns http://localhost/dir1/hi.txt ("dir2" removed due to lack of trailing slash) @@ -283,18 +283,18 @@ public static bool IsUriHttp(Uri uri) } /// - /// Check that the Uri has http or https as its scheme. We don't want anyone pointing at file://virus.exe. + /// Check that the URI has http or https as its scheme. We don't want anyone pointing at file://virus.exe. /// - /// Uri to be checked. + /// URI to be checked. public static void CheckUriIsHttp(Uri uri) { CheckUriIsHttp(uri, true); } /// - /// Check that the Uri has http or https as its scheme. We don't want anyone pointing at file://virus.exe. + /// Check that the URI has http or https as its scheme. We don't want anyone pointing at file://virus.exe. /// - /// Uri to be checked. + /// URI to be checked. /// Allow sub path and query string if true. If false, the URL must be authority only. public static void CheckUriIsHttp(Uri uri, bool allowPathAndQuery) { @@ -314,18 +314,18 @@ public static void CheckUriIsHttp(Uri uri, bool allowPathAndQuery) } /// - /// Check that a given Uri is an absolute Uri. Also, ensure its is http or https. + /// Check that a given URI is an absolute URI. Also, ensure its is http or https. /// - /// Uri to be checked. + /// URI to be checked. public static void CheckUriIsAbsoluteAndHttp(Uri uri) { CheckUriIsAbsoluteAndHttp(uri, true); } /// - /// Check that a given Uri is an absolute Uri. Also, ensure its is http or https. + /// Check that a given URI is an absolute URI. Also, ensure its is http or https. /// - /// Uri to be checked. + /// URI to be checked. /// Allow sub path and query string if true. If false, the URL must be authority only. public static void CheckUriIsAbsoluteAndHttp(Uri uri, bool allowPathAndQuery) { @@ -416,7 +416,7 @@ public static string GetDavUncFromHttpPath(string httppath) } /// - /// Given a input path that might correspond to a UNC path known to the Windows Client WebDav Redirector, + /// Given an input path that might correspond to a UNC path known to the Windows Client WebDav Redirector, /// returns the converted UNC path to an HTTP (or HTTPS) url. /// /// @@ -490,7 +490,7 @@ public static bool IsSameMachine(string hostname1, string hostname2) // A machine name could not be resolved, for the purposes of this method, // assume that machines are not the same and ignore the error - // ToDo: tedchamb come back to this + // TODO: tedchamb come back to this //TeamFoundationTrace.TraceException(ex); } diff --git a/src/Sdk/Common/Common/Utility/VssStringComparer.cs b/src/Sdk/Common/Common/Utility/VssStringComparer.cs index 7d7935a8c2b..57e2b9799f3 100644 --- a/src/Sdk/Common/Common/Utility/VssStringComparer.cs +++ b/src/Sdk/Common/Common/Utility/VssStringComparer.cs @@ -218,7 +218,7 @@ private StringComparer MatchingStringComparer // Converters comparer public static VssStringComparer VSSServerPath { get { return s_ordinalIgnoreCase; } } - // Item rename in VSS is case sensitive. + // Item rename in VSS is case-sensitive. public static VssStringComparer VSSItemName { get { return s_ordinal; } } // Web Access Comparers public static VssStringComparer HtmlElementName { get { return s_ordinalIgnoreCase; } } @@ -229,7 +229,7 @@ private StringComparer MatchingStringComparer public static VssStringComparer StringFieldConditionOrdinal { get { return s_ordinal; } } // Service Endpoint Comparer - public static VssStringComparer ServiceEndpointTypeCompararer { get { return s_ordinalIgnoreCase; } } + public static VssStringComparer ServiceEndpointTypeComparer { get { return s_ordinalIgnoreCase; } } private class DataSourceIgnoreProtocolComparer : VssStringComparer { diff --git a/src/Sdk/Common/Common/VssCommonConstants.cs b/src/Sdk/Common/Common/VssCommonConstants.cs index 596ef6503ed..c4fd6b9c2be 100644 --- a/src/Sdk/Common/Common/VssCommonConstants.cs +++ b/src/Sdk/Common/Common/VssCommonConstants.cs @@ -113,7 +113,7 @@ static IdentityConstants() /// /// The DB layer only supports byte, even though the data layer contracts suggests a /// 32-bit integer. Note: changing this constant implies that every new identity object - /// that is created, going forward will have this resource version set. Existing identites + /// that is created, going forward will have this resource version set. Existing identities /// will need to be updated to the current resource version level manually. /// /// This is created for rolling out of a feature based on identity not service host. diff --git a/src/Sdk/Common/Common/VssException.cs b/src/Sdk/Common/Common/VssException.cs index 5f8fb8c2554..89b7c256d92 100644 --- a/src/Sdk/Common/Common/VssException.cs +++ b/src/Sdk/Common/Common/VssException.cs @@ -15,7 +15,7 @@ namespace GitHub.Services.Common /// /// /// All Exceptions in the VSS space -- any exception that flows across - /// a REST API boudary -- should derive from VssServiceException. This is likely + /// a REST API boundary -- should derive from VssServiceException. This is likely /// almost ALL new exceptions. Legacy TFS exceptions that do not flow through rest /// derive from TeamFoundationServerException or TeamFoundationServiceException /// @@ -25,7 +25,7 @@ namespace GitHub.Services.Common public abstract class VssException : ApplicationException { /// - /// No-arg constructor that sumply defers to the base class. + /// No-arg constructor that simply defers to the base class. /// public VssException() : base() { diff --git a/src/Sdk/Common/Common/VssHttpMessageHandler.cs b/src/Sdk/Common/Common/VssHttpMessageHandler.cs index f48eec41af8..43eb07620a8 100644 --- a/src/Sdk/Common/Common/VssHttpMessageHandler.cs +++ b/src/Sdk/Common/Common/VssHttpMessageHandler.cs @@ -212,7 +212,7 @@ protected override async Task SendAsync( traceInfo?.TraceBufferedRequestTime(); // ConfigureAwait(false) enables the continuation to be run outside any captured - // SyncronizationContext (such as ASP.NET's) which keeps things from deadlocking... + // SynchronizationContext (such as ASP.NET's) which keeps things from deadlocking... response = await m_messageInvoker.SendAsync(request, tokenSource.Token).ConfigureAwait(false); diff --git a/src/Sdk/Common/Common/VssHttpRequestSettings.cs b/src/Sdk/Common/Common/VssHttpRequestSettings.cs index 7279d28093f..095f6853ea4 100644 --- a/src/Sdk/Common/Common/VssHttpRequestSettings.cs +++ b/src/Sdk/Common/Common/VssHttpRequestSettings.cs @@ -123,7 +123,7 @@ public Boolean CompressionEnabled /// /// Gets or sets a value indicating whether or not the Expect: 100-continue header should be sent on - /// outgoing requess. The default value is true. + /// outgoing requests. The default value is true. /// [DefaultValue(true)] public Boolean ExpectContinue diff --git a/src/Sdk/DTExpressions2/Expressions2/EvaluationResult.cs b/src/Sdk/DTExpressions2/Expressions2/EvaluationResult.cs index 354a76d8e37..b6318e240ae 100644 --- a/src/Sdk/DTExpressions2/Expressions2/EvaluationResult.cs +++ b/src/Sdk/DTExpressions2/Expressions2/EvaluationResult.cs @@ -75,7 +75,7 @@ public Boolean IsFalsy public Boolean IsTruthy => !IsFalsy; /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractEqual(EvaluationResult right) @@ -84,7 +84,7 @@ public Boolean AbstractEqual(EvaluationResult right) } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractGreaterThan(EvaluationResult right) @@ -93,7 +93,7 @@ public Boolean AbstractGreaterThan(EvaluationResult right) } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractGreaterThanOrEqual(EvaluationResult right) @@ -102,7 +102,7 @@ public Boolean AbstractGreaterThanOrEqual(EvaluationResult right) } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractLessThan(EvaluationResult right) @@ -111,7 +111,7 @@ public Boolean AbstractLessThan(EvaluationResult right) } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractLessThanOrEqual(EvaluationResult right) @@ -120,7 +120,7 @@ public Boolean AbstractLessThanOrEqual(EvaluationResult right) } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractNotEqual(EvaluationResult right) @@ -177,7 +177,7 @@ public Boolean TryGetCollectionInterface(out Object collection) /// /// Useful for working with values that are not the direct evaluation result of a parameter. - /// This allows ExpressionNode authors to leverage the coercion and comparision functions + /// This allows ExpressionNode authors to leverage the coercion and comparison functions /// for any values. /// /// Also note, the value will be canonicalized (for example numeric types converted to double) and any @@ -221,7 +221,7 @@ private void TraceVerbose( } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// private static Boolean AbstractEqual( @@ -272,7 +272,7 @@ private static Boolean AbstractEqual( } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// private static Boolean AbstractGreaterThan( @@ -314,7 +314,7 @@ private static Boolean AbstractGreaterThan( } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// private static Boolean AbstractLessThan( @@ -355,7 +355,7 @@ private static Boolean AbstractLessThan( return false; } - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except objects are not coerced to primitives. private static void CoerceTypes( ref Object canonicalLeftValue, @@ -397,7 +397,7 @@ private static void CoerceTypes( } /// - /// For primitives, follows the Javascript rules (the Number function in Javascript). Otherwise NaN. + /// For primitives, follows the JavaScript rules (the Number function in JavaScript). Otherwise NaN. /// private static Double ConvertToNumber(Object canonicalValue) { diff --git a/src/Sdk/DTExpressions2/Expressions2/ExpressionConstants.cs b/src/Sdk/DTExpressions2/Expressions2/ExpressionConstants.cs index 89ae954e378..4560723aeaa 100644 --- a/src/Sdk/DTExpressions2/Expressions2/ExpressionConstants.cs +++ b/src/Sdk/DTExpressions2/Expressions2/ExpressionConstants.cs @@ -42,7 +42,7 @@ private static void AddFunction(String name, Int32 minParameters, Int32 maxPa internal const Char StartParameter = '('; // function call internal const Char EndGroup = ')'; // logical grouping internal const Char EndIndex = ']'; - internal const Char EndParameter = ')'; // function calll + internal const Char EndParameter = ')'; // function call internal const Char Separator = ','; internal const Char Dereference = '.'; internal const Char Wildcard = '*'; diff --git a/src/Sdk/DTExpressions2/Expressions2/Sdk/ExpressionNode.cs b/src/Sdk/DTExpressions2/Expressions2/Sdk/ExpressionNode.cs index 28e7b37ecde..8d578d03400 100644 --- a/src/Sdk/DTExpressions2/Expressions2/Sdk/ExpressionNode.cs +++ b/src/Sdk/DTExpressions2/Expressions2/Sdk/ExpressionNode.cs @@ -14,7 +14,7 @@ public abstract class ExpressionNode : IExpressionNode /// /// The name is used for tracing. Normally the parser will set the name. However if a node - /// is added manually, then the name may not be set and will fallback to the type name. + /// is added manually, then the name may not be set and will fall back to the type name. /// protected internal String Name { @@ -30,7 +30,7 @@ protected internal String Name } /// - /// Indicates whether the evalation result should be stored on the context and used + /// Indicates whether the evaluation result should be stored on the context and used /// when the realized result is traced. /// protected abstract Boolean TraceFullyRealized { get; } @@ -159,7 +159,7 @@ private void TraceTreeResult( String.Equals(realizedExpression, $"'{traceValue}'", StringComparison.Ordinal)) { // Don't bother tracing the realized expression when the result is a number and the - // realized expresion is a precisely matching string. + // realized expression is a precisely matching string. } else { diff --git a/src/Sdk/DTExpressions2/Expressions2/Sdk/ExpressionUtility.cs b/src/Sdk/DTExpressions2/Expressions2/Sdk/ExpressionUtility.cs index f4a3d68d5e2..627a64e8d0f 100644 --- a/src/Sdk/DTExpressions2/Expressions2/Sdk/ExpressionUtility.cs +++ b/src/Sdk/DTExpressions2/Expressions2/Sdk/ExpressionUtility.cs @@ -187,8 +187,8 @@ internal static Boolean IsPrimitive(ValueKind kind) } /// - /// The rules here attempt to follow Javascript rules for coercing a string into a number - /// for comparison. That is, the Number() function in Javascript. + /// The rules here attempt to follow JavaScript rules for coercing a string into a number + /// for comparison. That is, the Number() function in JavaScript. /// internal static Double ParseNumber(String str) { diff --git a/src/Sdk/DTExpressions2/Expressions2/Sdk/Literal.cs b/src/Sdk/DTExpressions2/Expressions2/Sdk/Literal.cs index 75e65f62f0b..052e96b7de5 100644 --- a/src/Sdk/DTExpressions2/Expressions2/Sdk/Literal.cs +++ b/src/Sdk/DTExpressions2/Expressions2/Sdk/Literal.cs @@ -18,7 +18,7 @@ public Literal(Object val) public Object Value { get; } // Prevent the value from being stored on the evaluation context. - // This avoids unneccessarily duplicating the value in memory. + // This avoids unnecessarily duplicating the value in memory. protected sealed override Boolean TraceFullyRealized => false; internal sealed override String ConvertToExpression() diff --git a/src/Sdk/DTExpressions2/Expressions2/Sdk/ResultMemory.cs b/src/Sdk/DTExpressions2/Expressions2/Sdk/ResultMemory.cs index b5524c5b730..e1195ac2554 100644 --- a/src/Sdk/DTExpressions2/Expressions2/Sdk/ResultMemory.cs +++ b/src/Sdk/DTExpressions2/Expressions2/Sdk/ResultMemory.cs @@ -39,7 +39,7 @@ public class ResultMemory /// For , this value is currently ignored. /// /// - /// For example, consider a funciton jsonParse() which takes a string paramter, + /// For example, consider a function jsonParse() which takes a string parameter, /// and returns a JToken object. The JToken object is newly created and a rough /// measurement should be returned for the amount of bytes it consumes in memory. /// Set the to true, since new object contains no references diff --git a/src/Sdk/DTExpressions2/Expressions2/Sdk/Wildcard.cs b/src/Sdk/DTExpressions2/Expressions2/Sdk/Wildcard.cs index af11c58ea07..1470b1d2061 100644 --- a/src/Sdk/DTExpressions2/Expressions2/Sdk/Wildcard.cs +++ b/src/Sdk/DTExpressions2/Expressions2/Sdk/Wildcard.cs @@ -7,7 +7,7 @@ namespace GitHub.DistributedTask.Expressions2.Sdk public sealed class Wildcard : ExpressionNode { // Prevent the value from being stored on the evaluation context. - // This avoids unneccessarily duplicating the value in memory. + // This avoids unnecessarily duplicating the value in memory. protected sealed override Boolean TraceFullyRealized => false; internal sealed override String ConvertToExpression() diff --git a/src/Sdk/DTLogging/Logging/ValueEncoders.cs b/src/Sdk/DTLogging/Logging/ValueEncoders.cs index b3387abd36c..8369e7bf590 100644 --- a/src/Sdk/DTLogging/Logging/ValueEncoders.cs +++ b/src/Sdk/DTLogging/Logging/ValueEncoders.cs @@ -20,7 +20,7 @@ public static String Base64StringEscape(String value) // Base64 is 6 bits -> char // A byte is 8 bits - // When end user doing somthing like base64(user:password) + // When end user doing something like base64(user:password) // The length of the leading content will cause different base64 encoding result on the password // So we add base64(value shifted 1 and two bytes) as secret as well. // B1 B2 B3 B4 B5 B6 B7 diff --git a/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/MappingDefinition.cs b/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/MappingDefinition.cs index 2d63c4008cd..5d0ac00751c 100644 --- a/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/MappingDefinition.cs +++ b/src/Sdk/DTObjectTemplating/ObjectTemplating/Schema/MappingDefinition.cs @@ -110,7 +110,7 @@ internal override void Validate( if (inherited.ReaderContext.Length > 0) { - throw new NotSupportedException($"Property '{TemplateConstants.Context}' is not supported on inhertied definitions"); + throw new NotSupportedException($"Property '{TemplateConstants.Context}' is not supported on inherited definitions"); } if (inherited.DefinitionType != DefinitionType.Mapping) diff --git a/src/Sdk/DTPipelines/Pipelines/ActionStep.cs b/src/Sdk/DTPipelines/Pipelines/ActionStep.cs index f4ed5f041b5..7428dadea62 100644 --- a/src/Sdk/DTPipelines/Pipelines/ActionStep.cs +++ b/src/Sdk/DTPipelines/Pipelines/ActionStep.cs @@ -36,7 +36,7 @@ public ActionStepDefinitionReference Reference set; } - // TODO: After TFS and legacy phases/steps/ect are removed, lets replace the DisplayName in the base class with this value and remove this additional prop + // TODO: After TFS and legacy phases/steps/etc. are removed, lets replace the DisplayName in the base class with this value and remove this additional prop [DataMember(EmitDefaultValue = false)] public TemplateToken DisplayNameToken { get; set; } diff --git a/src/Sdk/DTPipelines/Pipelines/ExpressionValue.cs b/src/Sdk/DTPipelines/Pipelines/ExpressionValue.cs index 47f9e6f7e2b..352da455050 100644 --- a/src/Sdk/DTPipelines/Pipelines/ExpressionValue.cs +++ b/src/Sdk/DTPipelines/Pipelines/ExpressionValue.cs @@ -62,7 +62,7 @@ public static ExpressionValue FromLiteral(T literal) } /// - /// When T is String, we cannot distiguish between literals and expressions solely by type. + /// When T is String, we cannot distinguish between literals and expressions solely by type. /// Use this function when parsing and you want to err on the side of expressions. /// public static ExpressionValue FromToken(String token) diff --git a/src/Sdk/DTPipelines/Pipelines/JobContainer.cs b/src/Sdk/DTPipelines/Pipelines/JobContainer.cs index 901c4fed17d..2dc1d80fffe 100644 --- a/src/Sdk/DTPipelines/Pipelines/JobContainer.cs +++ b/src/Sdk/DTPipelines/Pipelines/JobContainer.cs @@ -58,7 +58,7 @@ public IList Ports } /// - /// Gets or sets the credentials used for pulling the container iamge. + /// Gets or sets the credentials used for pulling the container image. /// public ContainerRegistryCredentials Credentials { diff --git a/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateConverter.cs b/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateConverter.cs index 6c9654074f1..d02fb6cf59b 100644 --- a/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateConverter.cs +++ b/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/PipelineTemplateConverter.cs @@ -651,7 +651,7 @@ private static String ConvertToIfCondition( if (isJob) { namedValues = s_jobIfNamedValues; - // TODO: refactor into seperate functions + // TODO: refactor into separate functions // functions = PhaseCondition.FunctionInfo; } else diff --git a/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/YamlObjectReader.cs b/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/YamlObjectReader.cs index 431cceac003..0cf8ac726a7 100644 --- a/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/YamlObjectReader.cs +++ b/src/Sdk/DTPipelines/Pipelines/ObjectTemplating/YamlObjectReader.cs @@ -221,7 +221,7 @@ private ParsingEvent EvaluateCurrent() { if (m_current is Scalar scalar) { - // Verify not using achors + // Verify not using anchors if (scalar.Anchor != null) { throw new InvalidOperationException($"Anchors are not currently supported. Remove the anchor '{scalar.Anchor}'"); @@ -229,7 +229,7 @@ private ParsingEvent EvaluateCurrent() } else if (m_current is MappingStart mappingStart) { - // Verify not using achors + // Verify not using anchors if (mappingStart.Anchor != null) { throw new InvalidOperationException($"Anchors are not currently supported. Remove the anchor '{mappingStart.Anchor}'"); @@ -237,7 +237,7 @@ private ParsingEvent EvaluateCurrent() } else if (m_current is SequenceStart sequenceStart) { - // Verify not using achors + // Verify not using anchors if (sequenceStart.Anchor != null) { throw new InvalidOperationException($"Anchors are not currently supported. Remove the anchor '{sequenceStart.Anchor}'"); diff --git a/src/Sdk/DTWebApi/WebApi/ServiceEndpointLegacy/ServiceEndpoint.cs b/src/Sdk/DTWebApi/WebApi/ServiceEndpointLegacy/ServiceEndpoint.cs index 65c133cb733..c6d91120f1d 100644 --- a/src/Sdk/DTWebApi/WebApi/ServiceEndpointLegacy/ServiceEndpoint.cs +++ b/src/Sdk/DTWebApi/WebApi/ServiceEndpointLegacy/ServiceEndpoint.cs @@ -140,7 +140,7 @@ public IDictionary Data } /// - /// Indicates whether service endpoint is shared with other projects or not. + /// Indicates whether or not service endpoint is shared with other projects. /// [DataMember(EmitDefaultValue = true)] public Boolean IsShared diff --git a/src/Sdk/DTWebApi/WebApi/TaskAgentHttpClient.cs b/src/Sdk/DTWebApi/WebApi/TaskAgentHttpClient.cs index c97fea0a4d1..5252a2e581c 100644 --- a/src/Sdk/DTWebApi/WebApi/TaskAgentHttpClient.cs +++ b/src/Sdk/DTWebApi/WebApi/TaskAgentHttpClient.cs @@ -186,7 +186,7 @@ protected async Task SendAsync( } //ConfigureAwait(false) enables the continuation to be run outside - //any captured SyncronizationContext (such as ASP.NET's) which keeps things + //any captured SynchronizationContext (such as ASP.NET's) which keeps things //from deadlocking... using (HttpResponseMessage response = await this.SendAsync(message, userState, cancellationToken).ConfigureAwait(false)) { diff --git a/src/Sdk/DTWebApi/WebApi/TaskAgentJobRequest.cs b/src/Sdk/DTWebApi/WebApi/TaskAgentJobRequest.cs index 67318d11ca5..437a536e31b 100644 --- a/src/Sdk/DTWebApi/WebApi/TaskAgentJobRequest.cs +++ b/src/Sdk/DTWebApi/WebApi/TaskAgentJobRequest.cs @@ -103,7 +103,7 @@ public DateTime? AssignTime } /// - /// The date/time this request was receieved by an agent. + /// The date/time this request was received by an agent. /// /// [DataMember(Order = 5, EmitDefaultValue = false)] diff --git a/src/Sdk/DTWebApi/WebApi/TaskAgentMessage.cs b/src/Sdk/DTWebApi/WebApi/TaskAgentMessage.cs index b23ebddc8fa..9428e00f1dd 100644 --- a/src/Sdk/DTWebApi/WebApi/TaskAgentMessage.cs +++ b/src/Sdk/DTWebApi/WebApi/TaskAgentMessage.cs @@ -37,7 +37,7 @@ public String MessageType } /// - /// Gets or sets the intialization vector used to encrypt this message. + /// Gets or sets the initialization vector used to encrypt this message. /// [DataMember(EmitDefaultValue = false)] public Byte[] IV diff --git a/src/Sdk/Expressions/EvaluationResult.cs b/src/Sdk/Expressions/EvaluationResult.cs index 9c17f2c6c15..59d52eaedf2 100644 --- a/src/Sdk/Expressions/EvaluationResult.cs +++ b/src/Sdk/Expressions/EvaluationResult.cs @@ -76,7 +76,7 @@ public Boolean IsFalsy public Boolean IsTruthy => !IsFalsy; /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractEqual(EvaluationResult right) @@ -85,7 +85,7 @@ public Boolean AbstractEqual(EvaluationResult right) } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractGreaterThan(EvaluationResult right) @@ -94,7 +94,7 @@ public Boolean AbstractGreaterThan(EvaluationResult right) } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractGreaterThanOrEqual(EvaluationResult right) @@ -103,7 +103,7 @@ public Boolean AbstractGreaterThanOrEqual(EvaluationResult right) } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractLessThan(EvaluationResult right) @@ -112,7 +112,7 @@ public Boolean AbstractLessThan(EvaluationResult right) } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractLessThanOrEqual(EvaluationResult right) @@ -121,7 +121,7 @@ public Boolean AbstractLessThanOrEqual(EvaluationResult right) } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// public Boolean AbstractNotEqual(EvaluationResult right) @@ -227,7 +227,7 @@ private void TraceVerbose( } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// private static Boolean AbstractEqual( @@ -278,7 +278,7 @@ private static Boolean AbstractEqual( } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// private static Boolean AbstractGreaterThan( @@ -320,7 +320,7 @@ private static Boolean AbstractGreaterThan( } /// - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except string comparison is OrdinalIgnoreCase, and objects are not coerced to primitives. /// private static Boolean AbstractLessThan( @@ -361,7 +361,7 @@ private static Boolean AbstractLessThan( return false; } - /// Similar to the Javascript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. + /// Similar to the JavaScript abstract equality comparison algorithm http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3. /// Except objects are not coerced to primitives. private static void CoerceTypes( ref Object canonicalLeftValue, @@ -403,7 +403,7 @@ private static void CoerceTypes( } /// - /// For primitives, follows the Javascript rules (the Number function in Javascript). Otherwise NaN. + /// For primitives, follows the JavaScript rules (the Number function in JavaScript). Otherwise NaN. /// private static Double ConvertToNumber(Object canonicalValue) { diff --git a/src/Sdk/Expressions/ExpressionConstants.cs b/src/Sdk/Expressions/ExpressionConstants.cs index ef544395f21..b43b9be4d55 100644 --- a/src/Sdk/Expressions/ExpressionConstants.cs +++ b/src/Sdk/Expressions/ExpressionConstants.cs @@ -44,7 +44,7 @@ private static void AddFunction(String name, Int32 minParameters, Int32 maxPa public static readonly Char StartParameter = '('; // function call internal const Char EndGroup = ')'; // logical grouping internal const Char EndIndex = ']'; - public static readonly Char EndParameter = ')'; // function calll + public static readonly Char EndParameter = ')'; // function call internal const Char Separator = ','; internal const Char Dereference = '.'; internal const Char Wildcard = '*'; diff --git a/src/Sdk/Expressions/Sdk/ExpressionNode.cs b/src/Sdk/Expressions/Sdk/ExpressionNode.cs index 5acbad2451e..b0c957c1c63 100644 --- a/src/Sdk/Expressions/Sdk/ExpressionNode.cs +++ b/src/Sdk/Expressions/Sdk/ExpressionNode.cs @@ -1,4 +1,4 @@ -#nullable disable // Consider removing in the future to minimize likelihood of NullReferenceException; refer https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references +#nullable disable // Consider removing in the future to minimize likelihood of NullReferenceException; refer https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references using System; @@ -12,7 +12,7 @@ public abstract class ExpressionNode : IExpressionNode /// /// The name is used for tracing. Normally the parser will set the name. However if a node - /// is added manually, then the name may not be set and will fallback to the type name. + /// is added manually, then the name may not be set and will fall back to the type name. /// public String Name { @@ -28,7 +28,7 @@ public String Name } /// - /// Indicates whether the evalation result should be stored on the context and used + /// Indicates whether the evaluation result should be stored on the context and used /// when the expanded result is traced. /// protected abstract Boolean TraceFullyExpanded { get; } @@ -162,7 +162,7 @@ private void TraceTreeResult( String.Equals(expandedExpression, $"'{traceValue}'", StringComparison.Ordinal)) { // Don't bother tracing the expanded expression when the result is a number and the - // expanded expresion is a precisely matching string. + // expanded expression is a precisely matching string. } else { diff --git a/src/Sdk/Expressions/Sdk/ExpressionUtility.cs b/src/Sdk/Expressions/Sdk/ExpressionUtility.cs index 84faa9afb84..c13ea1d4f93 100644 --- a/src/Sdk/Expressions/Sdk/ExpressionUtility.cs +++ b/src/Sdk/Expressions/Sdk/ExpressionUtility.cs @@ -217,8 +217,8 @@ internal static Boolean IsPrimitive(ValueKind kind) } /// - /// The rules here attempt to follow Javascript rules for coercing a string into a number - /// for comparison. That is, the Number() function in Javascript. + /// The rules here attempt to follow JavaScript rules for coercing a string into a number + /// for comparison. That is, the Number() function in JavaScript. /// internal static Double ParseNumber(String str) { diff --git a/src/Sdk/Expressions/Sdk/Literal.cs b/src/Sdk/Expressions/Sdk/Literal.cs index d01a33be2ef..6ad275fa0e1 100644 --- a/src/Sdk/Expressions/Sdk/Literal.cs +++ b/src/Sdk/Expressions/Sdk/Literal.cs @@ -18,7 +18,7 @@ public Literal(Object val) public Object Value { get; } // Prevent the value from being stored on the evaluation context. - // This avoids unneccessarily duplicating the value in memory. + // This avoids unnecessarily duplicating the value in memory. protected sealed override Boolean TraceFullyExpanded => false; public sealed override String ConvertToExpression() diff --git a/src/Sdk/Expressions/Sdk/ResultMemory.cs b/src/Sdk/Expressions/Sdk/ResultMemory.cs index 165d59b54b7..443047b7f8a 100644 --- a/src/Sdk/Expressions/Sdk/ResultMemory.cs +++ b/src/Sdk/Expressions/Sdk/ResultMemory.cs @@ -37,7 +37,7 @@ public class ResultMemory /// For , this value is currently ignored. /// /// - /// For example, consider a funciton jsonParse() which takes a string paramter, + /// For example, consider a function jsonParse() which takes a string parameter, /// and returns a JToken object. The JToken object is newly created and a rough /// measurement should be returned for the amount of bytes it consumes in memory. /// Set the to true, since new object contains no references diff --git a/src/Sdk/Expressions/Sdk/Wildcard.cs b/src/Sdk/Expressions/Sdk/Wildcard.cs index ec408daa385..94a134f6617 100644 --- a/src/Sdk/Expressions/Sdk/Wildcard.cs +++ b/src/Sdk/Expressions/Sdk/Wildcard.cs @@ -7,7 +7,7 @@ namespace GitHub.Actions.Expressions.Sdk public sealed class Wildcard : ExpressionNode { // Prevent the value from being stored on the evaluation context. - // This avoids unneccessarily duplicating the value in memory. + // This avoids unnecessarily duplicating the value in memory. protected sealed override Boolean TraceFullyExpanded => false; public sealed override String ConvertToExpression() diff --git a/src/Sdk/Resources/FileContainerResources.g.cs b/src/Sdk/Resources/FileContainerResources.g.cs index c272c922104..bd990233f4f 100644 --- a/src/Sdk/Resources/FileContainerResources.g.cs +++ b/src/Sdk/Resources/FileContainerResources.g.cs @@ -6,7 +6,7 @@ public static class FileContainerResources { public static string ArtifactUriNotSupportedException(object arg0) { - const string Format = @"The artifact Uri {0} is not supported."; + const string Format = @"The artifact URI {0} is not supported."; return string.Format(CultureInfo.CurrentCulture, Format, arg0); } diff --git a/src/Sdk/WebApi/WebApi/Attributes.cs b/src/Sdk/WebApi/WebApi/Attributes.cs index c484852ce87..99329f34041 100644 --- a/src/Sdk/WebApi/WebApi/Attributes.cs +++ b/src/Sdk/WebApi/WebApi/Attributes.cs @@ -40,7 +40,7 @@ public ClientIncludeModelAttribute(RestClientLanguages languages) /// /// Marks a class, method or property for internal use only. This attribute ensures the item /// does not show up in public documentation, adds EditorBrowsableState.Never in C# clients - /// to hide the item, and optionaly adds @internal in TypeScript clients which removes the + /// to hide the item, and optionally adds @internal in TypeScript clients which removes the /// item from the TypeScript declare (d.ts) file. This does not exempt this API from the /// formal REST Api review process. Our internal APIs must meet the same standards and /// guidelines as our public APIs. @@ -51,7 +51,7 @@ public sealed class ClientInternalUseOnlyAttribute : Attribute /// /// Marks a class, method or property for internal use only. This attribute ensures the item /// does not show up in public documentation, adds EditorBrowsableState.Never in C# clients - /// to hide the item, and optionaly adds @internal in TypeScript clients which removes the + /// to hide the item, and optionally adds @internal in TypeScript clients which removes the /// item from the TypeScript declare (d.ts) file. This does not exempt this API from the /// formal REST Api review process. Our internal APIs must meet the same standards and /// guidelines as our public APIs. diff --git a/src/Sdk/WebApi/WebApi/Contracts/Graph/Constants.cs b/src/Sdk/WebApi/WebApi/Contracts/Graph/Constants.cs index 45f20ecbd0d..3f835cf2d01 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Graph/Constants.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Graph/Constants.cs @@ -66,12 +66,12 @@ public static class SubjectType public const string AadUser = "aad"; [GenerateConstant] public const string MsaUser = "msa"; - public const string UnknownUser = "unusr"; // user with unknown type (not add nor msa) + public const string UnknownUser = "unusr"; // user with unknown type (neither add nor msa) [GenerateConstant] public const string AadGroup = "aadgp"; [GenerateConstant] public const string VstsGroup = "vssgp"; - public const string UnknownGroup = "ungrp"; // group with unknown type (not add nor vsts) + public const string UnknownGroup = "ungrp"; // group with unknown type (neither add nor vsts) [GenerateConstant] public const string BindPendingUser = "bnd"; public const string WindowsIdentity = "win"; diff --git a/src/Sdk/WebApi/WebApi/Contracts/Identity/Identity.cs b/src/Sdk/WebApi/WebApi/Contracts/Identity/Identity.cs index eb9b896ada8..9f8ac734278 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Identity/Identity.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Identity/Identity.cs @@ -14,7 +14,7 @@ namespace GitHub.Services.Identity { //The only PATCH-able property on this class is CustomDisplayName, however there are more read/write properties - //because they get set by various providers in the Framework dll, in general Framework should not have internalsvisibleto to this dll + //because they get set by various providers in the Framework dll, in general Framework should not have internals visible to to this dll //CONSIDER: Should providers be in GitHub.Services.Identity instead? [DataContract] public sealed class Identity : IdentityBase, ISecuredObject diff --git a/src/Sdk/WebApi/WebApi/Contracts/Patch/PatchOperation.cs b/src/Sdk/WebApi/WebApi/Contracts/Patch/PatchOperation.cs index 433100c77d9..7ac9681609d 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Patch/PatchOperation.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Patch/PatchOperation.cs @@ -209,7 +209,7 @@ protected static object ValidateAndGetValue(JsonPatchOperation operation) } /// - /// Gets The type of the field the path maps to. + /// Gets the type of the field to which the path maps. /// /// The type of the parent object. /// The path to evaluate. @@ -220,7 +220,7 @@ private static Type GetType(Type type, string path) } /// - /// Gets The type of the field the path maps to. + /// Gets the type of the field to which the path maps. /// /// The type of the parent object. /// The path enumeration to evaluate. diff --git a/src/Sdk/WebApi/WebApi/Contracts/Patch/RemovePatchOperation.cs b/src/Sdk/WebApi/WebApi/Contracts/Patch/RemovePatchOperation.cs index 051613176b7..eacecb0dc31 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Patch/RemovePatchOperation.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Patch/RemovePatchOperation.cs @@ -61,7 +61,7 @@ public override void Apply(TModel target) } else { - // We can't remove outside the rangeof the list. + // We can't remove outside the range of the list. throw new PatchOperationFailedException(PatchResources.IndexOutOfRange(this.Path)); } } diff --git a/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributesQueryContext.cs b/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributesQueryContext.cs index 94db2400a20..a6bb07e33d5 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributesQueryContext.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/Profile/AttributesQueryContext.cs @@ -117,7 +117,7 @@ public object Clone() /// Used to specify the scope of a set of attributes. /// /// - /// A profile attribute is either a core attribute or an attribute beloging to some application container. + /// A profile attribute is either a core attribute or an attribute belonging to some application container. /// A core attribute belongs to scope AttributesScope.Core. /// An attribute stored under some application container belongs to scope AttributesScope.Application. /// An attribute always belongs to scope AttributesScope.Core | AttributesScope.Application. diff --git a/src/Sdk/WebApi/WebApi/Contracts/PropertiesCollection.cs b/src/Sdk/WebApi/WebApi/Contracts/PropertiesCollection.cs index 03e868ac5b8..68391b6ad93 100644 --- a/src/Sdk/WebApi/WebApi/Contracts/PropertiesCollection.cs +++ b/src/Sdk/WebApi/WebApi/Contracts/PropertiesCollection.cs @@ -15,7 +15,7 @@ namespace GitHub.Services.WebApi //the server side TeamFoundationPropertiesService stores five types in their native format //: Byte[], Int32, Double, DateType and String. //JSON.NET deals correctly with Double, DateType and String, but can't discern the proper - //type of Byte[] and Int32 on deserization if deserializing into Object. Byte[] gets serialized as a + //type of Byte[] and Int32 on deserialization if deserializing into Object. Byte[] gets serialized as a //Base64 encoded string, and stays that way. All integers get serialized as Int64, and stay that way //on deserialization. Adding ItemTypeNameHandling=TypeNameHandling.All fixed Byte[] but not Int32, it turns //out that they only primitive type that gets the name is byte[]... diff --git a/src/Sdk/WebApi/WebApi/Exceptions/SecurityExceptions.cs b/src/Sdk/WebApi/WebApi/Exceptions/SecurityExceptions.cs index 2c67437d161..147d79f03da 100644 --- a/src/Sdk/WebApi/WebApi/Exceptions/SecurityExceptions.cs +++ b/src/Sdk/WebApi/WebApi/Exceptions/SecurityExceptions.cs @@ -37,7 +37,7 @@ public class AccessCheckException : SecurityException /// The identity descriptor which was checked. /// The display name of the identity which was checked. /// The token which was checked. - /// The requested permissions, which were not satisifed by the check. + /// The requested permissions, which were not satisfied by the check. /// The security namespace which was checked. /// A descriptive message for the exception. public AccessCheckException( @@ -57,7 +57,7 @@ public AccessCheckException( /// /// The identity descriptor which was checked. /// The token which was checked. - /// The requested permissions, which were not satisifed by the check. + /// The requested permissions, which were not satisfied by the check. /// The security namespace which was checked. /// A descriptive message for the exception. public AccessCheckException( diff --git a/src/Sdk/WebApi/WebApi/HttpClients/FileContainerHttpClient.cs b/src/Sdk/WebApi/WebApi/HttpClients/FileContainerHttpClient.cs index e6c8e4efea4..c90b19dbec8 100644 --- a/src/Sdk/WebApi/WebApi/HttpClients/FileContainerHttpClient.cs +++ b/src/Sdk/WebApi/WebApi/HttpClients/FileContainerHttpClient.cs @@ -290,7 +290,7 @@ public async Task UploadFileAsync( FileUploadTrace(itemPath, $"Attempt '{attempt}' for uploading chunk '{currentChunk}' of file '{itemPath}'."); - // inorder for the upload to be retryable, we need the content to be re-readable + // in order for the upload to be retryable, we need the content to be re-readable // to ensure this we copy the chunk into a byte array and send that // chunk size ensures we can convert the length to an int int bytesToCopy = (int)currentStream.Length; @@ -303,8 +303,8 @@ public async Task UploadFileAsync( HttpContent byteArrayContent = new ByteArrayContent(dataToSend, 0, bytesToCopy); byteArrayContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream"); byteArrayContent.Headers.ContentLength = currentStream.Length; - byteArrayContent.Headers.ContentRange = new System.Net.Http.Headers.ContentRangeHeaderValue(currentStream.StartingPostionOnOuterStream, - currentStream.EndingPostionOnOuterStream, + byteArrayContent.Headers.ContentRange = new System.Net.Http.Headers.ContentRangeHeaderValue(currentStream.StartingPositionOnOuterStream, + currentStream.EndingPositionOnOuterStream, streamParser.Length); FileUploadTrace(itemPath, $"Generate new HttpRequest for uploading file '{itemPath}', chunk '{currentChunk}' of '{totalChunks}'."); diff --git a/src/Sdk/WebApi/WebApi/Jwt/JsonWebToken.cs b/src/Sdk/WebApi/WebApi/Jwt/JsonWebToken.cs index 10c25904b3d..f90f66d3637 100644 --- a/src/Sdk/WebApi/WebApi/Jwt/JsonWebToken.cs +++ b/src/Sdk/WebApi/WebApi/Jwt/JsonWebToken.cs @@ -269,7 +269,7 @@ private static byte[] GetSignature(JWTHeader header, JWTPayload payload, VssSign return GetSignature(header, payload, alg, credentials); } - //if we alread have the alg, we assume that the creds have been validated already, + //if we already have the alg, we assume that the creds have been validated already, //to save the expense of validating twice in the create function... private static byte[] GetSignature(JWTHeader header, JWTPayload payload, JWTAlgorithm alg, VssSigningCredentials signingCredentials) { @@ -656,7 +656,7 @@ internal string Scopes private JsonWebToken _actorToken; } - //this coverter converts back and forth from the JWT encoded string + //this converter converts back and forth from the JWT encoded string //and this full type internal class JsonWebTokenConverter : VssSecureJsonConverter { diff --git a/src/Sdk/WebApi/WebApi/Location/Interfaces.cs b/src/Sdk/WebApi/WebApi/Location/Interfaces.cs index 7abbe24c131..46a4a14214c 100644 --- a/src/Sdk/WebApi/WebApi/Location/Interfaces.cs +++ b/src/Sdk/WebApi/WebApi/Location/Interfaces.cs @@ -155,7 +155,7 @@ public interface ILocationDataProvider // // Removes the ServiceDefinition with the specified service type and - // service identifier from the location serivce. + // service identifier from the location service. // // // The service type of the ServiceDefinition to remove. @@ -227,7 +227,7 @@ IEnumerable FindServiceDefinitions( String serviceType); /// - /// Returns the location for the ServiceDefintion associated with the ServiceType + /// Returns the location for the ServiceDefinition associated with the ServiceType /// and ServiceIdentifier that should be used based on the current connection. /// If a ServiceDefinition with the ServiceType and ServiceIdentifier does not /// exist then null will be returned. If a ServiceDefinition with the ServiceType @@ -256,7 +256,7 @@ String LocationForCurrentConnection( Guid serviceIdentifier); /// - /// Returns the location for the ServiceDefintion that should be used based on + /// Returns the location for the ServiceDefinition that should be used based on /// the current connection. This method will never return null or empty. If it /// succeeds it will return a targetable location for the provided /// ServiceDefinition. @@ -386,7 +386,7 @@ AccessMapping GetAccessMapping( /// /// Get the API resource locations -- a collection of versioned URL paths that - /// are keyed by a location identitifer + /// are keyed by a location identifier /// /// ApiResourceLocationCollection GetResourceLocations(); @@ -469,7 +469,7 @@ Task> FindServiceDefinitionsAsync( CancellationToken cancellationToken = default(CancellationToken)); /// - /// Returns the location for the ServiceDefintion associated with the ServiceType + /// Returns the location for the ServiceDefinition associated with the ServiceType /// and ServiceIdentifier that should be used based on the current connection. /// If a ServiceDefinition with the ServiceType and ServiceIdentifier does not /// exist then null will be returned. If a ServiceDefinition with the ServiceType @@ -499,7 +499,7 @@ Task LocationForCurrentConnectionAsync( CancellationToken cancellationToken = default(CancellationToken)); /// - /// Returns the location for the ServiceDefintion that should be used based on + /// Returns the location for the ServiceDefinition that should be used based on /// the current connection. This method will never return null or empty. If it /// succeeds it will return a targetable location for the provided /// ServiceDefinition. @@ -582,7 +582,7 @@ Task GetAccessMappingAsync( /// /// Get the API resource locations -- a collection of versioned URL paths that - /// are keyed by a location identitifer + /// are keyed by a location identifier /// /// Task GetResourceLocationsAsync(CancellationToken cancellationToken = default(CancellationToken)); diff --git a/src/Sdk/WebApi/WebApi/Location/LocationServerMapCache.cs b/src/Sdk/WebApi/WebApi/Location/LocationServerMapCache.cs index 4ae35563445..a725c139251 100644 --- a/src/Sdk/WebApi/WebApi/Location/LocationServerMapCache.cs +++ b/src/Sdk/WebApi/WebApi/Location/LocationServerMapCache.cs @@ -233,7 +233,7 @@ private static void EnsureCacheLoaded() } catch (Exception) { - // It looks like something is wrong witht he cahce, lets just hide this + // It looks like something is wrong with the cache, lets just hide this // exception and work without it. s_cacheUnavailable = true; } diff --git a/src/Sdk/WebApi/WebApi/Location/LocationService.cs b/src/Sdk/WebApi/WebApi/Location/LocationService.cs index 09a6b96766f..400333fed28 100644 --- a/src/Sdk/WebApi/WebApi/Location/LocationService.cs +++ b/src/Sdk/WebApi/WebApi/Location/LocationService.cs @@ -248,9 +248,9 @@ protected virtual ILocationDataProvider LocalDataProvider private class ProviderCache { - public Boolean TryGetValue(Guid locationAreaIdentfier, out ILocationDataProvider provider) + public Boolean TryGetValue(Guid locationAreaIdentifier, out ILocationDataProvider provider) { - return m_guidCache.TryGetValue(locationAreaIdentfier, out provider); + return m_guidCache.TryGetValue(locationAreaIdentifier, out provider); } public Boolean TryGetValue(String locationUrl, out ILocationDataProvider provider) diff --git a/src/Sdk/WebApi/WebApi/Location/ServerDataProvider.cs b/src/Sdk/WebApi/WebApi/Location/ServerDataProvider.cs index 43a222626a5..d73409a18f2 100644 --- a/src/Sdk/WebApi/WebApi/Location/ServerDataProvider.cs +++ b/src/Sdk/WebApi/WebApi/Location/ServerDataProvider.cs @@ -529,7 +529,7 @@ public async Task FindServiceDefinitionAsync( ServiceDefinition definition; if (m_locationDataCacheManager.TryFindService(serviceType, serviceIdentifier, out definition)) { - // If we hit a cache entry return it whether it is null or not. + // If we hit a cache entry return it whether or not it is null. return definition; } @@ -740,7 +740,7 @@ private Boolean NeedToConnect(ConnectOptions optionsNeeded) m_locationDataCacheManager = new LocationCacheManager(m_instanceId, m_serviceOwner, m_baseUri); } - // update the location service cache if we tried to retireve location service data + // update the location service cache if we tried to retrieve location service data m_locationDataCacheManager.WebApplicationRelativeDirectory = connectionData.WebApplicationRelativeDirectory; if (locationServiceData != null) { diff --git a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthConstants.cs b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthConstants.cs index dbff7277607..b38b84c61fe 100644 --- a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthConstants.cs +++ b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthConstants.cs @@ -3,7 +3,7 @@ namespace GitHub.Services.OAuth { /// - /// Provides constants used in token exhanges for OAuth 2.0 + /// Provides constants used in token exchanges for OAuth 2.0 /// public static class VssOAuthConstants { diff --git a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthCredential.cs b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthCredential.cs index 78cf4fc9fa4..9e1013bdef4 100644 --- a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthCredential.cs +++ b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthCredential.cs @@ -97,7 +97,7 @@ public VssOAuthTokenParameters TokenParameters } /// - /// Determines whether or not the response reperesents an authentication challenge for the current credential. + /// Determines whether or not the response represents an authentication challenge for the current credential. /// /// The response to analyze /// True if the web response indicates an authorization challenge; otherwise, false diff --git a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthTokenProvider.cs b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthTokenProvider.cs index 84122a49434..efceaa15162 100644 --- a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthTokenProvider.cs +++ b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthTokenProvider.cs @@ -36,20 +36,20 @@ public VssOAuthTokenProvider( /// The resource server which issued the authentication challenge /// The authorization server token endpoint /// The authorization grant to use for token requests - /// The client credentials to use for token requests + /// The client credentials to use for token requests /// Additional parameters to include with token requests protected VssOAuthTokenProvider( IssuedTokenCredential credential, Uri serverUrl, Uri authorizationUrl, VssOAuthGrant grant, - VssOAuthClientCredential clientCrential, + VssOAuthClientCredential clientCredential, VssOAuthTokenParameters tokenParameters) : base(credential, serverUrl, authorizationUrl) { m_grant = grant; m_tokenParameters = tokenParameters; - m_clientCredential = clientCrential; + m_clientCredential = clientCredential; } /// @@ -134,7 +134,7 @@ public async Task ValidateCredentialAsync(CancellationToken cancellation /// /// If applicable, the previous token which is now considered invalid /// A token used for signalling cancellation - /// A Task&lgt;IssuedToken> for tracking the progress of the token request + /// A Task<IssuedToken> for tracking the progress of the token request protected override async Task OnGetTokenAsync( IssuedToken failedToken, CancellationToken cancellationToken) diff --git a/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs b/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs index 23c51472487..9db188b5060 100644 --- a/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs +++ b/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs @@ -176,7 +176,7 @@ protected async Task> SendAsync( CancellationToken cancellationToken = default(CancellationToken)) { //ConfigureAwait(false) enables the continuation to be run outside - //any captured SyncronizationContext (such as ASP.NET's) which keeps things + //any captured SynchronizationContext (such as ASP.NET's) which keeps things //from deadlocking... using (HttpResponseMessage response = await this.SendAsync(message, userState, cancellationToken).ConfigureAwait(false)) { diff --git a/src/Sdk/WebApi/WebApi/ResourceLocationIds.cs b/src/Sdk/WebApi/WebApi/ResourceLocationIds.cs index 74146067189..675a5fdc5bc 100644 --- a/src/Sdk/WebApi/WebApi/ResourceLocationIds.cs +++ b/src/Sdk/WebApi/WebApi/ResourceLocationIds.cs @@ -36,7 +36,7 @@ public static class LocationResourceIds public static readonly Guid ResourceAreas = new Guid("E81700F7-3BE2-46DE-8624-2EB35882FCAA"); // Used for updating the SPS locations in account migrations. - public const string SpsServiceDefintionResource = "SpsServiceDefinition"; + public const string SpsServiceDefinitionResource = "SpsServiceDefinition"; public static readonly Guid SpsServiceDefinition = new Guid("{DF5F298A-4E06-4815-A13E-6CE90A37EFA4}"); } diff --git a/src/Sdk/WebApi/WebApi/VssConnection.cs b/src/Sdk/WebApi/WebApi/VssConnection.cs index 38bfad8c766..b285585f7b4 100644 --- a/src/Sdk/WebApi/WebApi/VssConnection.cs +++ b/src/Sdk/WebApi/WebApi/VssConnection.cs @@ -120,7 +120,7 @@ public Task ConnectAsync( IVssCredentialPrompts credentialPrompts = Credentials.Federated.Prompt as IVssCredentialPrompts; if (credentialPrompts != null && credentialPrompts.FederatedPrompt != null) { - // IVssCredentialPrompts contains an inner federatedPrompt, then set the paramaters on the inner one + // IVssCredentialPrompts contains an inner federatedPrompt, then set the parameters on the inner one promptToSetParametersOn = credentialPrompts.FederatedPrompt; } else diff --git a/src/Sdk/WebApi/WebApi/VssHttpClientBase.cs b/src/Sdk/WebApi/WebApi/VssHttpClientBase.cs index d5a9c8b11f7..eaa43ccca5c 100644 --- a/src/Sdk/WebApi/WebApi/VssHttpClientBase.cs +++ b/src/Sdk/WebApi/WebApi/VssHttpClientBase.cs @@ -488,7 +488,7 @@ protected async Task SendAsync( /// Id of the location to use /// Values to use to replace parameters in the location's route template /// Version to send in the request or null to use the VSS latest API version - /// The mediatype to set in request header. + /// The media type to set in request header. /// HttpRequestMessage protected Task CreateRequestMessageAsync( HttpMethod method, @@ -512,7 +512,7 @@ protected Task CreateRequestMessageAsync( /// Id of the location to use /// Values to use to replace parameters in the location's route template /// Version to send in the request or null to use the VSS latest API version - /// The mediatype to set in request header. + /// The media type to set in request header. /// HttpRequestMessage protected virtual async Task CreateRequestMessageAsync( HttpMethod method, @@ -544,7 +544,7 @@ protected virtual async Task CreateRequestMessageAsync( /// API resource location /// Values to use to replace parameters in the location's route template /// Version to send in the request or null to use the VSS latest API version - /// The mediatype to set in request header. + /// The media type to set in request header. /// HttpRequestMessage protected HttpRequestMessage CreateRequestMessage( HttpMethod method, @@ -566,7 +566,7 @@ protected HttpRequestMessage CreateRequestMessage( /// API resource location /// Values to use to replace parameters in the location's route template /// Version to send in the request or null to use the VSS latest API version - /// The mediatype to set in request header. + /// The media type to set in request header. /// HttpRequestMessage protected HttpRequestMessage CreateRequestMessage( HttpMethod method, @@ -745,7 +745,7 @@ protected async Task SendAsync( CancellationToken cancellationToken = default(CancellationToken)) { //ConfigureAwait(false) enables the continuation to be run outside - //any captured SyncronizationContext (such as ASP.NET's) which keeps things + //any captured SynchronizationContext (such as ASP.NET's) which keeps things //from deadlocking... using (HttpResponseMessage response = await this.SendAsync(message, userState, cancellationToken).ConfigureAwait(false)) { @@ -849,7 +849,7 @@ protected async Task SendAsync( message.Options.Set(new HttpRequestOptionsKey(VssHttpRequestSettings.HttpCompletionOptionPropertyName), completionOption); //ConfigureAwait(false) enables the continuation to be run outside - //any captured SyncronizationContext (such as ASP.NET's) which keeps things + //any captured SynchronizationContext (such as ASP.NET's) which keeps things //from deadlocking... HttpResponseMessage response = await Client.SendAsync(message, completionOption, cancellationToken).ConfigureAwait(false); diff --git a/src/Sdk/WebApi/WebApi/VssHttpUriUtility.cs b/src/Sdk/WebApi/WebApi/VssHttpUriUtility.cs index 1e56f9fc632..ad5926f9481 100644 --- a/src/Sdk/WebApi/WebApi/VssHttpUriUtility.cs +++ b/src/Sdk/WebApi/WebApi/VssHttpUriUtility.cs @@ -12,7 +12,7 @@ public static class VssHttpUriUtility /// /// /// - /// Set true to escape the replaced route Uri string prior to returning it + /// Set true to escape the replaced route URI string prior to returning it /// Set true to append any unused routeValues as query parameters to the returned route /// If set to true requires all the route parameters to be explicitly passed in routeParams /// @@ -47,7 +47,7 @@ public static String ReplaceRouteValues( int paramStart = -1, paramLength = 0; bool insideParam = false; HashSet unusedValues = new HashSet(routeValues.Keys, StringComparer.OrdinalIgnoreCase); - Dictionary caseIncensitiveRouteValues = new Dictionary(routeValues, StringComparer.OrdinalIgnoreCase); + Dictionary caseInsensitiveRouteValues = new Dictionary(routeValues, StringComparer.OrdinalIgnoreCase); for (int i = 0; i < routeTemplate.Length; i++) { @@ -71,7 +71,7 @@ public static String ReplaceRouteValues( } Object paramValue; - if (caseIncensitiveRouteValues.TryGetValue(paramName, out paramValue)) + if (caseInsensitiveRouteValues.TryGetValue(paramName, out paramValue)) { if (paramValue != null) { @@ -148,7 +148,7 @@ public static String ReplaceRouteValues( foreach (String paramName in unusedValues) { Object paramValue; - if (caseIncensitiveRouteValues.TryGetValue(paramName, out paramValue) && paramValue != null) + if (caseInsensitiveRouteValues.TryGetValue(paramName, out paramValue) && paramValue != null) { sbResult.Append(isFirst ? '?' : '&'); isFirst = false; diff --git a/src/Sdk/WebApi/WebApi/VssJsonCreationConverter.cs b/src/Sdk/WebApi/WebApi/VssJsonCreationConverter.cs index 7c50ddbcbc8..7e1b71d1d4d 100644 --- a/src/Sdk/WebApi/WebApi/VssJsonCreationConverter.cs +++ b/src/Sdk/WebApi/WebApi/VssJsonCreationConverter.cs @@ -28,7 +28,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist return target; } - // fallback to default behavior for writes + // fall back to default behavior for writes public override bool CanWrite => false; public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) diff --git a/src/Sdk/WebApi/WebApi/VssJsonMediaTypeFormatter.cs b/src/Sdk/WebApi/WebApi/VssJsonMediaTypeFormatter.cs index 4abf5b0e0bf..019e4f7ed09 100644 --- a/src/Sdk/WebApi/WebApi/VssJsonMediaTypeFormatter.cs +++ b/src/Sdk/WebApi/WebApi/VssJsonMediaTypeFormatter.cs @@ -45,7 +45,7 @@ public class VssJsonMediaTypeFormatter : JsonMediaTypeFormatter /// /// /// - /// This should typically be false. A true value will cause the wrapping to be skipped which is neccesary when creating ObjectContent from arrays on client to prepare a request + /// This should typically be false. A true value will cause the wrapping to be skipped which is necessary when creating ObjectContent from arrays on client to prepare a request public VssJsonMediaTypeFormatter(bool bypassSafeArrayWrapping = false) : this(bypassSafeArrayWrapping, false, false) { @@ -59,7 +59,7 @@ public VssJsonMediaTypeFormatter(bool bypassSafeArrayWrapping, bool enumsAsNumbe /// /// /// - /// This should typically be false. A true value will cause the wrapping to be skipped which is neccesary when creating ObjectContent from arrays on client to prepare a request + /// This should typically be false. A true value will cause the wrapping to be skipped which is necessary when creating ObjectContent from arrays on client to prepare a request public VssJsonMediaTypeFormatter(HttpRequestMessage request, bool bypassSafeArrayWrapping = false) { Request = request; @@ -83,7 +83,7 @@ private void SetSerializerSettings(bool bypassSafeArrayWrapping, bool enumsAsNum if (!enumsAsNumbers) { - // Serialze enums as camelCased string values + // Serialize enums as camelCased string values this.SerializerSettings.Converters.Add(new StringEnumConverter { NamingStrategy = new CamelCaseNamingStrategy() }); } diff --git a/src/Sdk/WebApi/WebApi/WrappedException.cs b/src/Sdk/WebApi/WebApi/WrappedException.cs index a202b0ea26b..16d342ad4aa 100644 --- a/src/Sdk/WebApi/WebApi/WrappedException.cs +++ b/src/Sdk/WebApi/WebApi/WrappedException.cs @@ -227,7 +227,7 @@ public Exception Unwrap(IDictionary typeMapping) if (exception == null) { - //no standard mapping, fallback to + //no standard mapping, fall back to exception = UnWrap(innerException); } @@ -320,7 +320,7 @@ private Exception UnWrap(Exception innerException) // to make code changes to exceptions that we don't own. Debug.Assert(!(exception is VssException) || exception.Message == Message, "The unwrapped exception message does not match the original exception message.", - "Type: {0}{1}Expected: {2}{1}Actual: {3}{1}{1}This can happen if the exception has a contructor that manipulates the input string. You can work around this by creating a constructor that takes in a WrappedException which sets the message verbatim and optionally the inner exception.", + "Type: {0}{1}Expected: {2}{1}Actual: {3}{1}{1}This can happen if the exception has a constructor that manipulates the input string. You can work around this by creating a constructor that takes in a WrappedException which sets the message verbatim and optionally the inner exception.", exception.GetType(), Environment.NewLine, Message, @@ -340,8 +340,8 @@ private ConstructorInfo GetMatchingConstructor(params Type[] parameterTypes) private static Type LoadType(String typeName) { - // For rest api version < 3.0, the server transmits the fulllAssemblyQualifiedName of exception at time that version was initially released, - // which means normal loading will fail due to version mismatch, as the version will alwyas be <= 14.0.0.0. + // For rest api version < 3.0, the server transmits the fullAssemblyQualifiedName of exception at time that version was initially released, + // which means normal loading will fail due to version mismatch, as the version will always be <= 14.0.0.0. // Example: typeName=GitHub.Core.WebApi.ProjectDoesNotExistWithNameException, GitHub.Core.WebApi, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a // For rest api version >= 3.0 (dev15), it just sends an assembly qualified type name without Version and PublicKeyToken, so it is version agnostic. @@ -408,7 +408,7 @@ private static Assembly ResolveAssembly(AssemblyName asmName) // DEVNOTE: Do not tack-on the version information, instead let the // assembly load without it so that it may resolve to the appropriate. // Otherwise, translation down the stack may fail due to version mismatch - // and that end's up creating un-necessary retries on certain user defined exceptions. + // and that ends up creating unnecessary retries on certain user defined exceptions. // newName.Version = Assembly.GetExecutingAssembly().GetName().Version; newName.SetPublicKeyToken(asmName.GetPublicKeyToken()); @@ -477,12 +477,12 @@ private static void UpdateExceptionAttributeMappingCache() IEnumerable types; try { - // calling GetTypes has side effect of loading direct dependancies of the assembly. + // calling GetTypes has side effect of loading direct dependencies of the assembly. types = assembly.GetTypes(); } catch (ReflectionTypeLoadException ex) { - // if dependant assembly fails to load, we should still be able to get all the exceptions, since it would be unlikely, + // if dependent assembly fails to load, we should still be able to get all the exceptions, since it would be unlikely, // that an exception is referencing a type from the assembly that failed to load. types = ex.Types.Where(t => t != null); } @@ -494,7 +494,7 @@ private static void UpdateExceptionAttributeMappingCache() Tuple cachedValue; // Check if the TypeName already exists in cache and add it if not. if it does exist, update if it has a higher ExclusiveMaxApiVersion. - // (In theory an old exception could be mapped to more then one type in the case we want the latest server + // (In theory an old exception could be mapped to more than one type in the case we want the latest server // to send different older types to different versions of older clients. This method is used only on client when converting a type // from an older server, so we want the latest mapping of the older type.) if (!s_exceptionsWithAttributeMapping.TryGetValue(attribute.TypeName, out cachedValue) || attribute.ExclusiveMaxApiVersion > cachedValue.Item1) diff --git a/src/Sdk/WorkflowParser/Conversion/MatrixBuilder.cs b/src/Sdk/WorkflowParser/Conversion/MatrixBuilder.cs index 285757caeda..7d5ea5a4388 100644 --- a/src/Sdk/WorkflowParser/Conversion/MatrixBuilder.cs +++ b/src/Sdk/WorkflowParser/Conversion/MatrixBuilder.cs @@ -42,7 +42,7 @@ internal void AddVector( } /// - /// Adds the sequence containg all exclude mappings. + /// Adds the sequence containing all exclude mappings. /// internal void Exclude(SequenceToken exclude) { @@ -50,7 +50,7 @@ internal void Exclude(SequenceToken exclude) } /// - /// Adds the sequence containg all include mappings. + /// Adds the sequence containing all include mappings. /// internal void Include(SequenceToken include) { diff --git a/src/Sdk/WorkflowParser/Conversion/PermissionsHelper.cs b/src/Sdk/WorkflowParser/Conversion/PermissionsHelper.cs index b5340895087..76c7eb6bb0d 100644 --- a/src/Sdk/WorkflowParser/Conversion/PermissionsHelper.cs +++ b/src/Sdk/WorkflowParser/Conversion/PermissionsHelper.cs @@ -1,4 +1,4 @@ -#nullable enable +#nullable enable using System; using System.Linq; @@ -17,7 +17,7 @@ internal static class PermissionsHelper /// The permissions within the reusable workflow file. These may be defined either at the root of the file, or may be defined on a job within the file. /// (Optional) The max permissions explicitly allowed by the caller /// The default permissions policy - /// Indicates whether the reusable workflow exists within the same trust boundary (e.g. enterprise/organization) as a the root workflow + /// Indicates whether the reusable workflow exists within the same trust boundary (e.g. enterprise/organization) as the root workflow internal static void ValidateEmbeddedPermissions( TemplateContext context, ReusableWorkflowJob workflowJob, @@ -76,4 +76,4 @@ private static Permissions CreatePermissionsFromPolicy( } } } -} \ No newline at end of file +} diff --git a/src/Sdk/WorkflowParser/Conversion/WorkflowTemplateConverter.cs b/src/Sdk/WorkflowParser/Conversion/WorkflowTemplateConverter.cs index 0c7a74564cb..d679fd6d25e 100644 --- a/src/Sdk/WorkflowParser/Conversion/WorkflowTemplateConverter.cs +++ b/src/Sdk/WorkflowParser/Conversion/WorkflowTemplateConverter.cs @@ -1963,7 +1963,7 @@ private static ExpressionData ConvertToInputValueDefinedType( break; default: - // The schema for worflow_call.inputs only allows boolean, string, or number. + // The schema for workflow_call.inputs only allows boolean, string, or number. // We should have failed earlier if we receive any other type. throw new ArgumentException($"Unexpected defined type '{definedType.Value}' when converting input value for '{key}'"); } @@ -2004,13 +2004,13 @@ internal static IDictionary ConvertToWorkflowJobOutputs(Template foreach (var definition in outputs) { - var spec = definition.Value.AssertMapping("workfow job output spec").ToDictionary( + var spec = definition.Value.AssertMapping("workflow job output spec").ToDictionary( x => x.Key.AssertString("outputs spec key").Value, x => x.Value, StringComparer.OrdinalIgnoreCase ); - var value = spec["value"].AssertString("workfow job output value").Value; + var value = spec["value"].AssertString("workflow job output value").Value; result.Add(definition.Key, value); } diff --git a/src/Sdk/WorkflowParser/Conversion/YamlObjectReader.cs b/src/Sdk/WorkflowParser/Conversion/YamlObjectReader.cs index 970514e2046..8c8ce73106f 100644 --- a/src/Sdk/WorkflowParser/Conversion/YamlObjectReader.cs +++ b/src/Sdk/WorkflowParser/Conversion/YamlObjectReader.cs @@ -231,7 +231,7 @@ private ParsingEvent EvaluateCurrent_Legacy() { if (m_current is Scalar scalar) { - // Verify not using achors + // Verify not using anchors if (scalar.Anchor != null) { throw new InvalidOperationException($"Anchors are not currently supported. Remove the anchor '{scalar.Anchor}'"); @@ -239,7 +239,7 @@ private ParsingEvent EvaluateCurrent_Legacy() } else if (m_current is MappingStart mappingStart) { - // Verify not using achors + // Verify not using anchors if (mappingStart.Anchor != null) { throw new InvalidOperationException($"Anchors are not currently supported. Remove the anchor '{mappingStart.Anchor}'"); @@ -247,7 +247,7 @@ private ParsingEvent EvaluateCurrent_Legacy() } else if (m_current is SequenceStart sequenceStart) { - // Verify not using achors + // Verify not using anchors if (sequenceStart.Anchor != null) { throw new InvalidOperationException($"Anchors are not currently supported. Remove the anchor '{sequenceStart.Anchor}'"); diff --git a/src/Sdk/WorkflowParser/JobContainer.cs b/src/Sdk/WorkflowParser/JobContainer.cs index dfa173c1030..6f03a8433c4 100644 --- a/src/Sdk/WorkflowParser/JobContainer.cs +++ b/src/Sdk/WorkflowParser/JobContainer.cs @@ -54,7 +54,7 @@ public IList Ports } /// - /// Gets or sets the credentials used for pulling the container iamge. + /// Gets or sets the credentials used for pulling the container image. /// public ContainerRegistryCredentials Credentials { diff --git a/src/Sdk/WorkflowParser/WorkflowTemplateParser.cs b/src/Sdk/WorkflowParser/WorkflowTemplateParser.cs index 10a34552501..912c8977cff 100644 --- a/src/Sdk/WorkflowParser/WorkflowTemplateParser.cs +++ b/src/Sdk/WorkflowParser/WorkflowTemplateParser.cs @@ -1,4 +1,4 @@ -#nullable disable // Consider removing in the future to minimize likelihood of NullReferenceException; refer https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references +#nullable disable // Consider removing in the future to minimize likelihood of NullReferenceException; refer https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references using System; using System.Collections.Generic; @@ -102,7 +102,7 @@ public WorkflowTemplate LoadWorkflow( String path, CancellationToken cancellationToken) { - // Setup the template context + // Set up the template context var context = new TemplateContext { CancellationToken = cancellationToken, @@ -117,7 +117,7 @@ public WorkflowTemplate LoadWorkflow( context.SetFeatures(m_features); context.SetJobCountValidator(new JobCountValidator(context, m_parseOptions.MaxJobLimit)); - // Setup the template loader + // Set up the template loader var loader = new YamlTemplateLoader(new ParseOptions(m_parseOptions), fileProvider); // Parse the template tokens diff --git a/src/Sdk/WorkflowParser/workflow-v1.0.json b/src/Sdk/WorkflowParser/workflow-v1.0.json index 01601dcb5db..c1b625154b2 100644 --- a/src/Sdk/WorkflowParser/workflow-v1.0.json +++ b/src/Sdk/WorkflowParser/workflow-v1.0.json @@ -1465,7 +1465,7 @@ ] }, "workflow-run-activity": { - "description": "The types of workflow run activity that trigger the workflow. Suupported activity types: `completed`, `requested`, `in_progress`.", + "description": "The types of workflow run activity that trigger the workflow. Supported activity types: `completed`, `requested`, `in_progress`.", "one-of": [ "workflow-run-activity-type", "workflow-run-activity-types" diff --git a/src/Test/L0/DotnetsdkDownloadScriptL0.cs b/src/Test/L0/DotnetsdkDownloadScriptL0.cs index 9d3fbd26c69..b83aa07af6b 100644 --- a/src/Test/L0/DotnetsdkDownloadScriptL0.cs +++ b/src/Test/L0/DotnetsdkDownloadScriptL0.cs @@ -15,7 +15,7 @@ public async Task EnsureDotnetsdkBashDownloadScriptUpToDate() { if ((DateTime.UtcNow.Month - 1) % 3 != 0) { - // Only check these script once a quater. + // Only check these script once a quarter. return; } @@ -45,7 +45,7 @@ public async Task EnsureDotnetsdkPowershellDownloadScriptUpToDate() { if ((DateTime.UtcNow.Month - 1) % 3 != 0) { - // Only check these script once a quater. + // Only check these script once a quarter. return; } diff --git a/src/Test/L0/Listener/Configuration/ConfigurationManagerL0.cs b/src/Test/L0/Listener/Configuration/ConfigurationManagerL0.cs index 3c698fdda12..5dd78615948 100644 --- a/src/Test/L0/Listener/Configuration/ConfigurationManagerL0.cs +++ b/src/Test/L0/Listener/Configuration/ConfigurationManagerL0.cs @@ -332,7 +332,7 @@ public async Task ConfigureErrorOnMissingRunnerGroup() "configure", "--url", _expectedServerUrl, "--name", _expectedAgentName, - "--runnergroup", "notexists", + "--runnergroup", "nonexistent", "--work", _expectedWorkFolder, "--auth", _expectedAuthType, "--token", _expectedToken, @@ -344,7 +344,7 @@ public async Task ConfigureErrorOnMissingRunnerGroup() trace.Info("Ensuring all the required parameters are available in the command line parameter"); var ex = await Assert.ThrowsAsync(() => configManager.ConfigureAsync(command)); - Assert.Contains("notexists", ex.Message); + Assert.Contains("nonexistent", ex.Message); _runnerServer.Verify(x => x.GetAgentPoolsAsync(It.IsAny(), It.Is(p => p == TaskAgentPoolType.Automation)), Times.Exactly(1)); } @@ -375,7 +375,7 @@ public async Task ConfigureRunnerServiceFailsOnUnconfiguredRunners() trace.Info("Constructed"); _store.Setup(x => x.IsConfigured()).Returns(false); - trace.Info("Ensuring service generation mode fails when on un-configured runners"); + trace.Info("Ensuring service generation mode fails when on deconfigured runners"); var ex = await Assert.ThrowsAsync(() => configManager.ConfigureAsync(command)); Assert.Contains("requires that the runner is already configured", ex.Message); @@ -407,7 +407,7 @@ public async Task ConfigureRunnerServiceCreatesService() _store.Setup(x => x.IsConfigured()).Returns(true); - trace.Info("Ensuring service generation mode fails when on un-configured runners"); + trace.Info("Ensuring service generation mode fails when on deconfigured runners"); await configManager.ConfigureAsync(command); _serviceControlManager.Verify(x => x.GenerateScripts(It.IsAny()), Times.Once); diff --git a/src/Test/L0/Listener/Configuration/NativeWindowsServiceHelperL0.cs b/src/Test/L0/Listener/Configuration/NativeWindowsServiceHelperL0.cs index 8623a7872d0..83a440cc33d 100644 --- a/src/Test/L0/Listener/Configuration/NativeWindowsServiceHelperL0.cs +++ b/src/Test/L0/Listener/Configuration/NativeWindowsServiceHelperL0.cs @@ -30,7 +30,7 @@ public void EnsureGetDefaultServiceAccountShouldReturnNetworkServiceAccount() trace.Info("Trying to get the Default Service Account when a BuildRelease Agent is being configured"); var defaultServiceAccount = windowsServiceHelper.GetDefaultServiceAccount(); - Assert.True(defaultServiceAccount.ToString().Equals(@"NT AUTHORITY\NETWORK SERVICE"), "If agent is getting configured as build-release agent, default service accout should be 'NT AUTHORITY\\NETWORK SERVICE'"); + Assert.True(defaultServiceAccount.ToString().Equals(@"NT AUTHORITY\NETWORK SERVICE"), "If agent is getting configured as build-release agent, default service account should be 'NT AUTHORITY\\NETWORK SERVICE'"); } } @@ -48,7 +48,7 @@ public void EnsureGetDefaultAdminServiceAccountShouldReturnLocalSystemAccount() trace.Info("Trying to get the Default Service Account when a DeploymentAgent is being configured"); var defaultServiceAccount = windowsServiceHelper.GetDefaultAdminServiceAccount(); - Assert.True(defaultServiceAccount.ToString().Equals(@"NT AUTHORITY\SYSTEM"), "If agent is getting configured as deployment agent, default service accout should be 'NT AUTHORITY\\SYSTEM'"); + Assert.True(defaultServiceAccount.ToString().Equals(@"NT AUTHORITY\SYSTEM"), "If agent is getting configured as deployment agent, default service account should be 'NT AUTHORITY\\SYSTEM'"); } } #pragma warning restore CA1416 diff --git a/src/Test/L0/Listener/Configuration/RunnerCredentialL0.cs b/src/Test/L0/Listener/Configuration/RunnerCredentialL0.cs index a2c5d0c20ba..335e0b82266 100644 --- a/src/Test/L0/Listener/Configuration/RunnerCredentialL0.cs +++ b/src/Test/L0/Listener/Configuration/RunnerCredentialL0.cs @@ -14,7 +14,7 @@ public class TestRunnerCredential : CredentialProvider public TestRunnerCredential() : base("TEST") { } public override VssCredentials GetVssCredentials(IHostContext context, bool allowAuthUrlV2) { - Tracing trace = context.GetTrace("OuthAccessToken"); + Tracing trace = context.GetTrace("OAuthAccessToken"); trace.Info("GetVssCredentials()"); var loginCred = new VssOAuthAccessTokenCredential("sometoken"); @@ -108,4 +108,4 @@ public void UseAuthV2Url() } } } -} \ No newline at end of file +} diff --git a/src/Test/L0/Listener/JobDispatcherL0.cs b/src/Test/L0/Listener/JobDispatcherL0.cs index 3b26233a456..1f0d66d6da7 100644 --- a/src/Test/L0/Listener/JobDispatcherL0.cs +++ b/src/Test/L0/Listener/JobDispatcherL0.cs @@ -89,7 +89,7 @@ public async void DispatchesJobRequest(string billingOwnerId) _runnerServer.Setup(x => x.FinishAgentRequestAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())).Returns(Task.FromResult(new TaskAgentJobRequest())); - //Actt + //Act jobDispatcher.Run(message); //Assert diff --git a/src/Test/L0/Listener/MessageListenerL0.cs b/src/Test/L0/Listener/MessageListenerL0.cs index 80792539be9..e39349ead78 100644 --- a/src/Test/L0/Listener/MessageListenerL0.cs +++ b/src/Test/L0/Listener/MessageListenerL0.cs @@ -254,13 +254,13 @@ public async Task GetNextMessageWithBrokerMigration() CreateSessionResult result = await listener.CreateSessionAsync(tokenSource.Token); Assert.Equal(CreateSessionResult.Success, result); - var brokerMigrationMesage = new BrokerMigrationMessage(new Uri("https://actions.broker.com")); + var brokerMigrationMessage = new BrokerMigrationMessage(new Uri("https://actions.broker.com")); var arMessages = new TaskAgentMessage[] { new TaskAgentMessage { - Body = JsonUtility.ToString(brokerMigrationMesage), + Body = JsonUtility.ToString(brokerMigrationMessage), MessageType = BrokerMigrationMessage.MessageType }, }; @@ -328,7 +328,7 @@ public async Task GetNextMessageWithBrokerMigration() .Verify(x => x.LoadCredentials(true), Times.Exactly(brokerMessages.Length)); _brokerServer - .Verify(x => x.UpdateConnectionIfNeeded(brokerMigrationMesage.BrokerBaseUrl, It.IsAny()), Times.Exactly(brokerMessages.Length)); + .Verify(x => x.UpdateConnectionIfNeeded(brokerMigrationMessage.BrokerBaseUrl, It.IsAny()), Times.Exactly(brokerMessages.Length)); _brokerServer .Verify(x => x.ForceRefreshConnection(It.IsAny()), Times.Never); @@ -526,13 +526,13 @@ public async Task GetNextMessageWithBrokerMigration_AuthMigrationFallback() CreateSessionResult result = await listener.CreateSessionAsync(tokenSource.Token); Assert.Equal(CreateSessionResult.Success, result); - var brokerMigrationMesage = new BrokerMigrationMessage(new Uri("https://actions.broker.com")); + var brokerMigrationMessage = new BrokerMigrationMessage(new Uri("https://actions.broker.com")); var arMessages = new TaskAgentMessage[] { new TaskAgentMessage { - Body = JsonUtility.ToString(brokerMigrationMesage), + Body = JsonUtility.ToString(brokerMigrationMessage), MessageType = BrokerMigrationMessage.MessageType }, }; @@ -607,7 +607,7 @@ public async Task GetNextMessageWithBrokerMigration_AuthMigrationFallback() .Verify(x => x.LoadCredentials(true), Times.Exactly(brokerMessages.Length + 1)); _brokerServer - .Verify(x => x.UpdateConnectionIfNeeded(brokerMigrationMesage.BrokerBaseUrl, It.IsAny()), Times.Exactly(brokerMessages.Length + 1)); + .Verify(x => x.UpdateConnectionIfNeeded(brokerMigrationMessage.BrokerBaseUrl, It.IsAny()), Times.Exactly(brokerMessages.Length + 1)); _brokerServer .Verify(x => x.ForceRefreshConnection(It.IsAny()), Times.Once()); @@ -650,13 +650,13 @@ public async Task GetNextMessageWithBrokerMigration_EnableAuthMigration() CreateSessionResult result = await listener.CreateSessionAsync(tokenSource.Token); Assert.Equal(CreateSessionResult.Success, result); - var brokerMigrationMesage = new BrokerMigrationMessage(new Uri("https://actions.broker.com")); + var brokerMigrationMessage = new BrokerMigrationMessage(new Uri("https://actions.broker.com")); var arMessages = new TaskAgentMessage[] { new TaskAgentMessage { - Body = JsonUtility.ToString(brokerMigrationMesage), + Body = JsonUtility.ToString(brokerMigrationMessage), MessageType = BrokerMigrationMessage.MessageType }, }; @@ -729,7 +729,7 @@ public async Task GetNextMessageWithBrokerMigration_EnableAuthMigration() .Verify(x => x.LoadCredentials(true), Times.Exactly(brokerMessages.Length)); _brokerServer - .Verify(x => x.UpdateConnectionIfNeeded(brokerMigrationMesage.BrokerBaseUrl, It.IsAny()), Times.Exactly(brokerMessages.Length)); + .Verify(x => x.UpdateConnectionIfNeeded(brokerMigrationMessage.BrokerBaseUrl, It.IsAny()), Times.Exactly(brokerMessages.Length)); _brokerServer .Verify(x => x.ForceRefreshConnection(It.IsAny()), Times.Once()); diff --git a/src/Test/L0/Listener/SelfUpdaterL0.cs b/src/Test/L0/Listener/SelfUpdaterL0.cs index be095ce9093..838ee857810 100644 --- a/src/Test/L0/Listener/SelfUpdaterL0.cs +++ b/src/Test/L0/Listener/SelfUpdaterL0.cs @@ -207,7 +207,7 @@ public async void TestSelfUpdateAsync_DownloadRetry() hc.SetSingleton(new HttpClientHandlerFactory()); _runnerServer.Setup(x => x.GetPackageAsync("agent", BuildConstants.RunnerPackage.PackageName, "2.999.0", true, It.IsAny())) - .Returns(Task.FromResult(new PackageMetadata() { Platform = BuildConstants.RunnerPackage.PackageName, Version = new PackageVersion("2.999.0"), DownloadUrl = $"https://github.com/actions/runner/notexists" })); + .Returns(Task.FromResult(new PackageMetadata() { Platform = BuildConstants.RunnerPackage.PackageName, Version = new PackageVersion("2.999.0"), DownloadUrl = $"https://github.com/actions/runner/nonexistent" })); var p1 = new ProcessInvokerWrapper(); p1.Initialize(hc); diff --git a/src/Test/L0/Listener/SelfUpdaterV2L0.cs b/src/Test/L0/Listener/SelfUpdaterV2L0.cs index 5115a6bbb7f..9343b7f3ca1 100644 --- a/src/Test/L0/Listener/SelfUpdaterV2L0.cs +++ b/src/Test/L0/Listener/SelfUpdaterV2L0.cs @@ -167,7 +167,7 @@ public async void TestSelfUpdateAsync_DownloadRetry() { TargetVersion = "2.999.0", OS = BuildConstants.RunnerPackage.PackageName, - DownloadUrl = "https://github.com/actions/runner/notexists" + DownloadUrl = "https://github.com/actions/runner/nonexistent" }; var ex = await Assert.ThrowsAsync(() => updater.SelfUpdate(message, _jobDispatcher.Object, true, hc.RunnerShutdownToken)); diff --git a/src/Test/L0/ProcessInvokerL0.cs b/src/Test/L0/ProcessInvokerL0.cs index dc3629e67aa..3c4e6e8e13b 100644 --- a/src/Test/L0/ProcessInvokerL0.cs +++ b/src/Test/L0/ProcessInvokerL0.cs @@ -402,7 +402,7 @@ public async Task RedirectSTDINKeepStreamOpen() [Fact] [Trait("Level", "L0")] [Trait("Category", "Common")] - public async Task OomScoreAdjIsWriten_Default() + public async Task OomScoreAdjIsWritten_Default() { // We are on a system that supports oom_score_adj in procfs as assumed by ProcessInvoker string testProcPath = $"/proc/{Process.GetCurrentProcess().Id}/oom_score_adj"; @@ -438,7 +438,7 @@ public async Task OomScoreAdjIsWriten_Default() [Fact] [Trait("Level", "L0")] [Trait("Category", "Common")] - public async Task OomScoreAdjIsWriten_FromEnv() + public async Task OomScoreAdjIsWritten_FromEnv() { // We are on a system that supports oom_score_adj in procfs as assumed by ProcessInvoker string testProcPath = $"/proc/{Process.GetCurrentProcess().Id}/oom_score_adj"; diff --git a/src/Test/L0/TestHostContext.cs b/src/Test/L0/TestHostContext.cs index c1cf692204f..37b3f1fc358 100644 --- a/src/Test/L0/TestHostContext.cs +++ b/src/Test/L0/TestHostContext.cs @@ -48,7 +48,7 @@ public TestHostContext(object testClass, [CallerMemberName] string testName = "" startIndex: typeof(Tests.TestHostContext).FullName.LastIndexOf(nameof(TestHostContext))); _suiteName = _suiteName.Replace(".", "_"); - // Setup the trace manager. + // Set up the trace manager. TraceFileName = Path.Combine( Path.Combine(TestUtil.GetSrcPath(), "Test", "TestLogs"), $"trace_{_suiteName}_{_testName}.log"); diff --git a/src/Test/L0/Util/StringUtilL0.cs b/src/Test/L0/Util/StringUtilL0.cs index f6eed8ccf47..ebac1183dc1 100644 --- a/src/Test/L0/Util/StringUtilL0.cs +++ b/src/Test/L0/Util/StringUtilL0.cs @@ -102,7 +102,7 @@ public void FormatUsesInvariantCulture() [Fact] [Trait("Level", "L0")] [Trait("Category", "Common")] - public void ConvertNullOrEmptryStringToBool() + public void ConvertNullOrEmptyStringToBool() { using (TestHostContext hc = new(this)) { @@ -123,7 +123,7 @@ public void ConvertNullOrEmptryStringToBool() [Fact] [Trait("Level", "L0")] [Trait("Category", "Common")] - public void ConvertNullOrEmptryStringToDefaultBool() + public void ConvertNullOrEmptyStringToDefaultBool() { using (TestHostContext hc = new(this)) { diff --git a/src/Test/L0/Worker/ActionManagerL0.cs b/src/Test/L0/Worker/ActionManagerL0.cs index bc477931226..1683caeb938 100644 --- a/src/Test/L0/Worker/ActionManagerL0.cs +++ b/src/Test/L0/Worker/ActionManagerL0.cs @@ -415,11 +415,11 @@ public async void PrepareActions_AlwaysClearActionsCache() var actionId = Guid.NewGuid(); var actions = new List(); - var watermarkFile = Path.Combine(_hc.GetDirectory(WellKnownDirectory.Actions), "notexist/no", "notexist.completed"); + var watermarkFile = Path.Combine(_hc.GetDirectory(WellKnownDirectory.Actions), "nonexistent/no", "nonexistent.completed"); Directory.CreateDirectory(Path.GetDirectoryName(watermarkFile)); File.WriteAllText(watermarkFile, DateTime.UtcNow.ToString()); - Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(watermarkFile), "notexist")); - File.Copy(Path.Combine(TestUtil.GetSrcPath(), "Test", TestDataFolderName, "dockerfileaction.yml"), Path.Combine(Path.GetDirectoryName(watermarkFile), "notexist", "action.yml")); + Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(watermarkFile), "nonexistent")); + File.Copy(Path.Combine(TestUtil.GetSrcPath(), "Test", TestDataFolderName, "dockerfileaction.yml"), Path.Combine(Path.GetDirectoryName(watermarkFile), "nonexistent", "action.yml")); //Act await _actionManager.PrepareActionsAsync(_ec.Object, actions); diff --git a/src/Test/L0/Worker/ActionRunnerL0.cs b/src/Test/L0/Worker/ActionRunnerL0.cs index 8186e25b642..8404ddb2158 100644 --- a/src/Test/L0/Worker/ActionRunnerL0.cs +++ b/src/Test/L0/Worker/ActionRunnerL0.cs @@ -191,7 +191,7 @@ public void EvaluateExpansionOfDisplayNameToken() [Trait("Category", "Worker")] public void IgnoreDisplayNameTokenWhenDisplayNameIsExplicitlySet() { - var explicitDisplayName = "Explcitly Set Name"; + var explicitDisplayName = "Explicitly Set Name"; // Arrange Setup(); diff --git a/src/Test/L0/Worker/CreateStepSummaryCommandL0.cs b/src/Test/L0/Worker/CreateStepSummaryCommandL0.cs index 185f44b3865..c612105d5bf 100644 --- a/src/Test/L0/Worker/CreateStepSummaryCommandL0.cs +++ b/src/Test/L0/Worker/CreateStepSummaryCommandL0.cs @@ -188,7 +188,7 @@ private TestHostContext Setup([CallerMemberName] string name = "") _issues = new List>(); - // Setup a job request + // Set up a job request TaskOrchestrationPlanReference plan = new(); TimelineReference timeline = new(); Guid jobId = Guid.NewGuid(); diff --git a/src/Test/L0/Worker/ExecutionContextL0.cs b/src/Test/L0/Worker/ExecutionContextL0.cs index 2f28f797fb5..e6a59531f4f 100644 --- a/src/Test/L0/Worker/ExecutionContextL0.cs +++ b/src/Test/L0/Worker/ExecutionContextL0.cs @@ -38,7 +38,7 @@ public void AddIssue_CountWarningsErrors() }); jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger = new Mock(); var jobServerQueue = new Mock(); jobServerQueue.Setup(x => x.QueueTimelineRecordUpdate(It.IsAny(), It.IsAny())); @@ -116,7 +116,7 @@ public void ApplyContinueOnError_CheckResultAndOutcome() jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); jobRequest.Variables["ACTIONS_STEP_DEBUG"] = "true"; - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger = new Mock(); var jobServerQueue = new Mock(); jobServerQueue.Setup(x => x.QueueTimelineRecordUpdate(It.IsAny(), It.IsAny())); @@ -171,7 +171,7 @@ public void AddIssue_TrimMessageSize() }); jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger = new Mock(); var jobServerQueue = new Mock(); jobServerQueue.Setup(x => x.QueueTimelineRecordUpdate(It.IsAny(), It.IsAny())); @@ -225,7 +225,7 @@ public void AddIssue_OverrideLogMessage() }); jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger = new Mock(); var jobServerQueue = new Mock(); @@ -280,7 +280,7 @@ public void AddIssue_AddStepAndLineNumberInformation() }); jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger = new Mock(); var pagingLogger2 = new Mock(); var jobServerQueue = new Mock(); @@ -332,7 +332,7 @@ public void Debug_Multilines() jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); jobRequest.Variables["ACTIONS_STEP_DEBUG"] = "true"; - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger = new Mock(); var jobServerQueue = new Mock(); jobServerQueue.Setup(x => x.QueueTimelineRecordUpdate(It.IsAny(), It.IsAny())); @@ -383,7 +383,7 @@ public void RegisterPostJobAction_ShareState() jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); jobRequest.Variables["ACTIONS_STEP_DEBUG"] = "true"; - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger1 = new Mock(); var pagingLogger2 = new Mock(); var pagingLogger3 = new Mock(); @@ -481,7 +481,7 @@ public void RegisterPostJobAction_NotRegisterPostTwice() jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); jobRequest.Variables["ACTIONS_STEP_DEBUG"] = "true"; - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger1 = new Mock(); var pagingLogger2 = new Mock(); var pagingLogger3 = new Mock(); @@ -565,7 +565,7 @@ public void ActionResult_Lowercase() jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); jobRequest.Variables["ACTIONS_STEP_DEBUG"] = "true"; - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger1 = new Mock(); var jobServerQueue = new Mock(); hc.EnqueueInstance(pagingLogger1.Object); @@ -619,7 +619,7 @@ public void PublishStepTelemetry_RegularStep_NoOpt() }); jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger = new Mock(); var jobServerQueue = new Mock(); jobServerQueue.Setup(x => x.QueueTimelineRecordUpdate(It.IsAny(), It.IsAny())); @@ -662,7 +662,7 @@ public void PublishStepTelemetry_RegularStep() }); jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger = new Mock(); var jobServerQueue = new Mock(); jobServerQueue.Setup(x => x.QueueTimelineRecordUpdate(It.IsAny(), It.IsAny())); @@ -726,7 +726,7 @@ public void PublishStepTelemetry_EmbeddedStep() }); jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger = new Mock(); var pagingLogger2 = new Mock(); var jobServerQueue = new Mock(); @@ -866,7 +866,7 @@ public void PublishStepResult_EmbeddedStep_Legacy() }); jobRequest.ContextData["github"] = new Pipelines.ContextData.DictionaryContextData(); - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger = new Mock(); var pagingLogger2 = new Mock(); var jobServerQueue = new Mock(); @@ -905,7 +905,7 @@ private TestHostContext CreateTestContext([CallerMemberName] String testName = " { var hc = new TestHostContext(this, testName); - // Arrange: Setup the configation store. + // Arrange: Set up the configuration store. var configurationStore = new Mock(); configurationStore.Setup(x => x.GetSettings()).Returns(new RunnerSettings()); hc.SetSingleton(configurationStore.Object); @@ -952,7 +952,7 @@ public void GetExpressionValues_ContainerStepHost() ec.Initialize(hc); var inputGithubContext = new GitHubContext(); - var inputeRunnerContext = new RunnerContext(); + var inputRunnerContext = new RunnerContext(); // string context data inputGithubContext["action_path"] = new StringContextData("/home/username/Projects/work/runner/_layout/_work/_actions/owner/composite/main"); @@ -965,8 +965,8 @@ public void GetExpressionValues_ContainerStepHost() inputGithubContext["run_id"] = new StringContextData("2033211332"); inputGithubContext["workflow"] = new StringContextData("Name of Workflow"); inputGithubContext["workspace"] = new StringContextData("/home/username/Projects/work/runner/_layout/_work/step-order/step-order"); - inputeRunnerContext["temp"] = new StringContextData("/home/username/Projects/work/runner/_layout/_work/_temp"); - inputeRunnerContext["tool_cache"] = new StringContextData("/home/username/Projects/work/runner/_layout/_work/_tool"); + inputRunnerContext["temp"] = new StringContextData("/home/username/Projects/work/runner/_layout/_work/_temp"); + inputRunnerContext["tool_cache"] = new StringContextData("/home/username/Projects/work/runner/_layout/_work/_tool"); // dictionary context data var githubEvent = new DictionaryContextData(); @@ -979,7 +979,7 @@ public void GetExpressionValues_ContainerStepHost() inputGithubContext["event"] = githubEvent; ec.ExpressionValues["github"] = inputGithubContext; - ec.ExpressionValues["runner"] = inputeRunnerContext; + ec.ExpressionValues["runner"] = inputRunnerContext; var ecExpect = new Runner.Worker.ExecutionContext(); ecExpect.Initialize(hc); @@ -1060,7 +1060,7 @@ public void ActionVariables_AddedToVarsContext() inputVarsContext["VARIABLE_2"] = new StringContextData("value2"); jobRequest.ContextData["vars"] = inputVarsContext; - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger1 = new Mock(); var jobServerQueue = new Mock(); hc.EnqueueInstance(pagingLogger1.Object); @@ -1105,7 +1105,7 @@ public void ActionVariables_DebugUsingVars() inputVarsContext[Constants.Variables.Actions.RunnerDebug] = new StringContextData("true"); jobRequest.ContextData["vars"] = inputVarsContext; - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger1 = new Mock(); var jobServerQueue = new Mock(); hc.EnqueueInstance(pagingLogger1.Object); @@ -1151,7 +1151,7 @@ public void ActionVariables_SecretsPrecedenceForDebugUsingVars() jobRequest.Variables[Constants.Variables.Actions.StepDebug] = "false"; jobRequest.Variables[Constants.Variables.Actions.RunnerDebug] = "false"; - // Arrange: Setup the paging logger. + // Arrange: Set up the paging logger. var pagingLogger1 = new Mock(); var jobServerQueue = new Mock(); hc.EnqueueInstance(pagingLogger1.Object); diff --git a/src/Test/L0/Worker/JobExtensionL0.cs b/src/Test/L0/Worker/JobExtensionL0.cs index 60814998ef3..83859b5e0bf 100644 --- a/src/Test/L0/Worker/JobExtensionL0.cs +++ b/src/Test/L0/Worker/JobExtensionL0.cs @@ -258,7 +258,7 @@ public async Task JobExtensionBuildFailsWithoutContainerIfRequired() [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] - public async Task UploadDiganosticLogIfEnvironmentVariableSet() + public async Task UploadDiagnosticLogIfEnvironmentVariableSet() { using (TestHostContext hc = CreateTestContext()) { diff --git a/src/Test/L0/Worker/OutputManagerL0.cs b/src/Test/L0/Worker/OutputManagerL0.cs index 7005547b56e..65768e28e8f 100644 --- a/src/Test/L0/Worker/OutputManagerL0.cs +++ b/src/Test/L0/Worker/OutputManagerL0.cs @@ -795,7 +795,7 @@ public async void MatcherFile_JobContainer() _executionContext.Setup(x => x.GetGitHubContext("workspace")).Returns(workspaceDirectory); _executionContext.Setup(x => x.GetGitHubContext("repository")).Returns("my-org/workflow-repo"); - // Setup a git repository + // Set up a git repository await CreateRepository(hostContext, workspaceDirectory, "https://github.com/my-org/workflow-repo"); // Create test files @@ -856,7 +856,7 @@ public async void MatcherFile_StepContainer() _executionContext.Setup(x => x.GetGitHubContext("workspace")).Returns(workspaceDirectory); _executionContext.Setup(x => x.GetGitHubContext("repository")).Returns("my-org/workflow-repo"); - // Setup a git repository + // Set up a git repository await CreateRepository(hostContext, workspaceDirectory, "https://github.com/my-org/workflow-repo"); // Create test files @@ -918,7 +918,7 @@ public async void MatcherFromPath() _executionContext.Setup(x => x.GetGitHubContext("workspace")).Returns(workspaceDirectory); _executionContext.Setup(x => x.GetGitHubContext("repository")).Returns("my-org/workflow-repo"); - // Setup a git repository + // Set up a git repository var repositoryPath = Path.Combine(workspaceDirectory, "workflow-repo"); await CreateRepository(hostContext, repositoryPath, "https://github.com/my-org/workflow-repo"); @@ -974,7 +974,7 @@ public async void MatcherDefaultFromPath() _executionContext.Setup(x => x.GetGitHubContext("workspace")).Returns(workspaceDirectory); _executionContext.Setup(x => x.GetGitHubContext("repository")).Returns("my-org/workflow-repo"); - // Setup a git repository + // Set up a git repository var repositoryPath = Path.Combine(workspaceDirectory, "workflow-repo"); await CreateRepository(hostContext, repositoryPath, "https://github.com/my-org/workflow-repo"); @@ -1098,18 +1098,18 @@ private void Process(string line) _outputManager.OnDataReceived(null, new ProcessDataReceivedEventArgs(line)); } - private async Task CreateRepository(TestHostContext hostConetxt, string path, string url) + private async Task CreateRepository(TestHostContext hostContext, string path, string url) { Directory.CreateDirectory(path); var gitPath = WhichUtil.Which("git", true); var environment = new Dictionary(); - using (var processInvoker = new ProcessInvoker(hostConetxt.GetTrace())) + using (var processInvoker = new ProcessInvoker(hostContext.GetTrace())) { await processInvoker.ExecuteAsync(path, gitPath, "init", environment, CancellationToken.None); } - using (var processInvoker = new ProcessInvoker(hostConetxt.GetTrace())) + using (var processInvoker = new ProcessInvoker(hostContext.GetTrace())) { await processInvoker.ExecuteAsync(path, gitPath, $"remote add origin {url}", environment, CancellationToken.None); } diff --git a/src/Test/L0/Worker/PipelineDirectoryManagerL0.cs b/src/Test/L0/Worker/PipelineDirectoryManagerL0.cs index faabf9ef89a..541ff5c52d2 100644 --- a/src/Test/L0/Worker/PipelineDirectoryManagerL0.cs +++ b/src/Test/L0/Worker/PipelineDirectoryManagerL0.cs @@ -198,10 +198,10 @@ public void UpdatesRepositoryDirectoryThrowOnInvalidPath() private TestHostContext Setup( [CallerMemberName] string name = "") { - // Setup the host context. + // Set up the host context. TestHostContext hc = new(this, name); - // Setup the execution context. + // Set up the execution context. _ec = new Mock(); _ec.Setup(x => x.Global).Returns(new GlobalContext()); @@ -217,11 +217,11 @@ private TestHostContext Setup( _workspaceOptions = new Pipelines.WorkspaceOptions(); - // Setup the tracking manager. + // Set up the tracking manager. _trackingManager = new Mock(); hc.SetSingleton(_trackingManager.Object); - // Setup the build directory manager. + // Set up the build directory manager. _pipelineDirectoryManager = new PipelineDirectoryManager(); _pipelineDirectoryManager.Initialize(hc); return hc; diff --git a/src/Test/L0/Worker/StepsRunnerL0.cs b/src/Test/L0/Worker/StepsRunnerL0.cs index a22dc618f8d..8a80a3dd233 100644 --- a/src/Test/L0/Worker/StepsRunnerL0.cs +++ b/src/Test/L0/Worker/StepsRunnerL0.cs @@ -585,7 +585,7 @@ public async Task StepContextConclusion() private Mock CreateStep(TestHostContext hc, TaskResult result, string condition, Boolean continueOnError = false, MappingToken env = null, string name = "Test", bool setOutput = false, string contextName = null) { - // Setup the step. + // Set up the step. var step = new Mock(); step.Setup(x => x.Condition).Returns(condition); step.Setup(x => x.ContinueOnError).Returns(new BooleanToken(null, null, null, continueOnError)); @@ -598,7 +598,7 @@ private Mock CreateStep(TestHostContext hc, TaskResult result, st ContextName = contextName ?? "Test" }); - // Setup the step execution context. + // Set up the step execution context. var stepContext = new Mock(); stepContext.SetupAllProperties(); stepContext.Setup(x => x.Global).Returns(() => _ec.Object.Global); diff --git a/src/Test/L0/Worker/TrackingManagerL0.cs b/src/Test/L0/Worker/TrackingManagerL0.cs index a016943371c..8c81d7b49ad 100644 --- a/src/Test/L0/Worker/TrackingManagerL0.cs +++ b/src/Test/L0/Worker/TrackingManagerL0.cs @@ -15,18 +15,18 @@ public sealed class TrackingManagerL0 public TestHostContext Setup([CallerMemberName] string name = "") { - // Setup the host context. + // Set up the host context. TestHostContext hc = new(this, name); // Create a random work path. _workFolder = hc.GetDirectory(WellKnownDirectory.Work); - // Setup the execution context. + // Set up the execution context. _ec = new Mock(); GitHubContext githubContext = new(); _ec.Setup(x => x.GetGitHubContext("repository")).Returns("actions/runner"); - // Setup the tracking manager. + // Se up the tracking manager. _trackingManager = new TrackingManager(); _trackingManager.Initialize(hc); diff --git a/src/dev.sh b/src/dev.sh index 798cec0f26a..d1131b47655 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -243,7 +243,7 @@ if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then msbuild_location="$vs_location""\MSBuild\Current\Bin\msbuild.exe" if [[ ! -e "${msbuild_location}" ]]; then - failed "Can not find msbuild location, failing build" + failed "Cannot find msbuild location, failing build" fi fi