Skip to content

Document new PSSA Rule "AvoidSemiColonsAsLineTerminators" #70

Closed
@michaeltlombardi

Description

@michaeltlombardi

Prerequisites

  • Write a descriptive title.
  • Search the existing issues.

Summary of the new feature or changed behavior

A new (off-by-default) rule has been added to PSScriptAnalyzer called AvoidSemiColonsAsLineTerminators. When enabled, it warns if a semi-colon is the last token on a line.

For example:

Wrong

Install-Module -Name PSScriptAnalyzer; $a = 1 + $b;
Install-Module -Name PSScriptAnalyzer;
$a = 1 + $b

Correct

Install-Module -Name PSScriptAnalyzer; $a = 1 + $b
Install-Module -Name PSScriptAnalyzer
$a = 1 + $b

List of articles that need to be updated

New Article:

Link to related PR in PowerShell/PowerShell repo

Link to related Issues in PowerShell/PowerShell repo

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions