Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

UseConsistentWhitespace.CheckOperator: Add unary operators that start with a dash (-split, -join, -not, -bnot, isplit, csplit)#1602

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
bergmeister wants to merge9 commits intoPowerShell:main
base:main
Choose a base branch
Loading
frombergmeister:UnaryOperatorFormatting

Conversation

@bergmeister
Copy link
Collaborator

@bergmeisterbergmeister commentedOct 24, 2020
edited
Loading

PR Summary

Related:#1239

In order to enable formatting corrections of this kind:$a-join$b -->$a -join $b or reducing too much whitespace but also-split$a --> -split $a with the added code as existing code for operators assumes that something precedes it.
The reason for adding the check that the unary operator starts with a dash is is to exclude things like$a++ or!$a where we do not want a whitespace character separation by default

PR Checklist

@daviesj
Copy link
Contributor

I tried this code out and noticed a couple things.
Checking that the operator starts with a dash introduces the following undesirable behavior:--$counter is changed to-- $counter. Also$counter-- is changed to$counter --
Unary operator-not does not get spacing if it follows a parenthesis such asif (-not$SomeVariable).

bergmeister reacted with thumbs up emoji

@rjmholtrjmholt marked this pull request as draftApril 21, 2021 20:57
@rjmholt
Copy link
Contributor

Converting to draft to resolve the various PRs

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@rjmholtrjmholtrjmholt approved these changes

@JamesWTruherJamesWTruherJamesWTruher approved these changes

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@bergmeister@daviesj@rjmholt@JamesWTruher

[8]ページ先頭

©2009-2025 Movatter.jp