Skip to content

Performance optimizations#172

Merged
johlju merged 16 commits intodsccommunity:mainfrom
dan-hughes:performance-optimizations
Aug 27, 2025
Merged

Performance optimizations#172
johlju merged 16 commits intodsccommunity:mainfrom
dan-hughes:performance-optimizations

Conversation

@dan-hughes
Copy link
Copy Markdown
Contributor

@dan-hughes dan-hughes commented Aug 27, 2025

Pull Request (PR) description

Remove some of the slow code in functions used by DscResource.Base.

This Pull Request (PR) fixes the following issues

Task list

  • Added an entry to the change log under the Unreleased section of the
    file CHANGELOG.md. Entry should say what was changed and how that
    affects users (if applicable), and reference the issue being resolved
    (if applicable).
  • Documentation added/updated in README.md.
  • Comment-based help added/updated for all new/changed functions.
  • Localization strings added/updated in all localization files as appropriate.
  • Examples appropriately added/updated.
  • Unit tests added/updated. See DSC Community Testing Guidelines.
  • Integration tests added/updated (where possible). See
    DSC Community Testing Guidelines.
  • New/changed code adheres to DSC Community Style Guidelines.

This change is Reviewable

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 27, 2025

Warning

Rate limit exceeded

@johlju has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 21 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 7b2fa3b and 5f7f5c3.

📒 Files selected for processing (2)
  • CHANGELOG.md (2 hunks)
  • source/Private/Test-DscPropertyState.ps1 (6 hunks)

Walkthrough

Refactors across multiple PowerShell helper functions: several fixed-size array collectors replaced with System.Collections.ArrayList, SuppressMessage attributes added to multiple public functions, Compare-DscParameterState gained stricter validation and unified CIM handling, Remove-CommonParameter replaced pipeline logic with explicit loops, and Clear-ZeroedEnumPropertyValue adopted a begin/process/end lifecycle.

Changes

Cohort / File(s) Change Summary
SuppressMessage attribute on public functions
source/Public/Assert-BoundParameter.ps1, source/Public/Compare-ResourcePropertyState.ps1, source/Public/ConvertFrom-DscResourceInstance.ps1, source/Public/Get-DscProperty.ps1, source/Public/Test-DscProperty.ps1
Added [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('UseSyntacticallyCorrectExamples', ...)] before [CmdletBinding()] to silence a ScriptAnalyzer rule; no runtime or signature changes.
ArrayList accumulators (switch from @() to ArrayList)
source/Public/Compare-DscParameterState.ps1, source/Public/Compare-ResourcePropertyState.ps1, source/Public/Find-Certificate.ps1, source/Public/Get-DscProperty.ps1, source/Private/Test-DscPropertyState.ps1
Replaced fixed arrays (@()) with [System.Collections.ArrayList]::new() for dynamic appends; append semantics preserved.
Compare-DscParameterState: validation, CIM unification, and internals
source/Public/Compare-DscParameterState.ps1
Added stricter input type checks (expanded accepted types incl. OrderedDictionary), unified CimInstance → hashtable conversion for both inputs, changed key selection/exclusion to explicit logic, replaced pipeline removals with foreach/Remove, refined output suppression and final PSCustomObject casting, plus comment/typo fixes.
Begin/Process/End lifecycle added
source/Private/Clear-ZeroedEnumPropertyValue.ps1
Introduced begin block initializing result hashtable, retained process loop over keys, and end block returning accumulated result.
Remove-CommonParameter: pipeline → explicit loop
source/Public/Remove-CommonParameter.ps1
Replaced Where-Object/ForEach-Object pipeline with explicit foreach over Hashtable.Keys and Remove() calls; combined common parameter sets into a HashSet with OrdinalIgnoreCase.
Minor logic tidy / docs
source/Public/Get-DscProperty.ps1, source/Public/Get-UserName.ps1
Inlined Test-DscPropertyIsAssigned check in Get-DscProperty; corrected help text typo ("cross-plattform" → "cross-platform") in Get-UserName.
Changelog
CHANGELOG.md
Updated Unreleased section to record the refactors (ArrayList changes, added SuppressMessage attributes, Clear-ZeroedEnumPropertyValue lifecycle, and pipeline-to-foreach changes); confirms no public signatures changed.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Caller
  participant Compare as Compare-DscParameterState
  participant Validator as TypeValidator
  participant Converter as ConvertTo-Hashtable
  participant Tester as Test-DscParameterState

  Caller->>Compare: Invoke(CurrentValues, DesiredValues, Properties, ...)
  activate Compare

  Compare->>Validator: Validate CurrentValues type
  Validator-->>Compare: ok / throw
  Compare->>Validator: Validate DesiredValues type
  Validator-->>Compare: ok / throw

  alt CurrentValues is CimInstance
    Compare->>Converter: ConvertTo-Hashtable(CurrentValues)
    Converter-->>Compare: Hashtable
  end

  alt DesiredValues is CimInstance
    Compare->>Converter: ConvertTo-Hashtable(DesiredValues)
    Converter-->>Compare: Hashtable
  end

  Compare->>Compare: Build key list (remove common params, apply includes/excludes)
  loop For each key
    Compare->>Tester: Test-DscParameterState @params
    Tester-->>Compare: per-key result
    Compare->>Compare: Append to ArrayList
  end

  Compare-->>Caller: Return ArrayList entries as PSCustomObject[]
  deactivate Compare
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (8)
source/Private/Clear-ZeroedEnumPropertyValue.ps1 (2)

30-54: Pipeline behavior regression: function now aggregates multiple pipeline inputs into a single output.

With begin/process/end, $result is initialized in begin and returned once in end, merging all pipeline InputObject items. Previous behavior (per typical ValueFromPipeline = $true pattern) likely returned one hashtable per input. Emit per input from process and avoid aggregating across pipeline.

Apply this diff to restore one-output-per-input while keeping the structure:

-begin
-{
-    $result = @{}
-}
+begin
+{
+}
 
-process
-{
+process
+{
+    $result = @{}
@@
-}
+    return $result
+}
 
-end
-{
-    return $result
-}
+end
+{
+}

2-9: Fix help text typo (“hashable” → “hashtable”).

Spelling in SYNOPSIS/DESCRIPTION should match the parameter type.

-Removes any properties from a hashable which have values that are
+Removes any properties from a hashtable which have values that are
@@
-Removes any properties from a hashable which have values that are
+Removes any properties from a hashtable which have values that are
source/Private/Test-DscPropertyState.ps1 (1)

61-138: ArrayList used with += defeats the perf goal; use .Add() instead.

$arr += x creates a new Object[] each time, negating the ArrayList optimization. Use .Add() and discard the return value.

-        $propertyState = [System.Collections.ArrayList]::new()
+        $propertyState = [System.Collections.ArrayList]::new()
@@
-            # Recursively call Test-DscPropertyState with the CimInstance to evaluate.
-            $propertyState += Test-DscPropertyState -Values @{
-                CurrentValue = $currentCimInstance
-                DesiredValue = $desiredCimInstance
-            }
+            # Recursively call Test-DscPropertyState with the CimInstance to evaluate.
+            [void] $propertyState.Add(
+                (Test-DscPropertyState -Values @{
+                    CurrentValue = $currentCimInstance
+                    DesiredValue = $desiredCimInstance
+                })
+            )
@@
-        $propertyState = [System.Collections.ArrayList]::new()
+        $propertyState = [System.Collections.ArrayList]::new()
@@
-                $propertyState += Test-DscPropertyState -Values @{
-                    CurrentValue = $Values.CurrentValue.($desiredCimInstanceProperty.Name)
-                    DesiredValue = $desiredCimInstanceProperty.Value
-                }
+                [void] $propertyState.Add(
+                    (Test-DscPropertyState -Values @{
+                        CurrentValue = $Values.CurrentValue.($desiredCimInstanceProperty.Name)
+                        DesiredValue = $desiredCimInstanceProperty.Value
+                    })
+                )
@@
-                $propertyState += $false
+                [void] $propertyState.Add($false)

Also applies to: 141-175

source/Public/Find-Certificate.ps1 (1)

134-174: Use ArrayList.Add/AddRange instead of += to realize the perf win.

Using += on ArrayList coerces to a new array and defeats the intended optimization. Switch to .Add for single items.

Apply:

-    $certFilters = [System.Collections.ArrayList]::new()
+    $certFilters = [System.Collections.ArrayList]::new()
@@
-        $certFilters += @('($_.Thumbprint -eq $Thumbprint)')
+        [void] $certFilters.Add('($_.Thumbprint -eq $Thumbprint)')
@@
-        $certFilters += @('($_.FriendlyName -eq $FriendlyName)')
+        [void] $certFilters.Add('($_.FriendlyName -eq $FriendlyName)')
@@
-        $certFilters += @('($_.Subject -eq $Subject)')
+        [void] $certFilters.Add('($_.Subject -eq $Subject)')
@@
-        $certFilters += @('($_.Issuer -eq $Issuer)')
+        [void] $certFilters.Add('($_.Issuer -eq $Issuer)')
@@
-        $certFilters += @('(((Get-Date) -le $_.NotAfter) -and ((Get-Date) -ge $_.NotBefore))')
+        [void] $certFilters.Add('(((Get-Date) -le $_.NotAfter) -and ((Get-Date) -ge $_.NotBefore))')
@@
-        $certFilters += @('(@(Compare-Object -ReferenceObject $_.DNSNameList.Unicode -DifferenceObject $DNSName | Where-Object -Property SideIndicator -eq "=>").Count -eq 0)')
+        [void] $certFilters.Add('(@(Compare-Object -ReferenceObject $_.DNSNameList.Unicode -DifferenceObject $DNSName | Where-Object -Property SideIndicator -eq "=>").Count -eq 0)')
@@
-        $certFilters += @('(@(Compare-Object -ReferenceObject ($_.Extensions.KeyUsages -split ", ") -DifferenceObject $KeyUsage | Where-Object -Property SideIndicator -eq "=>").Count -eq 0)')
+        [void] $certFilters.Add('(@(Compare-Object -ReferenceObject ($_.Extensions.KeyUsages -split ", ") -DifferenceObject $KeyUsage | Where-Object -Property SideIndicator -eq "=>").Count -eq 0)')
@@
-        $certFilters += @('(@(Compare-Object -ReferenceObject ($_.EnhancedKeyUsageList.FriendlyName) -DifferenceObject $EnhancedKeyUsage | Where-Object -Property SideIndicator -eq "=>").Count -eq 0)')
+        [void] $certFilters.Add('(@(Compare-Object -ReferenceObject ($_.EnhancedKeyUsageList.FriendlyName) -DifferenceObject $EnhancedKeyUsage | Where-Object -Property SideIndicator -eq "=>").Count -eq 0)')
source/Public/Compare-ResourcePropertyState.ps1 (1)

206-241: Replace ArrayList += with .Add to avoid copies.

Using += on an ArrayList creates intermediate arrays; use .Add for O(1) append.

Apply:

-    $compareTargetResourceStateReturnValue = [System.Collections.ArrayList]::new()
+    $compareTargetResourceStateReturnValue = [System.Collections.ArrayList]::new()
@@
-        $compareTargetResourceStateReturnValue += $parameterState
+        [void] $compareTargetResourceStateReturnValue.Add($parameterState)
source/Public/Get-DscProperty.ps1 (1)

140-167: Use ArrayList.AddRange instead of += for accumulated filters.

Avoids array reallocations and preserves the ArrayList type.

Apply:

-                $propertiesOfAttribute = [System.Collections.ArrayList]::new()
-
-                $propertiesOfAttribute += $property | Where-Object -FilterScript {
+                $propertiesOfAttribute = [System.Collections.ArrayList]::new()
+                [void] $propertiesOfAttribute.AddRange(
+                    ($property | Where-Object -FilterScript {
                     $InputObject.GetType().GetMember($_).CustomAttributes.Where(
                         {
                             <#
                                 To simplify the code, ignoring that this will compare
                                 MemberNAme against type 'Optional' which does not exist.
                             #>
                             $_.NamedArguments.MemberName -in $Attribute
                         }
                     ).NamedArguments.TypedValue.Value -eq $true
-                }
+                    })
+                )
@@
-                    $propertiesOfAttribute += $property | Where-Object -FilterScript {
+                    [void] $propertiesOfAttribute.AddRange(
+                        ($property | Where-Object -FilterScript {
                         $InputObject.GetType().GetMember($_).CustomAttributes.Where(
                             {
                                 $_.NamedArguments.MemberName -notin @('Key', 'Mandatory', 'NotConfigurable')
                             }
                         )
-                    }
+                        })
+                    )
source/Public/Compare-DscParameterState.ps1 (2)

187-201: Fix ArrayList usage and filtering to actually realize the perf gain.

$returnValue is an ArrayList, but using += converts it into a fixed object[], defeating the purpose and potentially hurting perf. Also, calling .Where() on an ArrayList isn’t reliably supported on Windows PowerShell 5.1. Use .Add() and filter via Where-Object (or cast to [array] first) to keep compatibility and performance.

Apply:

@@
-    $returnValue = [System.Collections.ArrayList]::new()
+    $returnValue = [System.Collections.ArrayList]::new()
@@
-        $returnValue += $InDesiredStateTable
+        $null = $returnValue.Add($InDesiredStateTable)
@@
-    if (-not $IncludeInDesiredState)
-    {
-        [array]$returnValue = $returnValue.Where({ $_.InDesiredState -eq $false })
-    }
+    if (-not $IncludeInDesiredState)
+    {
+        [array]$returnValue = @($returnValue | Where-Object { $_.InDesiredState -eq $false })
+    }

Also applies to: 256-263, 626-631


258-271: Keep output contract: ExpectedType/ActualType must be strings (per .OUTPUTS doc).

Currently you emit a Type object or a hashtable with Name='Unknown'. The docs specify strings. This can break consumers.

@@
-            $InDesiredStateTable['ExpectedValue'] = $desiredValue
-            $InDesiredStateTable['ActualValue']   = $currentValue
+            $InDesiredStateTable['ExpectedValue'] = $desiredValue
+            $InDesiredStateTable['ActualValue']   = $currentValue
@@
-        $InDesiredStateTable['ExpectedType'] = $desiredType
+        $InDesiredStateTable['ExpectedType'] = if ($desiredType -is [Type]) { $desiredType.FullName } else { $desiredType.Name }
@@
-        $InDesiredStateTable['ActualType'] = $currentType
+        $InDesiredStateTable['ActualType'] = if ($currentType -is [Type]) { $currentType.FullName } else { $currentType.Name }

I can add/update unit tests to assert these fields are strings across scalar, array, hashtable, PSCredential, and ScriptBlock scenarios.

Also applies to: 298-299, 311-312

🧹 Nitpick comments (4)
source/Public/Compare-DscParameterState.ps1 (4)

247-251: Avoid .Where() on key collections for PS 5.1 compat.

$desiredValuesClean.Keys may not support accelerated .Where() on PS 5.1. Prefer Where-Object (or cast to [array] first).

-        $keyList = $keyList.Where({ $_ -notin $ExcludeProperties })
+        $keyList = @($keyList | Where-Object { $_ -notin $ExcludeProperties })

Would you like me to run a quick cross-version check matrix (PS 5.1 vs 7.x) script?


204-210: Prefer type checks over string name comparisons for robustness.

String-based type checks are brittle. Use -is against concrete types.

-    $types = @(
-        'System.Management.Automation.PSBoundParametersDictionary'
-        'System.Collections.Hashtable'
-        'Microsoft.Management.Infrastructure.CimInstance'
-        'System.Collections.Specialized.OrderedDictionary'
-    )
-
-    if ($DesiredValues.GetType().FullName -notin $types)
+    if (-not (
+        $DesiredValues -is [System.Collections.Hashtable] -or
+        $DesiredValues -is [System.Collections.Specialized.OrderedDictionary] -or
+        $DesiredValues -is [System.Management.Automation.PSBoundParametersDictionary] -or
+        $DesiredValues -is [Microsoft.Management.Infrastructure.CimInstance]
+    ))
     {
@@
-    if ($CurrentValues.GetType().FullName -notin $types)
+    if (-not (
+        $CurrentValues -is [System.Collections.Hashtable] -or
+        $CurrentValues -is [System.Collections.Specialized.OrderedDictionary] -or
+        $CurrentValues -is [System.Management.Automation.PSBoundParametersDictionary] -or
+        $CurrentValues -is [Microsoft.Management.Infrastructure.CimInstance]
+    ))
     {

Also applies to: 211-224


315-342: Credential comparison path looks correct; consider minimizing PII in logs.

Verbose messages include usernames. Consider masking or only logging presence of match to reduce PII exposure.


567-591: Name the conversion flag clearly.

Minor clarity: rename $wasCurrentValue to $wasCurrentValueConverted to mirror the array branch and intent.

-            $wasCurrentValue = $false
+            $wasCurrentValueConverted = $false
@@
-                $wasCurrentValue = $true
+                $wasCurrentValueConverted = $true
@@
-            if ($desiredValue -is [scriptblock])
+            if ($desiredValue -is [scriptblock])
             {
-                $desiredValue = if ($currentValue -is [string] -and -not $wasCurrentValue)
+                $desiredValue = if ($currentValue -is [string] -and -not $wasCurrentValueConverted)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2e1a484 and 1a54d28.

📒 Files selected for processing (11)
  • source/Private/Clear-ZeroedEnumPropertyValue.ps1 (2 hunks)
  • source/Private/Test-DscPropertyState.ps1 (2 hunks)
  • source/Public/Assert-BoundParameter.ps1 (1 hunks)
  • source/Public/Compare-DscParameterState.ps1 (17 hunks)
  • source/Public/Compare-ResourcePropertyState.ps1 (2 hunks)
  • source/Public/ConvertFrom-DscResourceInstance.ps1 (1 hunks)
  • source/Public/Find-Certificate.ps1 (1 hunks)
  • source/Public/Get-DscProperty.ps1 (3 hunks)
  • source/Public/Get-UserName.ps1 (1 hunks)
  • source/Public/Remove-CommonParameter.ps1 (1 hunks)
  • source/Public/Test-DscProperty.ps1 (2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**

⚙️ CodeRabbit configuration file

**: # DSC Community Guidelines

Terminology

  • Command: Public command
  • Function: Private function
  • Resource: DSC class-based resource

Build & Test Workflow

  • Run project scripts in PowerShell from repository root
  • Build after source changes: .\build.ps1 -Tasks build
  • Test workflow: Build → Invoke-Pester -Path @('<test paths>') -Output Detailed
  • New session required after class changes

File Organization

  • Public commands: source/Public/{CommandName}.ps1
  • Private functions: source/Private/{FunctionName}.ps1
  • Unit tests: tests/Unit/{Classes|Public|Private}/{Name}.Tests.ps1
  • Integration tests: tests/Integration/Commands/{CommandName}.Integration.Tests.ps1

Requirements

  • Follow guidelines over existing code patterns
  • Always update CHANGELOG.md Unreleased section
  • Localize all strings using string keys; remove any orphaned string keys
  • Check DscResource.Common before creating private functions
  • Separate reusable logic into private functions
  • Add unit tests for all commands/functions/resources
  • Add integration tests for all public commands and resources

Files:

  • source/Public/Compare-ResourcePropertyState.ps1
  • source/Public/ConvertFrom-DscResourceInstance.ps1
  • source/Public/Get-DscProperty.ps1
  • source/Private/Test-DscPropertyState.ps1
  • source/Public/Get-UserName.ps1
  • source/Public/Remove-CommonParameter.ps1
  • source/Public/Find-Certificate.ps1
  • source/Public/Test-DscProperty.ps1
  • source/Private/Clear-ZeroedEnumPropertyValue.ps1
  • source/Public/Compare-DscParameterState.ps1
  • source/Public/Assert-BoundParameter.ps1
**/*.ps?(m|d)1

⚙️ CodeRabbit configuration file

**/*.ps?(m|d)1: # PowerShell Guidelines

Naming

  • Use descriptive names (3+ characters, no abbreviations)
  • Functions: PascalCase with Verb-Noun format using approved verbs
  • Parameters: PascalCase
  • Variables: camelCase
  • Keywords: lower-case
  • Classes: PascalCase
  • Include scope for script/global/environment variables: $script:, $global:, $env:

File naming

  • Class files: ###.ClassName.ps1 format (e.g. 001.SqlReason.ps1, 004.StartupParameters.ps1)

Formatting

Indentation & Spacing

  • Use 4 spaces (no tabs)
  • One space around operators: $a = 1 + 2
  • One space between type and variable: [String] $name
  • One space between keyword and parenthesis: if ($condition)
  • No spaces on empty lines
  • Try to limit lines to 120 characters

Braces

  • Newline before opening brace (except variable assignments)
  • One newline after opening brace
  • Two newlines after closing brace (one if followed by another brace or continuation)

Quotes

  • Use single quotes unless variable expansion is needed: 'text' vs "text $variable"

Arrays

  • Single line: @('one', 'two', 'three')
  • Multi-line: each element on separate line with proper indentation
  • Do not use the unary comma operator (,) in return statements to force
    an array

Hashtables

  • Empty: @{}
  • Multi-line: each property on separate line with proper indentation
  • Properties: Use PascalCase

Comments

  • Single line: # Comment (capitalized, on own line)
  • Multi-line: <# Comment #> format (opening and closing brackets on own line), and indent text
  • No commented-out code

Comment-based help

  • Always add comment-based help to all functions and scripts
  • Comment-based help: SYNOPSIS, DESCRIPTION (40+ chars), PARAMETER, EXAMPLE sections before function/class
  • Comment-based help indentation: keywords 4 spaces, text 8 spaces
  • Include examples for all parameter sets and combinations
  • INPUTS: List each pipeline‑accepted type (one per line) with a 1‑line description.
  • ...

Files:

  • source/Public/Compare-ResourcePropertyState.ps1
  • source/Public/ConvertFrom-DscResourceInstance.ps1
  • source/Public/Get-DscProperty.ps1
  • source/Private/Test-DscPropertyState.ps1
  • source/Public/Get-UserName.ps1
  • source/Public/Remove-CommonParameter.ps1
  • source/Public/Find-Certificate.ps1
  • source/Public/Test-DscProperty.ps1
  • source/Private/Clear-ZeroedEnumPropertyValue.ps1
  • source/Public/Compare-DscParameterState.ps1
  • source/Public/Assert-BoundParameter.ps1
source/**/*.ps1

⚙️ CodeRabbit configuration file

source/**/*.ps1: # Localization Guidelines

Requirements

  • Localize all Write-Debug, Write-Verbose, Write-Error, Write-Warning and $PSCmdlet.ThrowTerminatingError() messages
  • Use localized string keys, not hardcoded strings
  • Assume $script:localizedData is available

String Files

  • Commands/functions: source/en-US/SqlServerDsc.strings.psd1
  • Class resources: source/en-US/{ResourceClassName}.strings.psd1

Key Naming Patterns

  • Format: Verb_FunctionName_Action (underscore separators), e.g. Get_SqlDscDatabase_ConnectingToDatabase

String Format

ConvertFrom-StringData @'
    KeyName = Message with {0} placeholder. (PREFIX0001)
'@

String IDs

  • Format: (PREFIX####)
  • PREFIX: First letter of each word in class or function name (SqlSetup → SS, Get-SqlDscDatabase → GSDD)
  • Number: Sequential from 0001

Usage

Write-Verbose -Message ($script:localizedData.KeyName -f $value1)

Files:

  • source/Public/Compare-ResourcePropertyState.ps1
  • source/Public/ConvertFrom-DscResourceInstance.ps1
  • source/Public/Get-DscProperty.ps1
  • source/Private/Test-DscPropertyState.ps1
  • source/Public/Get-UserName.ps1
  • source/Public/Remove-CommonParameter.ps1
  • source/Public/Find-Certificate.ps1
  • source/Public/Test-DscProperty.ps1
  • source/Private/Clear-ZeroedEnumPropertyValue.ps1
  • source/Public/Compare-DscParameterState.ps1
  • source/Public/Assert-BoundParameter.ps1
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: dsccommunity.DscResource.Common (Build Package Module)
🔇 Additional comments (12)
source/Public/Get-UserName.ps1 (1)

3-9: Typo fixes LGTM. No functional changes; docs now read correctly.

source/Public/Assert-BoundParameter.ps1 (1)

156-156: Suppression attribute addition LGTM.

Appropriate placement and clear justification; no API/behavioral change.

source/Public/ConvertFrom-DscResourceInstance.ps1 (1)

43-43: LGTM: appropriate suppression placement.

Attribute is correctly scoped before CmdletBinding(); no runtime impact.

source/Public/Test-DscProperty.ps1 (2)

11-11: Doc fix looks good.

Corrected wording improves clarity.


65-65: LGTM: appropriate suppression placement.

Consistent with other public functions; no behavior change.

source/Public/Compare-ResourcePropertyState.ps1 (1)

134-134: LGTM: suppression added without functional change.

source/Public/Get-DscProperty.ps1 (2)

76-76: LGTM: suppression adds no runtime impact.


177-181: LGTM: HasValue path simplification.

Direct call to Test-DscPropertyIsAssigned reduces temp vars and reads cleanly.

source/Public/Compare-DscParameterState.ps1 (4)

490-503: LGTM: Nested hashtable/ordered recursion and bound-param sanitization.

Recursing via Test-DscParameterState for complex array elements and stripping IncludeInDesiredState/IncludeValue/Properties/ReverseCheck is correct and prevents misbinding.

Also applies to: 510-512


529-541: LGTM: Hashtable recursion with empty-desired guard.

Good defensive check for empty desired vs non-empty current before recursing.

Also applies to: 546-557


636-647: LGTM: Conditional verbose messaging under IncludeInDesiredState.

Clean, localized, and uses ForEach accelerated method correctly.


657-657: LGTM: Canonical [PSCustomObject] casing.

Consistent with style and avoids type resolution edge cases.

Comment thread source/Public/Remove-CommonParameter.ps1 Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (7)
CHANGELOG.md (7)

17-18: Clarify wording and note potential impact

Tighten phrasing and format type/commands; also flag potential behavioral change for consumers relying on array semantics.

Please confirm whether the return/container change to ArrayList is non-breaking for downstream consumers; if not, consider labeling as a breaking change in the note.

-  - Use ArrayList and not fixed size array.
-  - Remove some ForEach-Object usage.
+  - Use `System.Collections.ArrayList` instead of fixed-size arrays (may impact callers relying on array semantics).
+  - Replace some use of `ForEach-Object` with explicit `foreach` loops to reduce pipeline overhead.

26-26: Wording/style: specify type and hyphenate

Consistent with style used elsewhere.

-  - Use ArrayList and not fixed size array.
+  - Use `System.Collections.ArrayList` instead of fixed-size arrays.

33-34: Wording/style: specify type and hyphenate

Mirror prior phrasing.

-  - Use ArrayList and not fixed size array.
+  - Use `System.Collections.ArrayList` instead of fixed-size arrays.

35-36: Expand acronym on first use

Spell out PSSA once in this section for clarity.

-  - Fix PSSA warning.
+  - Fix PowerShell Script Analyzer (PSSA) warning.

37-38: Align phrasing with prior bullet

Optional consistency with expanded acronym.

-  - Fix PSSA warning.
+  - Fix PowerShell Script Analyzer (PSSA) warning.

39-41: Wording/style and acronym expansion

Consistent terminology and readability.

-  - Use ArrayList and not fixed size array.
-  - Fix PSSA warning.
+  - Use `System.Collections.ArrayList` instead of fixed-size arrays.
+  - Fix PowerShell Script Analyzer (PSSA) warning.

42-43: Prefer active voice and specify replacement

Clarify what replaced pipeline usage and why.

-  - Remove use of `Where-Object` and `ForEach-Object`.
+  - Replace `Where-Object` and `ForEach-Object` with explicit `foreach` loops to reduce pipeline overhead.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1a54d28 and f0b029a.

📒 Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**

⚙️ CodeRabbit configuration file

**: # DSC Community Guidelines

Terminology

  • Command: Public command
  • Function: Private function
  • Resource: DSC class-based resource

Build & Test Workflow

  • Run project scripts in PowerShell from repository root
  • Build after source changes: .\build.ps1 -Tasks build
  • Test workflow: Build → Invoke-Pester -Path @('<test paths>') -Output Detailed
  • New session required after class changes

File Organization

  • Public commands: source/Public/{CommandName}.ps1
  • Private functions: source/Private/{FunctionName}.ps1
  • Unit tests: tests/Unit/{Classes|Public|Private}/{Name}.Tests.ps1
  • Integration tests: tests/Integration/Commands/{CommandName}.Integration.Tests.ps1

Requirements

  • Follow guidelines over existing code patterns
  • Always update CHANGELOG.md Unreleased section
  • Localize all strings using string keys; remove any orphaned string keys
  • Check DscResource.Common before creating private functions
  • Separate reusable logic into private functions
  • Add unit tests for all commands/functions/resources
  • Add integration tests for all public commands and resources

Files:

  • CHANGELOG.md
**/*.md

⚙️ CodeRabbit configuration file

**/*.md: # Markdown Style Guidelines

  • Wrap lines at word boundaries when over 80 characters (except tables/code blocks)
  • Use 2 spaces for indentation
  • Use '1.' for all items in ordered lists (1/1/1 numbering style)
  • Disable MD013 rule by adding a comment for tables/code blocks exceeding 80 characters
  • Empty lines required before/after code blocks and headings (except before line 1)
  • Escape backslashes in file paths only (not in code blocks)
  • Code blocks must specify language identifiers

Text Formatting

  • Parameters: bold
  • Values/literals: inline code
  • Resource/module/product names: italic
  • Commands/files/paths: inline code

Files:

  • CHANGELOG.md
CHANGELOG.md

⚙️ CodeRabbit configuration file

CHANGELOG.md: # Changelog Guidelines

  • Always update the Unreleased section in CHANGELOG.md
  • Use Keep a Changelog format
  • Describe notable changes briefly, ≤2 items per change type
  • Reference issues using format #<issue_number>
  • No empty lines between list items in same section
  • Do not add item if there are already an existing item for the same change

Files:

  • CHANGELOG.md
🪛 LanguageTool
CHANGELOG.md

[grammar] ~17-~17: There might be a mistake here.
Context: ... Use ArrayList and not fixed size array. - Remove some ForEach-Object usage. - `Tes...

(QB_NEW_EN)


[style] ~25-~25: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Write-Debug. - Find-Certificate - Changed certificate filter diagnostic message f...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[grammar] ~39-~39: There might be a mistake here.
Context: ... Use ArrayList and not fixed size array. - Fix PSSA warning. - `Remove-CommonParame...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: dsccommunity.DscResource.Common (Build Package Module)

Comment thread CHANGELOG.md Outdated
@dan-hughes
Copy link
Copy Markdown
Contributor Author

Waiting for #171 to merge with GitVersion fix.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (2)
source/Public/Remove-CommonParameter.ps1 (1)

33-39: Good fix: case‑insensitive O(1) lookups with HashSet resolve prior nested array bug.

This addresses the earlier issue where -in never matched due to a nested array. The OrdinalIgnoreCase comparer is appropriate for parameter names.

CHANGELOG.md (1)

30-31: Resolved: “begin” block typo fixed.

Previous note about “before” → “begin” is addressed here.

🧹 Nitpick comments (4)
source/Public/Remove-CommonParameter.ps1 (1)

41-46: Cast keys to string to avoid type-coercion surprises and tiny perf hit.

Safer when non-string keys slip in; keeps the HashSet generic type contract explicit.

-        if ($commonParameters.Contains($key))
+        if ($commonParameters.Contains([string]$key))

Optionally cache the set at script scope to avoid reallocation on each call (only if this runs hot):

# At top of file (outside the function)
if (-not $script:CommonParameterNameSet)
{
    $script:CommonParameterNameSet = [System.Collections.Generic.HashSet[System.String]]::new(
        [System.String[]](
            [System.Management.Automation.PSCmdlet]::CommonParameters +
            [System.Management.Automation.PSCmdlet]::OptionalCommonParameters
        ),
        [System.StringComparer]::OrdinalIgnoreCase
    )
}

Then inside the function, reuse $script:CommonParameterNameSet.

CHANGELOG.md (3)

17-18: Polish wording: hyphenate and use parallel phrasing.

Improve readability and style.

-  - Use ArrayList and not fixed size array.
-  - Remove some ForEach-Object usage.
+  - Use `ArrayList` instead of fixed-size arrays.
+  - Removed some occurrences of `ForEach-Object`.

26-26: Consistency: same phrasing for similar bullets.

-  - Use ArrayList and not fixed size array.
+  - Use `ArrayList` instead of fixed-size arrays.

33-42: Tighten wording across related bullets for uniform style.

-  - Use ArrayList and not fixed size array.
+  - Use `ArrayList` instead of fixed-size arrays.
@@
-  - Fix PSSA warning.
+  - Fixed PSSA warning.
@@
-  - Use ArrayList and not fixed size array.
+  - Use `ArrayList` instead of fixed-size arrays.
@@
-  - Remove use of `Where-Object` and `ForEach-Object`.
+  - Replaced `Where-Object`/`ForEach-Object` with explicit loops for performance.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f0b029a and 09e58bf.

📒 Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • source/Private/Clear-ZeroedEnumPropertyValue.ps1 (2 hunks)
  • source/Public/Remove-CommonParameter.ps1 (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • source/Private/Clear-ZeroedEnumPropertyValue.ps1
🧰 Additional context used
📓 Path-based instructions (5)
**

⚙️ CodeRabbit configuration file

**: # DSC Community Guidelines

Terminology

  • Command: Public command
  • Function: Private function
  • Resource: DSC class-based resource

Build & Test Workflow

  • Run project scripts in PowerShell from repository root
  • Build after source changes: .\build.ps1 -Tasks build
  • Test workflow: Build → Invoke-Pester -Path @('<test paths>') -Output Detailed
  • New session required after class changes

File Organization

  • Public commands: source/Public/{CommandName}.ps1
  • Private functions: source/Private/{FunctionName}.ps1
  • Unit tests: tests/Unit/{Classes|Public|Private}/{Name}.Tests.ps1
  • Integration tests: tests/Integration/Commands/{CommandName}.Integration.Tests.ps1

Requirements

  • Follow guidelines over existing code patterns
  • Always update CHANGELOG.md Unreleased section
  • Localize all strings using string keys; remove any orphaned string keys
  • Check DscResource.Common before creating private functions
  • Separate reusable logic into private functions
  • Add unit tests for all commands/functions/resources
  • Add integration tests for all public commands and resources

Files:

  • source/Public/Remove-CommonParameter.ps1
  • CHANGELOG.md
**/*.ps?(m|d)1

⚙️ CodeRabbit configuration file

**/*.ps?(m|d)1: # PowerShell Guidelines

Naming

  • Use descriptive names (3+ characters, no abbreviations)
  • Functions: PascalCase with Verb-Noun format using approved verbs
  • Parameters: PascalCase
  • Variables: camelCase
  • Keywords: lower-case
  • Classes: PascalCase
  • Include scope for script/global/environment variables: $script:, $global:, $env:

File naming

  • Class files: ###.ClassName.ps1 format (e.g. 001.SqlReason.ps1, 004.StartupParameters.ps1)

Formatting

Indentation & Spacing

  • Use 4 spaces (no tabs)
  • One space around operators: $a = 1 + 2
  • One space between type and variable: [String] $name
  • One space between keyword and parenthesis: if ($condition)
  • No spaces on empty lines
  • Try to limit lines to 120 characters

Braces

  • Newline before opening brace (except variable assignments)
  • One newline after opening brace
  • Two newlines after closing brace (one if followed by another brace or continuation)

Quotes

  • Use single quotes unless variable expansion is needed: 'text' vs "text $variable"

Arrays

  • Single line: @('one', 'two', 'three')
  • Multi-line: each element on separate line with proper indentation
  • Do not use the unary comma operator (,) in return statements to force
    an array

Hashtables

  • Empty: @{}
  • Multi-line: each property on separate line with proper indentation
  • Properties: Use PascalCase

Comments

  • Single line: # Comment (capitalized, on own line)
  • Multi-line: <# Comment #> format (opening and closing brackets on own line), and indent text
  • No commented-out code

Comment-based help

  • Always add comment-based help to all functions and scripts
  • Comment-based help: SYNOPSIS, DESCRIPTION (40+ chars), PARAMETER, EXAMPLE sections before function/class
  • Comment-based help indentation: keywords 4 spaces, text 8 spaces
  • Include examples for all parameter sets and combinations
  • INPUTS: List each pipeline‑accepted type (one per line) with a 1‑line description.
  • ...

Files:

  • source/Public/Remove-CommonParameter.ps1
source/**/*.ps1

⚙️ CodeRabbit configuration file

source/**/*.ps1: # Localization Guidelines

Requirements

  • Localize all Write-Debug, Write-Verbose, Write-Error, Write-Warning and $PSCmdlet.ThrowTerminatingError() messages
  • Use localized string keys, not hardcoded strings
  • Assume $script:localizedData is available

String Files

  • Commands/functions: source/en-US/SqlServerDsc.strings.psd1
  • Class resources: source/en-US/{ResourceClassName}.strings.psd1

Key Naming Patterns

  • Format: Verb_FunctionName_Action (underscore separators), e.g. Get_SqlDscDatabase_ConnectingToDatabase

String Format

ConvertFrom-StringData @'
    KeyName = Message with {0} placeholder. (PREFIX0001)
'@

String IDs

  • Format: (PREFIX####)
  • PREFIX: First letter of each word in class or function name (SqlSetup → SS, Get-SqlDscDatabase → GSDD)
  • Number: Sequential from 0001

Usage

Write-Verbose -Message ($script:localizedData.KeyName -f $value1)

Files:

  • source/Public/Remove-CommonParameter.ps1
**/*.md

⚙️ CodeRabbit configuration file

**/*.md: # Markdown Style Guidelines

  • Wrap lines at word boundaries when over 80 characters (except tables/code blocks)
  • Use 2 spaces for indentation
  • Use '1.' for all items in ordered lists (1/1/1 numbering style)
  • Disable MD013 rule by adding a comment for tables/code blocks exceeding 80 characters
  • Empty lines required before/after code blocks and headings (except before line 1)
  • Escape backslashes in file paths only (not in code blocks)
  • Code blocks must specify language identifiers

Text Formatting

  • Parameters: bold
  • Values/literals: inline code
  • Resource/module/product names: italic
  • Commands/files/paths: inline code

Files:

  • CHANGELOG.md
CHANGELOG.md

⚙️ CodeRabbit configuration file

CHANGELOG.md: # Changelog Guidelines

  • Always update the Unreleased section in CHANGELOG.md
  • Use Keep a Changelog format
  • Describe notable changes briefly, ≤2 items per change type
  • Reference issues using format #<issue_number>
  • No empty lines between list items in same section
  • Do not add item if there are already an existing item for the same change

Files:

  • CHANGELOG.md
🪛 LanguageTool
CHANGELOG.md

[grammar] ~17-~17: There might be a mistake here.
Context: ... Use ArrayList and not fixed size array. - Remove some ForEach-Object usage. - `Tes...

(QB_NEW_EN)


[style] ~25-~25: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Write-Debug. - Find-Certificate - Changed certificate filter diagnostic message f...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[grammar] ~39-~39: There might be a mistake here.
Context: ... Use ArrayList and not fixed size array. - Fix PSSA warning. - `Remove-CommonParame...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: dsccommunity.DscResource.Common (Build Package Module)

@johlju
Copy link
Copy Markdown
Member

johlju commented Aug 27, 2025

Hmm, should not be the same issue 🤔 Have you tried adding dotnet-gitversion prior to this line to see what error the command outputs?

$gitVersionObject = dotnet-gitversion | ConvertFrom-Json

@johlju
Copy link
Copy Markdown
Member

johlju commented Aug 27, 2025

Ha, it did fix the issue. Cool!

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (7)
CHANGELOG.md (7)

17-17: Grammar + clarity: “ArrayList” phrasing

Prefer “instead of fixed-size arrays” and format the .NET type.

-  - Use ArrayList and not fixed size array.
+  - Use `[System.Collections.ArrayList]` instead of fixed-size arrays.

28-28: Grammar + clarity: “ArrayList” phrasing

Same improvement as above for consistency.

-  - Use ArrayList and not fixed size array.
+  - Use `[System.Collections.ArrayList]` instead of fixed-size arrays.

33-33: Wording: use “and” and code-format block names

Minor readability tweak.

-  - Add begin, end blocks.
+  - Add `begin` and `end` blocks.

35-35: Grammar + clarity: “ArrayList” phrasing

Align with earlier bullets.

-  - Use ArrayList and not fixed size array.
+  - Use `[System.Collections.ArrayList]` instead of fixed-size arrays.

37-40: Optional: include PSSA rule IDs for traceability

Consider noting the specific PSSA rule(s) suppressed/fixed to aid future audits (e.g., “UseSyntacticallyCorrectExamples”), if applicable.


41-42: Grammar + clarity: “ArrayList” phrasing

Same consistency/formatting tweak here.

-  - Use ArrayList and not fixed size array.
+  - Use `[System.Collections.ArrayList]` instead of fixed-size arrays.

43-43: Optional: include PSSA rule IDs for traceability

As above, consider citing the exact rule(s) addressed.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 09e58bf and 223bda4.

📒 Files selected for processing (1)
  • CHANGELOG.md (2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**

⚙️ CodeRabbit configuration file

**: # DSC Community Guidelines

Terminology

  • Command: Public command
  • Function: Private function
  • Resource: DSC class-based resource

Build & Test Workflow

  • Run project scripts in PowerShell from repository root
  • Build after source changes: .\build.ps1 -Tasks build
  • Test workflow: Build → Invoke-Pester -Path @('<test paths>') -Output Detailed
  • New session required after class changes

File Organization

  • Public commands: source/Public/{CommandName}.ps1
  • Private functions: source/Private/{FunctionName}.ps1
  • Unit tests: tests/Unit/{Classes|Public|Private}/{Name}.Tests.ps1
  • Integration tests: tests/Integration/Commands/{CommandName}.Integration.Tests.ps1

Requirements

  • Follow guidelines over existing code patterns
  • Always update CHANGELOG.md Unreleased section
  • Localize all strings using string keys; remove any orphaned string keys
  • Check DscResource.Common before creating private functions
  • Separate reusable logic into private functions
  • Add unit tests for all commands/functions/resources
  • Add integration tests for all public commands and resources

Files:

  • CHANGELOG.md
**/*.md

⚙️ CodeRabbit configuration file

**/*.md: # Markdown Style Guidelines

  • Wrap lines at word boundaries when over 80 characters (except tables/code blocks)
  • Use 2 spaces for indentation
  • Use '1.' for all items in ordered lists (1/1/1 numbering style)
  • Disable MD013 rule by adding a comment for tables/code blocks exceeding 80 characters
  • Empty lines required before/after code blocks and headings (except before line 1)
  • Escape backslashes in file paths only (not in code blocks)
  • Code blocks must specify language identifiers

Text Formatting

  • Parameters: bold
  • Values/literals: inline code
  • Resource/module/product names: italic
  • Commands/files/paths: inline code

Files:

  • CHANGELOG.md
CHANGELOG.md

⚙️ CodeRabbit configuration file

CHANGELOG.md: # Changelog Guidelines

  • Always update the Unreleased section in CHANGELOG.md
  • Use Keep a Changelog format
  • Describe notable changes briefly, ≤2 items per change type
  • Reference issues using format #<issue_number>
  • No empty lines between list items in same section
  • Do not add item if there are already an existing item for the same change

Files:

  • CHANGELOG.md
🪛 LanguageTool
CHANGELOG.md

[grammar] ~17-~17: There might be a mistake here.
Context: ... Use ArrayList and not fixed size array. - Remove some ForEach-Object usage. - `Tes...

(QB_NEW_EN)


[grammar] ~41-~41: There might be a mistake here.
Context: ... Use ArrayList and not fixed size array. - Fix PSSA warning. - `Remove-CommonParame...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: dsccommunity.DscResource.Common (Build Package Module)
🔇 Additional comments (1)
CHANGELOG.md (1)

44-45: Good: calls out pipeline operator removal for perf

This directly ties to the PR’s performance objective and is clearly worded.

@dan-hughes dan-hughes marked this pull request as ready for review August 27, 2025 17:25
@johlju
Copy link
Copy Markdown
Member

johlju commented Aug 27, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 27, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Member

@johlju johlju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@johlju reviewed 8 of 11 files at r1, 1 of 3 files at r3, 1 of 1 files at r4, 2 of 2 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dan-hughes)

@johlju johlju merged commit 469545d into dsccommunity:main Aug 27, 2025
9 of 10 checks passed
@dan-hughes dan-hughes deleted the performance-optimizations branch August 27, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants