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

Rule to warn against having a semicolon at the end of the line #824

Closed
TylerLeonhardt opened this issue Oct 23, 2017 · 3 comments
Closed

Comments

@TylerLeonhardt
Copy link
Member

function foo {
    $a = 1 + $b; # semicolon not needed
}

Install-Module Polaris; $a = 1 + $b; # semicolon needed after install-module, not needed after addition

We should warn against using semicolons at the end of a line.

@bergmeister
Copy link
Collaborator

bergmeister commented Sep 17, 2018

I actually put semicolons at the end of a line by design so that I can safely copy-paste the script into any console host (I use ConEmu as a console host, I do not use the one by powershell or pwsh directly)

@johnbooze
Copy link

tempora-mutantur added a commit to tempora-mutantur/PSScriptAnalyzer that referenced this issue Jun 14, 2022
It's a rule to warn about lines ending with a semicolon
tempora-mutantur added a commit to tempora-mutantur/PSScriptAnalyzer that referenced this issue Jun 14, 2022
It's a rule to warn about lines ending with a semicolon
tempora-mutantur added a commit to tempora-mutantur/PSScriptAnalyzer that referenced this issue Jun 15, 2022
It's a rule to warn about lines ending with a semicolon
tempora-mutantur added a commit to tempora-mutantur/PSScriptAnalyzer that referenced this issue Jun 16, 2022
It's a rule to warn about lines ending with a semicolon
bergmeister added a commit that referenced this issue Jul 25, 2022
…ing with a semicolon. Fix (#824) (#1806)

* Add the AvoidSemicolonsAsLineTerminators (#824)

It's a rule to warn about lines ending with a semicolon

* Update Engine/Formatter.cs with suggestion

Co-authored-by: Christoph Bergmeister <c.bergmeister@gmail.com>
@bergmeister
Copy link
Collaborator

Implemented in #1806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants