-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from MicrosoftDocs/main
Publish to live
- Loading branch information
Showing
4 changed files
with
85 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
58 changes: 58 additions & 0 deletions
58
...ence/docs-conceptual/PSScriptAnalyzer/Rules/AvoidSemicolonsAsLineTerminators.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters