Commit graph

43 commits

Author SHA1 Message Date
xtqqczze 0f2f23f67a
Enable IDE0049 PreferBuiltInOrFrameworkType (#14491) 2021-07-28 12:39:14 -07:00
xtqqczze bb55515717
Fix SA1119 part 1 (#14204) 2021-01-09 12:41:51 +05:00
xtqqczze 0fd914fee1
Fix RCS1188: Remove redundant auto-property initialization part 1 (#14261)
https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1188.md
2020-11-27 13:17:38 +05:00
xtqqczze 908cf899e1
Fix SA1642 for Microsoft.Management.Infrastructure.CimCmdlets (#14239)
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1642.md
2020-11-27 13:07:58 +05:00
xtqqczze b5fc2f34e4
Use xml documentation child blocks correctly (#14249) 2020-11-26 10:36:23 +05:00
xtqqczze 0e0cd0b6df
Fix IDE0032: UseAutoProperty part 2 (#14244)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0032
2020-11-24 15:44:09 +05:00
xtqqczze bbe46f2772
Fix CA1822: Mark members as static part 1 (#14224)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822
2020-11-24 12:01:01 +05:00
xtqqczze fa6caf957e
Use see keyword in documentation (#14220)
Fix [DOC104](https://github.com/DotNetAnalyzers/DocumentationAnalyzers/blob/master/docs/DOC104.md)
2020-11-24 09:35:46 +05:00
xtqqczze 0db5e8f3c9
Fix various xml documentation issues (#14223)
* Use correct paramref tag

* End summary tag in correct position

* Escape generic identifiers correctly

* https://github.com/DotNetAnalyzers/DocumentationAnalyzers/blob/master/docs/DOC202.md

* Remove extraneous space
2020-11-23 14:07:48 +05:00
xtqqczze 98117cd403
Fix IDE0090: Simplify new expression part 3 (#14201)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0090
2020-11-21 19:29:44 +05:00
xtqqczze 2e24380b8c
Fix CA1003: Use generic event handler instances (#13937)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1003
2020-11-07 16:30:19 +05:00
xtqqczze 76cef3b299
Fix RCS1221: Use pattern matching instead of combination of 'as' operator and null check (#13333)
* Autofix RCS1221: Use pattern matching instead of combination of 'as' operator and null check

https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1221.md

* Restore stripped comments
2020-11-05 21:58:48 +05:00
xtqqczze eaad6c2235
Fix accessor order (#13538)
* Fix Microsoft.PowerShell.Commands.Utility

* Fix System.Management.Automation

* Fix Microsoft.Management.Infrastructure.CimCmdlets

* Fix Microsoft.PowerShell.Commands.Management

* Fix Microsoft.WSMan.Management
2020-11-05 10:05:50 +05:00
xtqqczze 739b55d459
Fix IDE0044: MakeFieldReadonly part 1 (#13884)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0044
2020-11-02 12:43:04 +05:00
xtqqczze af8558b065
Enable CA1834: Consider using 'StringBuilder.Append(char)' when applicable (#13878)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1834
2020-10-30 12:07:18 +05:00
xtqqczze 20401c9583
Enable IDE1005: InvokeDelegateWithConditionalAccess (#13911)
* Enable IDE1005: InvokeDelegateWithConditionalAccess

https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide1005
2020-10-28 22:35:51 +05:00
xtqqczze 859890374a
Use read-only auto-implemented properties (#13507)
* Autofix RCS1170: Use read-only auto-implemented property
2020-09-02 08:11:16 +05:00
xtqqczze 4597b41396
Use is not syntax where appropriate and remove unnecessary parentheses (#13323) 2020-07-31 16:41:59 -07:00
Dongbo Wang 4b9b0788ed
Revert "Use is null syntax (#13277)" (#13322)
This reverts commit 6c03776d74.
2020-07-30 16:06:38 -07:00
xtqqczze 6c03776d74
Use is null syntax (#13277)
Replace `== null` with `is null`
2020-07-30 18:04:03 +05:00
Ilya 409bd318f1
Rename the CimCmdlet resource file (#12955) 2020-06-15 11:00:02 -07:00
xtqqczze 05cab7fa5a
Formatting: Add empty line between declarations (#12824)
# PR Summary

Automated fixes:
* RCS0013: Add empty line between single-line declarations of different kind
* RCS010: Add empty line between declarations

## PR Context


## PR Checklist

- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - Use the present tense and imperative mood when describing your changes
- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
- [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
- [x] This PR is ready to merge and is not [Work in Progress](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---work-in-progress).
    - If the PR is work in progress, please add the prefix `WIP:` or `[ WIP ]` to the beginning of the title (the `WIP` bot will keep its status check at `Pending` while the prefix is present) and remove the prefix when the PR is ready.
- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**
    - [x] None
    - **OR**
    - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/staging/reference/6/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)
        - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->
- **User-facing changes**
    - [x] Not Applicable
    - **OR**
    - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
        - [ ] Issue filed: <!-- Number/link of that issue here -->
- **Testing - New and feature**
    - [x] N/A or can only be tested interactively
    - **OR**
    - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)
- **Tooling**
    - [x] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
    - **OR**
    - [ ] I have considered the user experience from a tooling perspective and enumerated concerns in the summary. This may include:
        - Impact on [PowerShell Editor Services](https://github.com/PowerShell/PowerShellEditorServices) which is used in the [PowerShell extension](https://github.com/PowerShell/vscode-powershell) for VSCode (which runs in a different PS Host).
        - Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.
        - Impact on [PSScriptAnalyzer](https://github.com/PowerShell/PSScriptAnalyzer) (which provides linting & formatting in the editor extensions).
        - Impact on [EditorSyntax](https://github.com/PowerShell/EditorSyntax) (which provides syntax highlighting with in VSCode, GitHub, and many other editors).
2020-05-29 04:56:33 +00:00
Reece Dunham 8b3937ecfe
CodeFactor cleanup (#12251)
* Code cleanup

Signed-off-by: Reece Dunham <me@rdil.rocks>

* whoops

* Update src/Microsoft.Management.Infrastructure.CimCmdlets/CimSessionOperations.cs

Co-Authored-By: Travis Plunk <travis.plunk@microsoft.com>

Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
2020-04-14 14:34:53 -07:00
Steve Lee b7cb335f03
Update copyright notice to latest guidance (#12190) 2020-03-24 11:08:37 -07:00
xtqqczze a34d0f3e80
Reformat code according to EditorConfig rules (#11681) 2020-01-31 14:56:22 -08:00
Ilya 2ff65c100b Move some of the creations of WildcardPattern in outer loop to avoid unnecessary allocation (#10053) 2019-07-10 09:06:34 -07:00
Ilya d80154430d Style: Change first char to upper in summary comments (#8597) 2019-01-09 13:07:40 -08:00
Ilya b8f9532b41 Style: Use the type alias 'string' instead of 'String' in places that are appropriate (#8573) 2019-01-07 10:46:00 -08:00
Ilya 233b54ed65 Style: Add a space after "//" in comments and remove unneeded comments after "}" (#8576) 2019-01-05 17:51:20 -08:00
Ilya 1be3f4cc0e Style: Add the ending period to the XML document texts (#8577) 2019-01-05 15:40:24 -08:00
Ilya dfd2f69369
Style: Change 'String.' to 'string.' (#8568) 2018-12-31 20:44:16 +05:00
Ilya 7207db6360
Style: Convert to upper first char in <param> and <exception> doc tags (#8556) 2018-12-29 08:25:49 +05:00
Ilya 479fc64aff
Style: Add period before </param> and </exception> doc tags (#8553) 2018-12-28 16:39:06 +05:00
Ilya 871ce5696d
Style: Add period before returns doc tag (#8535)
- add period before "</returns>" doc tag
- remove extra space before "</returns>" doc tag
- convert first char after "<returns>" doc tag to upper case
2018-12-25 21:43:03 +05:00
Ilya 42ba9d22ce
Style: Change 'Object' to 'object' (#8522) 2018-12-24 12:01:44 +05:00
Steve Lee 4af3068566 Code cleanup: Add space after closing brace where needed (#8530)
* Update TestService

* Update WebListener

* Update Controllers

* Update ExpTest

* Update MyApp

* Update Logic

* Update Logic

* Update MyApp

* Update Microsoft.Management.Infrastructure.CimCmdlets

* Update Microsoft.PowerShell.Commands.Diagnostics

* Update Microsoft.PowerShell.ScheduledJob

* Update Microsoft.WSMan.Management

* Update Microsoft.WSMan.Runtime

* Update ResGen

* Update TypeCatalogGen

* Update commands

* Update Eventing

* Update Reader

* Update utility

* Update ShowCommand

* Update trace

* Update WebCmdlet

* Update Common

* Update CoreCLR

* Update common

* Update format-object

* Update format-wide

* Update out-file

* Update out-printer

* Update out-string

* Update OutGridView

* Update LocalAccounts

* Update Commands

* Update security

* Update CoreCLR

* Update DscSupport

* Update engine

* Update help

* Update logging

* Update namespaces

* Update security

* Update utils

* Update config

* Update perfCounters

* Update tracing

* Update cmdletization

* Update other

* Update cim

* Update xml

* Update CoreCLR

* Update common

* Update DefaultFormatters

* Update out-console

* Update out-textInterface

* Update DisplayDatabase

* Update Utilities

* Update COM

* Update ComInterop

* Update CommandCompletion

* Update debugger

* Update ExperimentalFeature

* Update hostifaces

* Update interpreter

* Update lang

* Update Modules

* Update parser

* Update runtime

* Update client

* Update commands

* Update common

* Update fanin

* Update server

* Update WireDataFormat

* Update Binding

* Update Operations

* Update interface

* Update cmdletization

* Update cim

* Update management

* Update WindowsTaskbarJumpList

* Update msh
2018-12-24 11:20:06 +05:00
Ilya 4fc784e840 Bulk update code base to put 'null' on the right-hand-side of a comparison expression (#6949) 2018-06-25 14:37:09 -07:00
Steve Lee c1c5344a88 Update copyright and license headers (#6134)
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files.

Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks.

Separate PR coming to update contribution document for new source files: #6140

Manually reviewed each change.

Fix #6073
2018-02-13 09:23:53 -08:00
Steve Lee 4bc52d2358 Use consistent '(c)' for copyright symbol (#5210)
- Remove the year about copyright
- Fix casing of `All rights reserved`
- Replace Unicode characters representing single quote with a single quote
2017-10-26 14:12:19 -07:00
Jason Shirk 02b5f357a2 Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
Josh Soref 857def02cc spelling: debug, assert... 2016-08-28 21:46:20 +00:00
Josh Soref eb3fd7ae6c Spelling comments (#2066)
* spelling: comments in src/Microsoft.Management.Infrastructure.CimCmdlets

* spelling: comments in src/Microsoft.PackageManagement.ArchiverProviders

* spelling: comments in src/Microsoft.PackageManagement.CoreProviders

* spelling: comments in src/Microsoft.PackageManagement.MetaProvider.PowerShell

* spelling: comments in src/Microsoft.PackageManagement.MsiProvider

* spelling: comments in src/Microsoft.PackageManagement.MsuProvider

* spelling: comments in src/Microsoft.PackageManagement.NuGetProvider

* spelling: comments in src/Microsoft.PackageManagement.PackageSourceListProvider

* spelling: comments in src/Microsoft.PackageManagement

* spelling: comments in src/Microsoft.PowerShell.Activities

* spelling: comments in src/Microsoft.PowerShell.Commands.Diagnostics

* spelling: comments in src/Microsoft.PowerShell.Commands.Management

* spelling: comments in src/Microsoft.PowerShell.Commands.Utility

* spelling: comments in src/Microsoft.PowerShell.ConsoleHost

* spelling: comments in src/Microsoft.PowerShell.Core.Activities

* spelling: comments in src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext

* spelling: comments in src/Microsoft.PowerShell.CoreCLR.Eventing

* spelling: comments in src/Microsoft.PowerShell.Diagnostics.Activities

* spelling: comments in src/Microsoft.PowerShell.GraphicalHost

* spelling: comments in src/Microsoft.PowerShell.LocalAccounts

* spelling: comments in src/Microsoft.PowerShell.Management.Activities

* spelling: comments in src/Microsoft.PowerShell.PSReadLine

* spelling: comments in src/Microsoft.PowerShell.PackageManagement

* spelling: comments in src/Microsoft.PowerShell.ScheduledJob

* spelling: comments in src/Microsoft.PowerShell.Security.Activities

* spelling: comments in src/Microsoft.PowerShell.Security

* spelling: comments in src/Microsoft.PowerShell.Utility.Activities

* spelling: comments in src/Microsoft.PowerShell.Workflow.ServiceCore

* spelling: comments in src/Microsoft.WSMan.Management.Activities

* spelling: comments in src/Modules

* spelling: comments in src/Schemas

* spelling: comments in src/libpsl-native

* spelling: comments in src/powershell-native

* spelling: comments in build.psm1

* spelling: comments in src/System.Management.Automation/CoreCLR

* spelling: comments in src/System.Management.Automation/DscSupport

* spelling: comments in src/System.Management.Automation/cimSupport

* spelling: comments in src/System.Management.Automation/commands

* spelling: comments in src/System.Management.Automation/engine/Modules
2016-08-26 13:46:03 -07:00
PowerShell Team bc6990f46b Copy cs files from [SD:717473]
commit 96877403a6a2eb9dcbee0f71bbc6dfb6e61dd9a3

- Microsoft.WSMan.Runtime
- Microsoft.WSMan.Management
- Microsoft.Management.Infrastructure.CimCmdlets
2016-07-14 13:46:29 -07:00