Skip to content

Commit

Permalink
Merge pull request #87 from MicrosoftDocs/main
Browse files Browse the repository at this point in the history
Publish to live
  • Loading branch information
sdwheeler authored Jul 25, 2022
2 parents faa58ed + c6934de commit 964c3a6
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 24 deletions.
48 changes: 24 additions & 24 deletions reference/breadcrumb/toc.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
- name: Docs
tocHref: /
topicHref: /
items:
- name: PowerShell
tocHref: /powershell/
topicHref: /powershell
items:
- name: Docs
tocHref: /
topicHref: /
items:
- name: Utility Modules
tocHref: /powershell/utility-modules/
topicHref: /powershell/utility-modules/overview
items:
- name: Crescendo
tocHref: /powershell/module/crescendo/
topicHref: /powershell/utility-modules/crescendo/overview
- name: PlatyPS
tocHref: /powershell/module/platyps/
topicHref: /powershell/utility-modules/platyps/overview
- name: PSScriptAnalyzer
tocHref: /powershell/module/psscriptanalyzer/
topicHref: /powershell/utility-modules/psscriptanalyzer/overview
- name: SecretManagement and SecretStore
tocHref: /powershell/module/secretmanagement/
topicHref: /powershell/utility-modules/secretmanagement/overview

- name: PowerShell
tocHref: /powershell/
topicHref: /powershell
items:
- name: Utility Modules
tocHref: /powershell/utility-modules/
topicHref: /powershell/utility-modules/overview
items:
- name: Crescendo
tocHref: /powershell/module/crescendo/
topicHref: /powershell/utility-modules/crescendo/overview
- name: PlatyPS
tocHref: /powershell/module/platyps/
topicHref: /powershell/utility-modules/platyps/overview
- name: PSScriptAnalyzer
tocHref: /powershell/module/psscriptanalyzer/
topicHref: /powershell/utility-modules/psscriptanalyzer/overview
- name: SecretManagement and SecretStore
tocHref: /powershell/module/secretmanagement/
topicHref: /powershell/utility-modules/secretmanagement/overview
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
description: Avoid semicolons as line terminators
ms.custom: PSSA v1.21.0
ms.date: 07/25/2022
ms.topic: reference
title: AvoidSemicolonsAsLineTerminators
---

# AvoidSemicolonsAsLineTerminators

**Severity Level: Warning**

## Description

Lines should not end with a semicolon.

> [!NOTE]
> This rule is not enabled by default. The user needs to enable it through settings.
## Example

### Wrong

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

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

### Correct

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

```powershell
Install-Module -Name PSScriptAnalyzer
$a = 1 + $b
```

## Configuration

```powershell
Rules = @{
PSAvoidSemicolonsAsLineTerminators = @{
Enable = $true
}
}
```

### Parameters

#### Enable: bool (Default value is `$false`)

Enable or disable the rule during ScriptAnalyzer invocation.
1 change: 1 addition & 0 deletions reference/docs-conceptual/PSScriptAnalyzer/Rules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The PSScriptAnalyzer contains the following rule definitions.
| [AvoidMultipleTypeAttributes<sup>1</sup>](./AvoidMultipleTypeAttributes.md) | Warning | Yes | |
| [AvoidNullOrEmptyHelpMessageAttribute](./AvoidNullOrEmptyHelpMessageAttribute.md) | Warning | Yes | |
| [AvoidOverwritingBuiltInCmdlets](./AvoidOverwritingBuiltInCmdlets.md) | Warning | Yes | Yes |
| [AvoidSemicolonsAsLineTerminators](./AvoidSemicolonsAsLineTerminators.md) | Warning | No | |
| [AvoidShouldContinueWithoutForce](./AvoidShouldContinueWithoutForce.md) | Warning | Yes | |
| [AvoidTrailingWhitespace](./AvoidTrailingWhitespace.md) | Warning | Yes | |
| [AvoidUsingCmdletAliases](./AvoidUsingCmdletAliases.md) | Warning | Yes | Yes<sup>2</sup> |
Expand Down
2 changes: 2 additions & 0 deletions reference/docs-conceptual/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ items:
href: PSScriptAnalyzer/Rules/AvoidNullOrEmptyHelpMessageAttribute.md
- name: AvoidOverwritingBuiltInCmdlets
href: PSScriptAnalyzer/Rules/AvoidOverwritingBuiltInCmdlets.md
- name: AvoidSemicolonsAsLineTerminators
href: PSScriptAnalyzer/Rules/AvoidSemicolonsAsLineTerminators.md
- name: AvoidShouldContinueWithoutForce
href: PSScriptAnalyzer/Rules/AvoidShouldContinueWithoutForce.md
- name: AvoidTrailingWhitespace
Expand Down

0 comments on commit 964c3a6

Please sign in to comment.