Enable SA1028: Code should not contain trailing whitespace#25959
Enable SA1028: Code should not contain trailing whitespace#25959xtqqczze wants to merge 1 commit into
SA1028: Code should not contain trailing whitespace#25959Conversation
|
/azp run PowerShell-Windows-Packaging-CI, PowerShell-CI-linux-packaging |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
513b58f to
5d136e0
Compare
|
/azp run PowerShell-Windows-Packaging-CI, PowerShell-CI-linux-packaging |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
|
/azp run PowerShell-Windows-Packaging-CI, PowerShell-CI-linux-packaging |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
|
@daxian-dbw Could you please approve/merge the style PR? |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
There was a problem hiding this comment.
Pull request overview
Enables StyleCop analyzer rule SA1028 (no trailing whitespace) and updates existing C# sources to remove trailing whitespace so the rule can be enforced going forward.
Changes:
- Set
dotnet_diagnostic.SA1028.severitytowarningin.globalconfig. - Remove trailing whitespace (including whitespace-only blank lines) across touched C# files in engine, remoting, parser, help, and test tooling.
Reviewed changes
Copilot reviewed 1 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/tools/WebListener/Controllers/CompressionController.cs | Removes trailing whitespace in controller actions. |
| test/tools/NamedPipeConnection/src/code/NamedPipeConnection.cs | Removes trailing whitespace in comments/blank lines. |
| src/System.Management.Automation/help/UpdateHelpCommand.cs | Removes trailing whitespace in cmdlet logic/comments. |
| src/System.Management.Automation/help/HelpNotFoundException.cs | Removes trailing whitespace in attributes/blank lines. |
| src/System.Management.Automation/help/HelpCommands.cs | Removes trailing whitespace in XML doc comment. |
| src/System.Management.Automation/help/HelpCategoryInvalidException.cs | Removes trailing whitespace and normalizes parameter line. |
| src/System.Management.Automation/engine/remoting/server/serverremotesession.cs | Removes trailing whitespace in DISCPowerShellConfiguration call. |
| src/System.Management.Automation/engine/remoting/fanin/WSManTransportManager.cs | Removes trailing whitespace in comment. |
| src/System.Management.Automation/engine/remoting/fanin/BaseTransportManager.cs | Removes whitespace-only blank line in enum. |
| src/System.Management.Automation/engine/remoting/common/RunspaceConnectionInfo.cs | Removes whitespace-only blank line in SSH process logic. |
| src/System.Management.Automation/engine/remoting/commands/SuspendJob.cs | Removes trailing whitespace in conditional. |
| src/System.Management.Automation/engine/remoting/commands/PushRunspaceCommand.cs | Removes trailing whitespace around overridden property braces. |
| src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs | Removes trailing whitespace in accessors/comments. |
| src/System.Management.Automation/engine/remoting/client/ThrottlingJob.cs | Removes whitespace-only blank line. |
| src/System.Management.Automation/engine/remoting/client/Job2.cs | Removes trailing whitespace in Obsolete attribute line. |
| src/System.Management.Automation/engine/remoting/client/Job.cs | Removes trailing whitespace in Obsolete attribute line. |
| src/System.Management.Automation/engine/parser/TypeInferenceVisitor.cs | Removes whitespace-only blank lines within type inference visitors. |
| src/System.Management.Automation/engine/parser/ConstantValues.cs | Removes trailing whitespace in conditional. |
| src/System.Management.Automation/engine/MshCommandRuntime.cs | Removes whitespace-only blank line before comment block. |
| src/System.Management.Automation/engine/Modules/GetModuleCommand.cs | Removes whitespace-only blank line in Dispose. |
| src/System.Management.Automation/engine/hostifaces/PowerShellProcessInstance.cs | Removes whitespace-only blank line in Dispose. |
| src/System.Management.Automation/engine/hostifaces/Connection.cs | Removes whitespace-only blank line in property region. |
| .globalconfig | Enables SA1028 as a warning. |
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1028.md
Review with whitespace hidden