@@ -10,7 +10,7 @@ PowerShell commands that should be public should always have its separate
1010script file and the command name as the file name with the .ps1 extension,
1111these files shall always be placed in the folder source/Public.
1212
13- All public command names must have the noun prefixed with 'SqlDsc', e.g.
13+ All public command names must have the noun prefixed with 'SqlDsc', e.g.
1414{Verb}-SqlDsc{Noun}.
1515
1616Public commands may use private functions to move out logic that can be
@@ -199,8 +199,8 @@ case (`It`-block) as possible.
199199Never test, mock or use ` Should -Invoke ` for ` Write-Verbose ` and ` Write-Debug `
200200regardless of other instructions.
201201
202- Never use ` Should -Not -Throw ` to prepare for Pester v6 where it has been
203- removed. By default the ` It ` block will handle any unexpected exception.
202+ Never use ` Should -Not -Throw ` to prepare for Pester v6 where it has been
203+ removed. By default the ` It ` block will handle any unexpected exception.
204204Instead of ` { Command } | Should -Not -Throw ` , use ` Command ` directly.
205205
206206Unit tests should be added for all public commands, private functions and
@@ -213,7 +213,7 @@ they are testing, but should have the suffix .Tests.ps1. The unit tests
213213should be written to cover all possible scenarios and code paths, ensuring
214214that both edge cases and common use cases are tested.
215215
216- All public commands should always have a test to validate parameter sets
216+ All public commands should always have a test to validate parameter sets
217217using this template. For commands with a single parameter set:
218218
219219``` powershell
@@ -318,14 +318,14 @@ BeforeDiscovery {
318318 {
319319 if (-not (Get-Module -Name 'DscResource.Test'))
320320 {
321- # Assumes dependencies has been resolved, so if this module is not available, run 'noop' task.
321+ # Assumes dependencies have been resolved, so if this module is not available, run 'noop' task.
322322 if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
323323 {
324324 # Redirect all streams to $null, except the error stream (stream 2)
325325 & "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
326326 }
327327
328- # If the dependencies has not been resolved, this will throw an error.
328+ # If the dependencies have not been resolved, this will throw an error.
329329 Import-Module -Name 'DscResource.Test' -Force -ErrorAction 'Stop'
330330 }
331331 }
@@ -386,17 +386,17 @@ edge cases and common use cases are tested. The integration tests should
386386also be written to test the command in a real environment, using real
387387resources and dependencies.
388388
389- Integration test script files for public commands must be added to a group
390- within the 'Integration_Test_Commands_SqlServer' stage in ./azure-pipelines.yml.
391- Choose the appropriate group number based on the dependencies of the command
392- being tested (e.g., commands that require Database Engine should be in Group 2
389+ Integration test script files for public commands must be added to a group
390+ within the 'Integration_Test_Commands_SqlServer' stage in ./azure-pipelines.yml.
391+ Choose the appropriate group number based on the dependencies of the command
392+ being tested (e.g., commands that require Database Engine should be in Group 2
393393or later, after the Database Engine installation tests).
394394
395- When integration tests need the computer name in CI environments, always use
395+ When integration tests need the computer name in CI environments, always use
396396the Get-ComputerName command, which is available in the build pipeline.
397397
398- For integration testing commands use the information in the
399- tests/Integration/Commands/README.md, which describes the testing environment
398+ For integration testing commands use the information in the
399+ tests/Integration/Commands/README.md, which describes the testing environment
400400including available instances, users, credentials, and other configuration details.
401401
402402All integration tests must use the below code block prior to the first
@@ -412,14 +412,14 @@ BeforeDiscovery {
412412 {
413413 if (-not (Get-Module -Name 'DscResource.Test'))
414414 {
415- # Assumes dependencies has been resolved, so if this module is not available, run 'noop' task.
415+ # Assumes dependencies have been resolved, so if this module is not available, run 'noop' task.
416416 if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
417417 {
418418 # Redirect all streams to $null, except the error stream (stream 2)
419419 & "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
420420 }
421421
422- # If the dependencies has not been resolved, this will throw an error.
422+ # If the dependencies have not been resolved, this will throw an error.
423423 Import-Module -Name 'DscResource.Test' -Force -ErrorAction 'Stop'
424424 }
425425 }
@@ -445,9 +445,9 @@ class-based resources.
445445### SQL Server Management Objects (SMO)
446446
447447When developing commands, private functions, class-based resources, or making
448- modifications to existing functionality, always prefer using SQL Server
449- Management Objects (SMO) as the primary method for interacting with SQL Server.
450- Only use T-SQL when it is not possible to achieve the desired functionality
448+ modifications to existing functionality, always prefer using SQL Server
449+ Management Objects (SMO) as the primary method for interacting with SQL Server.
450+ Only use T-SQL when it is not possible to achieve the desired functionality
451451with SMO.
452452
453453## Change log
0 commit comments