Skip to content

Commit 21f2124

Browse files
committed
chore: ✨ Update VSCode settings and changelog
* Added new PowerShell code formatting options in `.vscode/settings.json` * Cleaned up and reorganized entries in `CHANGELOG.md` * Improved code readability in `psakeFile.ps1` with consistent formatting
1 parent 38e15f5 commit 21f2124

File tree

3 files changed

+37
-33
lines changed

3 files changed

+37
-33
lines changed

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
"editor.insertSpaces": true,
33
"files.trimTrailingWhitespace": true,
44
"files.insertFinalNewline": true,
5-
"powershell.codeFormatting.preset": "OTBS"
5+
"powershell.codeFormatting.preset": "OTBS",
6+
"powershell.codeFormatting.addWhitespaceAroundPipe": true,
7+
"powershell.codeFormatting.useCorrectCasing": true,
8+
"powershell.codeFormatting.newLineAfterOpenBrace": true,
9+
"powershell.codeFormatting.alignPropertyValuePairs": true
610
}

CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
131131
'Public' folder when dot sourcing functions in PSM1 (via
132132
[@pauby](https://github.com/pauby))
133133

134-
### Changed
135-
136-
- [**#19**](https://github.com/psake/PowerShellBuild/pull/19) Allow the
137-
`BHBuildOutput` environment variable defined by `BuildHelpers` to be set via
138-
the `$PSBPreference.Build.ModuleOutDir` property of the build tasks (via
139-
[@pauby](https://github.com/pauby))
140-
141134
### Breaking changes
142135

143136
- Refactor build properties into a single hashtable `$PSBPreference`
@@ -148,6 +141,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
148141
tasks are now auto-generated from the psake tasks via a converter script (via
149142
[@JustinGrote](https://github.com/JustinGrote))
150143

144+
- [**#19**](https://github.com/psake/PowerShellBuild/pull/19) Allow the
145+
`BHBuildOutput` environment variable defined by `BuildHelpers` to be set via
146+
the `$PSBPreference.Build.ModuleOutDir` property of the build tasks (via
147+
[@pauby](https://github.com/pauby))
148+
151149
## [0.2.0] - 2018-11-15
152150

153151
### Added
@@ -168,3 +166,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
168166
### Added
169167

170168
- Initial commit
169+
170+
<!--spell-checker:ignore IMJLA webtroter joshooaj pauby joeypiccola nightroman -->

PowerShellBuild/psakeFile.ps1

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
# spell-checker:ignore Reqs
22
# Load in build settings
33
Remove-Variable -Name PSBPreference -Scope Script -Force -ErrorAction Ignore
44
Set-Variable -Name PSBPreference -Option ReadOnly -Scope Script -Value (. ([IO.Path]::Combine($PSScriptRoot, 'build.properties.ps1')))
@@ -25,14 +25,14 @@ Task Clean -depends $PSBPreference.TaskDependencies.Clean {
2525

2626
Task StageFiles -depends $PSBPreference.TaskDependencies.StageFiles {
2727
$buildParams = @{
28-
Path = $PSBPreference.General.SrcRootDir
29-
ModuleName = $PSBPreference.General.ModuleName
30-
DestinationPath = $PSBPreference.Build.ModuleOutDir
31-
Exclude = $PSBPreference.Build.Exclude
32-
Compile = $PSBPreference.Build.CompileModule
28+
Path = $PSBPreference.General.SrcRootDir
29+
ModuleName = $PSBPreference.General.ModuleName
30+
DestinationPath = $PSBPreference.Build.ModuleOutDir
31+
Exclude = $PSBPreference.Build.Exclude
32+
Compile = $PSBPreference.Build.CompileModule
3333
CompileDirectories = $PSBPreference.Build.CompileDirectories
34-
CopyDirectories = $PSBPreference.Build.CopyDirectories
35-
Culture = $PSBPreference.Help.DefaultLocale
34+
CopyDirectories = $PSBPreference.Build.CopyDirectories
35+
Culture = $PSBPreference.Help.DefaultLocale
3636
}
3737

3838
if ($PSBPreference.Help.ConvertReadMeToAboutHelp) {
@@ -69,9 +69,9 @@ $analyzePreReqs = {
6969
}
7070
Task Analyze -depends $PSBPreference.TaskDependencies.Analyze -precondition $analyzePreReqs {
7171
$analyzeParams = @{
72-
Path = $PSBPreference.Build.ModuleOutDir
72+
Path = $PSBPreference.Build.ModuleOutDir
7373
SeverityThreshold = $PSBPreference.Test.ScriptAnalysis.FailBuildOnSeverityLevel
74-
SettingsPath = $PSBPreference.Test.ScriptAnalysis.SettingsPath
74+
SettingsPath = $PSBPreference.Test.ScriptAnalysis.SettingsPath
7575
}
7676
Test-PSBuildScriptAnalysis @analyzeParams
7777
} -description 'Execute PSScriptAnalyzer tests'
@@ -94,17 +94,17 @@ $pesterPreReqs = {
9494
}
9595
Task Pester -depends $PSBPreference.TaskDependencies.Pester -precondition $pesterPreReqs {
9696
$pesterParams = @{
97-
Path = $PSBPreference.Test.RootDir
98-
ModuleName = $PSBPreference.General.ModuleName
99-
ModuleManifest = Join-Path $PSBPreference.Build.ModuleOutDir "$($PSBPreference.General.ModuleName).psd1"
100-
OutputPath = $PSBPreference.Test.OutputFile
101-
OutputFormat = $PSBPreference.Test.OutputFormat
102-
CodeCoverage = $PSBPreference.Test.CodeCoverage.Enabled
103-
CodeCoverageThreshold = $PSBPreference.Test.CodeCoverage.Threshold
104-
CodeCoverageFiles = $PSBPreference.Test.CodeCoverage.Files
105-
CodeCoverageOutputFile = $PSBPreference.Test.CodeCoverage.OutputFile
97+
Path = $PSBPreference.Test.RootDir
98+
ModuleName = $PSBPreference.General.ModuleName
99+
ModuleManifest = Join-Path $PSBPreference.Build.ModuleOutDir "$($PSBPreference.General.ModuleName).psd1"
100+
OutputPath = $PSBPreference.Test.OutputFile
101+
OutputFormat = $PSBPreference.Test.OutputFormat
102+
CodeCoverage = $PSBPreference.Test.CodeCoverage.Enabled
103+
CodeCoverageThreshold = $PSBPreference.Test.CodeCoverage.Threshold
104+
CodeCoverageFiles = $PSBPreference.Test.CodeCoverage.Files
105+
CodeCoverageOutputFile = $PSBPreference.Test.CodeCoverage.OutputFile
106106
CodeCoverageOutputFileFormat = $PSBPreference.Test.CodeCoverage.OutputFileFormat
107-
ImportModule = $PSBPreference.Test.ImportModule
107+
ImportModule = $PSBPreference.Test.ImportModule
108108
}
109109
Test-PSBuildPester @pesterParams
110110
} -description 'Execute Pester tests'
@@ -126,8 +126,8 @@ Task GenerateMarkdown -depends $PSBPreference.TaskDependencies.GenerateMarkdown
126126
$buildMDParams = @{
127127
ModulePath = $PSBPreference.Build.ModuleOutDir
128128
ModuleName = $PSBPreference.General.ModuleName
129-
DocsPath = $PSBPreference.Docs.RootDir
130-
Locale = $PSBPreference.Help.DefaultLocale
129+
DocsPath = $PSBPreference.Docs.RootDir
130+
Locale = $PSBPreference.Help.DefaultLocale
131131
}
132132
Build-PSBuildMarkdown @buildMDParams
133133
} -description 'Generates PlatyPS markdown files from module help'
@@ -160,10 +160,10 @@ Task Publish -depends $PSBPreference.TaskDependencies.Publish {
160160
Assert -conditionToCheck ($PSBPreference.Publish.PSRepositoryApiKey -or $PSBPreference.Publish.PSRepositoryCredential) -failureMessage "API key or credential not defined to authenticate with [$($PSBPreference.Publish.PSRepository)] with."
161161

162162
$publishParams = @{
163-
Path = $PSBPreference.Build.ModuleOutDir
164-
Version = $PSBPreference.General.ModuleVersion
163+
Path = $PSBPreference.Build.ModuleOutDir
164+
Version = $PSBPreference.General.ModuleVersion
165165
Repository = $PSBPreference.Publish.PSRepository
166-
Verbose = $VerbosePreference
166+
Verbose = $VerbosePreference
167167
}
168168
if ($PSBPreference.Publish.PSRepositoryApiKey) {
169169
$publishParams.ApiKey = $PSBPreference.Publish.PSRepositoryApiKey

0 commit comments

Comments
 (0)