PowerShell / PowerShell/PSScriptAnalyzer
Add `-Path` parameter to `Invoke-Formatter`
Open
Nobody has claimed this yet.
Area - Formatter
Issue - Enhancement
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 414
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Description
Invoke-Formatter takes only a ScriptDefinition parameter. The user should be able to point the cmdlet to a file for formatting. However, the following things need to be preserved when formatting a file:
- file encoding
- new line characters
- indentation type
{tab, space}
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
Start by locating the Invoke-Formatter cmdlet implementation and its existing ScriptDefinition handling. Trace how file content would be read and formatted, then verify that a -Path workflow preserves the file encoding, newline characters, and tab-versus-space indentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100