Skip to content

Commit

Permalink
Add changelog for 1.18.2 (#1323)
Browse files Browse the repository at this point in the history
* Add changelog for 1.18.2

* tweak (parenthesis)

* add another detail

* Update CHANGELOG.MD with recent merges

* Update CHANGELOG.MD
  • Loading branch information
bergmeister authored and JamesWTruher committed Sep 3, 2019
1 parent 626e9c4 commit c912c8f
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
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)

- 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

0 comments on commit c912c8f

Please sign in to comment.