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
2 changes: 2 additions & 0 deletions .github/linters/.codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[codespell]
skip = ./.github/linters
2 changes: 1 addition & 1 deletion .github/workflows/Linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
persist-credentials: false

- name: Lint code base
uses: super-linter/super-linter@d5b0a2ab116623730dd094f15ddc1b6b25bf7b99 # v8.3.2
uses: super-linter/super-linter@12562e48d7059cf666c43a4ecb0d3b5a2b31bd9e # v8.4.0
env:
GITHUB_TOKEN: ${{ github.token }}
VALIDATE_BIOME_FORMAT: false
Expand Down
16 changes: 8 additions & 8 deletions src/helpers/Build/Add-ContentFromItem.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
# Get the path separator for the current OS
$pathSeparator = [System.IO.Path]::DirectorySeparatorChar

$relativeFolderPath = $Path -Replace $RootPath, ''
$relativeFolderPath = $relativeFolderPath -Replace $file.Extension, ''
$relativeFolderPath = $Path -replace $RootPath, ''
$relativeFolderPath = $relativeFolderPath -replace $file.Extension, ''
$relativeFolderPath = $relativeFolderPath.TrimStart($pathSeparator)
$relativeFolderPath = $relativeFolderPath -Split $pathSeparator | ForEach-Object { "[$_]" }
$relativeFolderPath = $relativeFolderPath -Join ' - '
$relativeFolderPath = $relativeFolderPath -split $pathSeparator | ForEach-Object { "[$_]" }
$relativeFolderPath = $relativeFolderPath -join ' - '

Add-Content -Path $RootModuleFilePath -Force -Value @"
#region $relativeFolderPath
Expand All @@ -38,11 +38,11 @@ Write-Debug "[`$scriptName] - $relativeFolderPath - Processing folder"

$files = $Path | Get-ChildItem -File -Force -Filter '*.ps1' | Sort-Object -Property FullName
foreach ($file in $files) {
$relativeFilePath = $file.FullName -Replace $RootPath, ''
$relativeFilePath = $relativeFilePath -Replace $file.Extension, ''
$relativeFilePath = $file.FullName -replace $RootPath, ''
$relativeFilePath = $relativeFilePath -replace $file.Extension, ''
$relativeFilePath = $relativeFilePath.TrimStart($pathSeparator)
$relativeFilePath = $relativeFilePath -Split $pathSeparator | ForEach-Object { "[$_]" }
$relativeFilePath = $relativeFilePath -Join ' - '
$relativeFilePath = $relativeFilePath -split $pathSeparator | ForEach-Object { "[$_]" }
$relativeFilePath = $relativeFilePath -join ' - '

Add-Content -Path $RootModuleFilePath -Force -Value @"
#region $relativeFilePath
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/Build/Build-PSModuleManifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

# Get files on module subfolders, excluding the following folders 'init', 'classes', 'public', 'private'
$skipList = @('init', 'classes', 'functions', 'variables')
$ModuleOutputFolder | Get-ChildItem -Directory | Where-Object { $_.Name -NotIn $skipList } |
$ModuleOutputFolder | Get-ChildItem -Directory | Where-Object { $_.Name -notin $skipList } |
Get-ChildItem -Recurse -File -ErrorAction SilentlyContinue | ForEach-Object { $files.Add($_) }

# Get the relative file path and store it in the manifest
Expand Down Expand Up @@ -362,7 +362,7 @@
$tags = $PSData.Keys -contains 'Tags' ? ($PSData.Tags).Count -gt 0 ? $PSData.Tags : $repoLabels : $repoLabels
$tags | ForEach-Object { $manifestTags.Add($_) }
'Windows', 'Linux', 'MacOS' | ForEach-Object { $manifestTags.Add($_) }
# Add tags for compatability mode. https://docs.microsoft.com/en-us/powershell/scripting/developer/module/how-to-write-a-powershell-module-manifest?view=powershell-7.1#compatibility-tags
# Add tags for compatibility mode. https://docs.microsoft.com/en-us/powershell/scripting/developer/module/how-to-write-a-powershell-module-manifest?view=powershell-7.1#compatibility-tags
if ($manifest.CompatiblePSEditions -contains 'Desktop') {
if ($manifestTags -notcontains 'PSEdition_Desktop') {
$manifestTags.Add('PSEdition_Desktop')
Expand Down
12 changes: 6 additions & 6 deletions src/helpers/Build/Build-PSModuleRootModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ $MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
Add-Content -Path $rootModuleFile -Force -Value @'
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSAvoidAssignmentToAutomaticVariable', 'IsWindows',
Justification = 'IsWindows doesnt exist in PS5.1'
Justification = 'IsWindows does not exist in PS5.1'
)]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSUseDeclaredVarsMoreThanAssignments', 'IsWindows',
Justification = 'IsWindows doesnt exist in PS5.1'
Justification = 'IsWindows does not exist in PS5.1'
)]
'@

Expand Down Expand Up @@ -212,11 +212,11 @@ Write-Debug "[$scriptName] - [data] - Done"
#region - Add content from *.ps1 files on module root
$files = $ModuleOutputFolder | Get-ChildItem -File -Force -Filter '*.ps1' | Sort-Object -Property FullName
foreach ($file in $files) {
$relativePath = $file.FullName -Replace $ModuleOutputFolder, ''
$relativePath = $relativePath -Replace $file.Extension, ''
$relativePath = $file.FullName -replace $ModuleOutputFolder, ''
$relativePath = $relativePath -replace $file.Extension, ''
$relativePath = $relativePath.TrimStart($pathSeparator)
$relativePath = $relativePath -Split $pathSeparator | ForEach-Object { "[$_]" }
$relativePath = $relativePath -Join ' - '
$relativePath = $relativePath -split $pathSeparator | ForEach-Object { "[$_]" }
$relativePath = $relativePath -join ' - '

Add-Content -Path $rootModuleFile -Force -Value @"
#region $relativePath
Expand Down