Complete copyright and source layout corrections, analyze optional PowerShell tools, add privacy-safe structured failure diagnostics, and close a test-stream ownership gap. Validation: enabled Checkstyle and clean compilation with 39 server, 6 HTTP demo and 18 optional Record Files cases passing in an isolated coherent API1.10 snapshot. Production and physical acceptance gates remain explicit. Co-Authored-By: Codex <noreply@openai.com>
60 lines
2.2 KiB
PowerShell
60 lines
2.2 KiB
PowerShell
# Copyright (c) 2026 Kingsrook, LLC
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# KofTwentyTwo PowerShell analysis (K22-CODE-SH-05). CI runs:
|
|
# Invoke-ScriptAnalyzer -Path . -Recurse -Settings ./PSScriptAnalyzerSettings.psd1 -EnableExit
|
|
# and `Invoke-Formatter` with the same settings for layout. PowerShell supports the
|
|
# Kingsrook layout fully: next-line (Allman) braces and 3-space indentation.
|
|
@{
|
|
Severity = @('Error', 'Warning', 'Information')
|
|
IncludeDefaultRules = $true
|
|
ExcludeRules = @()
|
|
Rules = @{
|
|
PSPlaceOpenBrace = @{
|
|
Enable = $true
|
|
OnSameLine = $false
|
|
NewLineAfter = $true
|
|
IgnoreOneLineBlock = $true
|
|
}
|
|
PSPlaceCloseBrace = @{
|
|
Enable = $true
|
|
NewLineAfter = $true
|
|
IgnoreOneLineBlock = $true
|
|
NoEmptyLineBefore = $true
|
|
}
|
|
PSUseConsistentIndentation = @{
|
|
Enable = $true
|
|
IndentationSize = 3
|
|
Kind = 'space'
|
|
PipelineIndentation = 'IncreaseIndentationForFirstPipeline'
|
|
}
|
|
PSUseConsistentWhitespace = @{
|
|
Enable = $true
|
|
CheckInnerBrace = $true
|
|
# Kingsrook writes if(...) with no space; the rule cannot require that, so it
|
|
# is not checked either way.
|
|
CheckOpenParen = $false
|
|
CheckOpenBrace = $false
|
|
# Kingsrook aligns the `=` of consecutive assignments (PSAlignAssignmentStatement
|
|
# below); CheckOperator would then flag every aligned line, so it is off.
|
|
CheckOperator = $false
|
|
CheckPipe = $true
|
|
CheckSeparator = $true
|
|
CheckParameter = $true
|
|
}
|
|
PSAlignAssignmentStatement = @{
|
|
Enable = $true
|
|
CheckHashtable = $true
|
|
}
|
|
PSUseCorrectCasing = @{ Enable = $true }
|
|
PSAvoidUsingCmdletAliases = @{ Enable = $true }
|
|
PSAvoidUsingWriteHost = @{ Enable = $true }
|
|
PSProvideCommentHelp = @{
|
|
Enable = $true
|
|
ExportedOnly = $false
|
|
BlockComment = $true
|
|
Placement = 'before'
|
|
}
|
|
}
|
|
}
|