Allow customization of code formatting rules
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp, powershell
- Domain
- developer-experience, tooling
Research direction
Start in src/PowerShellEditorServices.Protocol/Server/LanguageServerSettings.cs at the formatting-rule list around line 209. Trace how that list is used by the Format Document and Format Selection actions, then determine how custom PSScriptAnalyzer rules should be supplied and included in both paths. Done means users can extend the formatting rules and their custom rule runs through those editor actions.
Written by the indexing model from the issue text.
Description
In this block of code: https://github.com/PowerShell/PowerShellEditorServices/blob/master/src/PowerShellEditorServices.Protocol/Server/LanguageServerSettings.cs#L209
The list of PSScriptAnalyzer rules used to perform the Formatting function is hard-coded. It would be nice to have a way of extending this list to include custom rules. For example, I have one that removes any trailing whitespace from lines, but it doesn't run if I use VSCode's "Format Document" or "Format Selection" actions.
- Dominant language
- C#
- Stars
- 767
- Forks
- 266
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 1
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.
More from PowerShell/PowerShellEditorServices
-
[Bug] None of the string overloads of `EditorExtensionServiceProvider.GetService()` work on .NET. Open
PowerShell/PowerShellEditorServices#2331 · 1 reaction · 2 assignees ·
-
Area-Language Server Issue-Enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
PowerShell/PowerShellEditorServices#2315 · 1 comment ·
-
Area-Debugging Issue-Enhancement
PowerShell/PowerShellEditorServices#2294 · 1 reaction · 2 assignees ·
-
Issue-Bug Needs: Triage
Difficulty 4/5 3-5 days Newbie friendliness 48/100
PowerShell/PowerShellEditorServices#2293 · 1 comment ·
-
PowerShell/PowerShellEditorServices#2282 · 1 comment · 1 reaction · 2 assignees ·
All issues in PowerShell/PowerShellEditorServices
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1425 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Documentation
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cake-build/cake#5024 ·
-
Frontend status/draft TechnicalDebt
Difficulty 2/5 1-2 days Newbie friendliness 75/100
Altinn/altinn-auth#4143 ·