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

PSAlignAssignmentStatement: Ignore hashtables with a single key-value pair#1983

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

Closed
liamjpeters wants to merge2 commits intoPowerShell:masterfromliamjpeters:master

Conversation

@liamjpeters
Copy link
Contributor

PR Summary

Hashtables with a single key-value pair should be ignored byPSAlignAssignmentStatement as there is nothing to align.

There are other rules that handle whitespace around operators etc which can handle formatting according to the users preference.

Currently:

Invoke-Formatter-ScriptDefinition"@{'Key'='Value'}"-Settings@{Rules=@{PSAlignAssignmentStatement=@{Enable=$trueCheckHashtable=$true        }    }}

Results in:

@{'Key'='Value'}

Note the space added after the hashtable key

Resolves#1979

PR Checklist

@bergmeister
Copy link
Collaborator

@liamjpeters what was the issue or reason for closing this PR? Happy to support/help where needed

@liamjpeters
Copy link
ContributorAuthor

@bergmeister - I'm not the most familiar with git. I used the main branch of my fork for this PR but wanted to use a different branch. Didn't know how to do that so got things organised locally, closed this PR and opened a new one.#1986

Hopefully I've not created any issues by doing so

bergmeister reacted with thumbs up emoji

@bergmeister
Copy link
Collaborator

Gotcha, no worries

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Adds whitespace around operators withwhitespaceAroundOperator set to false in some cases

2 participants

@liamjpeters@bergmeister

[8]ページ先頭

©2009-2025 Movatter.jp