PowerShell / PowerShell/PSScriptAnalyzer
Add support for space handling after opening and before closing non-empty parenthesis/brackets/braces.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 414
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Description
Summary of the new feature
Add functionality to allow the user to control adding spaces after opening and before closing non-empty parenthesis/brackets/braces.
For example:
(a + b) = c ==> ( a + b ) = c
if ($MyVar -eq $true){ } ==> if ( $MyVar -eq $true )
[OutputType([string])] ==> [ OutputType( [ string ] ) ]
Proposed technical implementation details (optional)
The TypeScript extension has the following options:
// Defines space handling after opening and before closing non empty parenthesis.
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
// Defines space handling after opening and before closing non empty brackets.
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
// Defines space handling after opening and before closing non empty braces.
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
// Defines space handling after opening and before closing template string braces.
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by tracing existing PSScriptAnalyzer formatting options and comparing them with the listed TypeScript settings. Done means users can independently control spaces after opening and before closing non-empty parentheses, brackets, braces, and template string braces, with the shown examples covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100