Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changelog for 1.18.2 #1323

Merged
merged 6 commits into from
Sep 3, 2019
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
42 changes: 42 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# CHANGELOG

## [1.18.2](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.18.2) - 2019-08-28

This release mainly brings fixes and enhancements that are especially useful when being consumed by PowerShellEditorServices.
The benefit to the user will be some enhancements and fixes in the formatter, especially around multiline commands. In addition to that, error messages emitted when using invalid syntax in the setting file are now much more meaningful and actionable.

### Fixes

- Compatibility Analysis
- Fix profile collection on non-Windows, add PS 7 profiles (#1260) (by @rjmholt)
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to credit me I don't think


- Formatter
- Fix PSCloseBrace rule to not wrongly flag closing brace of one-line hashtable, which lead to incorrect formatting (#1309) (by @bergmeister)
- PipelineIndentationStyle (when not being set to NoIndentation)
- PipelineIndentationStyle: Fix edge case where pipeline was incorrectly detected to span multiple lines due to backticks in the command leading up to the pipeline (#1312) (by @bergmeister)
- Fix edge case when PipelineIndentationStyle is not set to NoIndentation (pipeline operator spanning only one line but PipelineAst spanning multiple lines) (#1261) (by @bergmeister)
- Allow formatter to optionally correct aliases (#1277) (by @bergmeister)

- Engine
- Work around runspacepool deadlock (#1316) (by @rjmholt)

### Enhancements

- Formatter
- Fix Indentation of multiline command with backticks after comment line (#1318) (by @bergmeister)
- Code Analysis:
- Enhance UseDeclaredVarsMoreThanAssignments to detect also take into account the usage of Get-Variable with an array of variables and usage of named - parameter -Name (#1310) (by @bergmeister)
- Settings files
- Actionable errors from incorrect settings files (#1263) (thanks @travis-c-lagrone!)
- Update engine resource string 'WrongKeyHashTable' to include all valid settings hashtable keys (#1273) (thanks @travis-c-lagrone!)
- Add icon and add reference in readme and manifest (#1291) (by @bergmeister, thanks @adilio for creating the logo!)

### Documentation

- Update readme with changes to default branch being master now (#1265) (by @bergmeister)
- UseApprovedVerbs.md: Improving Documentation (#1294) (Thanks @Banner-Keith!)
- Update documentation for parameter "Settings" of command "Invoke-ScriptAnalyzer" to include the key "RecurseCustomRulesPath" - (#1272) (thanks @travis-c-lagrone!)

### Build

- Don't sign the compatability collector catalog so that PSScriptAnalyzer can ship with a catalog file again (#1328) (by @JamesWTruher)
- Fix Ubuntu Appveyor build (#1320) (by @bergmeister, thanks @JamesWTruher for the initial investigation)

## [1.18.1](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.18.1) - 2019-06-12

### Fixes
Expand Down
30 changes: 30 additions & 0 deletions Tests/Rules/UseConsistentIndentation.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,36 @@ foo |
Invoke-FormatterAssertion $scriptDefinition $expected 3 $settings
}

It "When a comment is in the middle of a multi-line statement with preceding pipeline and succeeding line continuation 2" {
$scriptDefinition = @'
foo `
-bar |
baz
'@
$expected = @'
foo `
-bar |
baz
'@
Invoke-FormatterAssertion $scriptDefinition $expected 2 $settings
}

It "When a comment is in the middle of a multi-line statement with preceding pipeline and succeeding line continuation 3" {
$scriptDefinition = @'
foo `
# comment
-bar |
baz
'@
$expected = @'
foo `
# comment
-bar |
baz
'@
Invoke-FormatterAssertion $scriptDefinition $expected 3 $settings
}

It "Should find a violation if a pipleline element is not indented correctly" {
$def = @'
get-process |
Expand Down