Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Addresses minor spelling mistakes #632

Merged
merged 10 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/reference/schemas/config/functions/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ parameters:
list: { type: array }

resources:
- name: Acess the properties of an object
- name: Access the properties of an object
type: Test/Echo
properties:
output:
Expand Down Expand Up @@ -394,7 +394,7 @@ results:
- metadata:
Microsoft.DSC:
duration: PT0.0760186S
name: Acess the properties of an object
name: Access the properties of an object
type: Test/Echo
result:
actualState:
Expand All @@ -417,7 +417,7 @@ parameters:
list: { type: array }

resources:
- name: Acess items in an array
- name: Access items in an array
type: Test/Echo
properties:
output:
Expand All @@ -441,7 +441,7 @@ results:
- metadata:
Microsoft.DSC:
duration: PT0.0750682S
name: Acess items in an array
name: Access items in an array
type: Test/Echo
result:
actualState:
Expand Down Expand Up @@ -476,7 +476,7 @@ parameters:
list: { type: array }

resources:
- name: Acess items in a nested array
- name: Access items in a nested array
type: Test/Echo
properties:
output:
Expand All @@ -496,7 +496,7 @@ results:
- metadata:
Microsoft.DSC:
duration: PT0.1349442S
name: Acess items in a nested array
name: Access items in a nested array
type: Test/Echo
result:
actualState:
Expand Down
6 changes: 3 additions & 3 deletions dsc/locales/en-us.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ failedToOpenFile = "Failed to open included file"
invalidFileContent = "Invalid UTF-8 sequence in included file"
invalidFile = "Failed to read the configuration file as YAML or JSON"
resolvingParameters = "Resolving parameters from file"
failedParseParametersFile = "Failed to parse parameters file or conetnt to JSON"
failedParseParametersFile = "Failed to parse parameters file or content to JSON"
couldNotReadParametersFile = "Could not read parameters file"
invalidPath = "Include path must not contain '..'"
failedGetCurrentDirectory = "Failed to get current directory"
Expand All @@ -79,7 +79,7 @@ currentDirectory = "current directory"
noParameters = "No parameters specified"
parameters = "Parameters specified"
failedConvertJson = "Failed to convert YAML to JSON"
invalidParamters = "Parameters are not valid JSON or YAML"
invalidParameters = "Parameters are not valid JSON or YAML"
invalidPath = "Target path does not exist"
failedSetParameters = "Parameter input failure"
invalidInclude = "Failed to deserialize Include input"
Expand Down Expand Up @@ -109,7 +109,7 @@ invalidManifest = "Error in manifest for"
failedToConvertJsonToString = "Failed to convert JSON to string"
failedToReadTracingSetting = "Could not read 'tracing' setting"
invalidTraceLevel = "Default to 'warn', invalid DSC_TRACE_LEVEL value"
failedToSetTracing = "Unable to set global default tracing subscriber. Tracing is diabled."
failedToSetTracing = "Unable to set global default tracing subscriber. Tracing is disabled."
validatingSchema = "Validating against schema"
failedToCompileSchema = "JSON Schema Compilation"
validationFailed = "Failed validation"
Expand Down
2 changes: 1 addition & 1 deletion dsc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ fn check_debug() {
}
}

// Check if the dsc binary parent process is WinStore.App or Exploerer.exe
// Check if the dsc binary parent process is WinStore.App or Explorer.exe
#[cfg(windows)]
fn check_store() {
use std::io::Read;
Expand Down
2 changes: 1 addition & 1 deletion dsc/src/subcommand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ pub fn config(subcommand: &ConfigSubCommand, parameters: &Option<String>, mounte
}
},
Err(err) => {
error!("{}: {err}", t!("subcommand.invalidParamters"));
error!("{}: {err}", t!("subcommand.invalidParameters"));
exit(EXIT_INVALID_INPUT);
}
}
Expand Down
4 changes: 2 additions & 2 deletions dsc/tests/dsc_resource_test.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Describe 'Invoke a resource test directly' {
$out.inDesiredState | Should -Be $true
}

It 'test returns proper error code if no input is provded' {
It 'test returns proper error code if no input is provided' {
$out = dsc resource test -r Microsoft/OSInfo 2>&1
$LASTEXITCODE | Should -Be 1
$out | Should -BeLike '*ERROR*'
}
}
}
40 changes: 20 additions & 20 deletions dsc/tests/dsc_variables.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# Licensed under the MIT License.

Describe 'Configruation variables tests' {
It 'Variables example config works' {
$configFile = "$PSSCriptRoot/../examples/variables.dsc.yaml"
$out = dsc config get -f $configFile | ConvertFrom-Json
$LASTEXITCODE | Should -Be 0
$out.results[0].result.actualState.output | Should -BeExactly 'myOutput is: Hello world!, myObject is: baz'
}
It 'Variables example config works' {
$configFile = "$PSSCriptRoot/../examples/variables.dsc.yaml"
$out = dsc config get -f $configFile | ConvertFrom-Json
$LASTEXITCODE | Should -Be 0
$out.results[0].result.actualState.output | Should -BeExactly 'myOutput is: Hello world!, myObject is: baz'
}

It 'Duplicated variable takes last value' {
$configYaml = @'
It 'Duplicated variable takes last value' {
$configYaml = @'
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
variables:
myVariable: foo
Expand All @@ -21,14 +21,14 @@ resources:
properties:
output: "[variables('myVariable')]"
'@
$out = dsc config get -i $configYaml | ConvertFrom-Json
Write-Verbose -Verbose $out
$LASTEXITCODE | Should -Be 0
$out.results[0].result.actualState.output | Should -Be 'bar'
}
$out = dsc config get -i $configYaml | ConvertFrom-Json
Write-Verbose -Verbose $out
$LASTEXITCODE | Should -Be 0
$out.results[0].result.actualState.output | Should -Be 'bar'
}

It 'Missing variable returns error' {
$configYaml = @'
It 'Missing variable returns error' {
$configYaml = @'
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
variables:
hello: world
Expand All @@ -38,9 +38,9 @@ resources:
properties:
output: "[variables('myVariable')]"
'@
$out = dsc config get -i $configYaml 2>&1 | Out-String
Write-Verbose -Verbose $out
$LASTEXITCODE | Should -Be 2
$out | Should -BeLike "*Variable 'myVariable' does not exist or has not been initialized yet*"
}
$out = dsc config get -i $configYaml 2>&1 | Out-String
Write-Verbose -Verbose $out
$LASTEXITCODE | Should -Be 2
$out | Should -BeLike "*Variable 'myVariable' does not exist or has not been initialized yet*"
}
}
2 changes: 1 addition & 1 deletion dsc_lib/src/dscresources/dscresource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub struct DscResource {

#[derive(Clone, Debug, PartialEq, Deserialize, Serialize, JsonSchema)]
pub enum Capability {
/// The resource supports retriving configuration.
/// The resource supports retrieving configuration.
Get,
/// The resource supports applying configuration.
Set,
Expand Down
2 changes: 1 addition & 1 deletion registry/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub fn enable_tracing() {
let subscriber = tracing_subscriber::Registry::default().with(fmt).with(filter);

if tracing::subscriber::set_global_default(subscriber).is_err() {
eprintln!("Unable to set global default tracing subscriber. Tracing is diabled.");
eprintln!("Unable to set global default tracing subscriber. Tracing is disabled.");
}
}

Expand Down
2 changes: 1 addition & 1 deletion runcommandonset/locales/en-us.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ failedReadStderr = "Failed to read stderr for"
failedReadStdout = "Failed to read stdout for"
failedWait = "Failed to wait for"
invalidInput = "Input is not valid"
unableToTrace = "Unable to set global default tracing subscriber. Tracing is diabled."
unableToTrace = "Unable to set global default tracing subscriber. Tracing is disabled."