Skip to content
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
4 changes: 1 addition & 3 deletions .github/workflows/Lint-SourceCode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,15 @@ jobs:
uses: actions/checkout@v5
with:
persist-credentials: false
fetch-depth: 0

- name: Lint-SourceCode
uses: PSModule/Invoke-ScriptAnalyzer@v3
uses: PSModule/Invoke-ScriptAnalyzer@v4
with:
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
Path: src
Settings: SourceCode
WorkingDirectory: ${{ inputs.WorkingDirectory }}
TestResult_Enabled: true
TestResult_TestSuiteName: PSModuleLint-SourceCode-${{ runner.os }}
9 changes: 6 additions & 3 deletions .github/workflows/Test-Module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ jobs:
uses: actions/checkout@v5
with:
persist-credentials: false
fetch-depth: 0

- name: Download module artifact
uses: actions/download-artifact@v5
Expand All @@ -107,21 +106,25 @@ jobs:
name: Lint-Module (${{ inputs.RunsOn }})
runs-on: ${{ inputs.RunsOn }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
persist-credentials: false

- name: Download module artifact
uses: actions/download-artifact@v5
with:
name: module
path: ${{ inputs.WorkingDirectory }}/outputs/module

- name: Lint-Module
uses: PSModule/Invoke-ScriptAnalyzer@v3
uses: PSModule/Invoke-ScriptAnalyzer@v4
with:
Path: outputs/module
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
Settings: Module
TestResult_Enabled: true
TestResult_TestSuiteName: PSModuleLint-Module-${{ runner.os }}
1 change: 0 additions & 1 deletion .github/workflows/Workflow-Test-WithManifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ jobs:
secrets: inherit
with:
WorkingDirectory: tests/srcWithManifestTestRepo
Name: PSModuleTest2
SettingsPath: .github/PSModule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
@{
Rules = @{
PSAlignAssignmentStatement = @{
Enable = $true
CheckHashtable = $true
}
PSAvoidLongLines = @{
Enable = $true
MaximumLineLength = 150
}
PSAvoidSemicolonsAsLineTerminators = @{
Enable = $true
}
PSPlaceCloseBrace = @{
Enable = $true
NewLineAfter = $false
IgnoreOneLineBlock = $true
NoEmptyLineBefore = $false
}
PSPlaceOpenBrace = @{
Enable = $true
OnSameLine = $true
NewLineAfter = $true
IgnoreOneLineBlock = $true
}
PSProvideCommentHelp = @{
Enable = $true
ExportedOnly = $false
BlockComment = $true
VSCodeSnippetCorrection = $false
Placement = 'begin'
}
PSUseConsistentIndentation = @{
Enable = $true
IndentationSize = 4
PipelineIndentation = 'IncreaseIndentationForFirstPipeline'
Kind = 'space'
}
PSUseConsistentWhitespace = @{
Enable = $true
CheckInnerBrace = $true
CheckOpenBrace = $true
CheckOpenParen = $true
CheckOperator = $true
CheckPipe = $true
CheckPipeForRedundantWhitespace = $true
CheckSeparator = $true
CheckParameter = $true
IgnoreAssignmentOperatorInsideHashTable = $true
}
}
ExcludeRules = @(
'PSMissingModuleManifestField', # This rule is not applicable until the module is built.
'PSUseToExportFieldsInManifest'
)
}
Loading