xtqqczze
68821932c5
Fix RCS1215: Expression is always equal to true/false ( #14356 )
...
* Fix RCS1215: Expression is always equal to true/false
2021-01-19 16:03:59 +05:00
xtqqczze
3c7f4b573e
Fix IDE0090: Simplify new expression part 7 ( #14341 )
...
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0090
2021-01-09 12:46:13 +05:00
xtqqczze
b7a431a442
Fix SA1504: All accessors should be single-line or multi-lin ( #14241 )
...
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1504.md
2021-01-09 12:44:38 +05:00
xtqqczze
a8213b54b3
Remove redundant local assignment in AclCommands ( #14358 )
2020-12-10 11:36:48 -08:00
xtqqczze
41ab20cce3
Mark applicable structs as readonly and use in-modifier ( #13919 )
2020-12-09 11:36:48 -08:00
xtqqczze
d5b0264374
Use consistent spacing in xml documentation tags ( #14231 )
2020-11-25 22:58:52 +05:00
xtqqczze
c7bdb24ff3
Mark local variable as const ( #13217 )
...
RCS1118: Mark local variable as const https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1118.md
2020-11-24 20:06:16 +05:00
xtqqczze
8c8487cc78
Fix CA1822: Mark members as static part 6 ( #14229 )
...
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822
2020-11-24 12:28:19 +05:00
xtqqczze
eafeab554b
Remove unnecessary usings part 8 ( #14072 )
...
* Sorting usings
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005
2020-11-21 20:03:33 +05:00
xtqqczze
99a49e0eab
Enable SA1131: Use readable conditions ( #14132 )
...
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1131.md
2020-11-20 17:26:46 +05:00
xtqqczze
4d2965af29
Autofix SA1518: The code must not contain extra blank lines at the end of the file ( #13574 )
2020-11-11 12:15:20 +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
3ba61069b8
Enable IDE0054: Use compound assignment ( #13546 )
...
* Autofix IDE0054
https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0054-ide0074
2020-11-05 09:48:13 +05:00
xtqqczze
03a0ef26e6
Fix RCS1098: Constant values should be on right side of comparisons ( #13833 )
...
* Fix RCS1098: Constant values should be on right side of comparisons
https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1098.md
2020-11-05 09:13:12 +05:00
xtqqczze
25a769d75d
Fix IDE0044: MakeFieldReadonly part 8 ( #13891 )
...
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0044
2020-11-02 12:24:43 +05:00
Dongbo Wang
10237bdeb3
Update PowerShell to build against dotnet 5.0-RC.1 ( #13643 )
2020-09-23 14:04:01 -07: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
16f0b74187
Cleanup: Remove redundant empty lines ( #13404 )
2020-08-25 11:29:26 -07:00
Robert Holt
ef7c7d60a6
Revert "Add password confirmation in Get-Credential ( #12782 )" ( #13372 )
...
This reverts commit a6bd47f031
.
2020-08-07 12:11:16 +05:00
Shri Ram K S
9ceee3e52f
Fix Get-Acl -LiteralPath "HKLM:Software\Classes\*" behaviour ( #13107 )
...
* Fix #11566 bug
Add pester test for Get-Acl cmdlet
* Replace -pending parameter with -skip
* Fix test failing in Linux and MacOS
2020-07-31 16:44:45 -07: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
Shri Ram K S
a6bd47f031
Add password confirmation in Get-Credential ( #12782 )
...
* Add parameter -ReEnterPassword to prompt user to re-enter the password for confirmation
* Add new public overload function PromptForCredential
2020-07-22 19:13:42 +05:00
xtqqczze
8901d2a509
Cleanup: use int
instead of uint
in places where it's more appropriate ( #13141 )
2020-07-13 07:10:57 -07:00
Ilya
73e8427586
Bring back Certificate provider parameters ( #10622 )
2020-06-02 11:44:16 -07:00
xtqqczze
c233b30a6a
Reorder modifiers according to preferred order ( #12864 )
...
# PR Summary
Reformat using `csharp_preferred_modifier_order`.
## PR Context
Split change from #11773
## 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-06-02 16:49:25 +00:00
xtqqczze
e93381e73e
Add readonly modifier to internal static members ( #11777 )
...
# PR Summary
* Add readonly modifier to internal static members.
## 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-31 05:10:22 +00: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
xtqqczze
9212aac0fa
Use nameof operator ( #12716 )
...
# PR Summary
Using *Roslynator Command Line Tool version 0.1.0.4*
* Fix RCS1015:
* `"argument"` → `nameof(argument)`
* `enum.ToString()` → `nameof(enum)`
[RCS1015.log](https://github.com/PowerShell/PowerShell/files/4646102/RCS1015.log )
## PR Context
<!-- Provide a little reasoning as to why this Pull Request helps and why you have opened it. -->
## 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-19 18:57:52 +00:00
Steve Lee
b7cb335f03
Update copyright notice to latest guidance ( #12190 )
2020-03-24 11:08:37 -07:00
Ilya
59ad53181e
Remove old dead code from FullCLR ( #11886 )
2020-02-20 11:39:15 -08:00
xtqqczze
c4e144b13e
Replace use of throw GetExceptionForHR with ThrowExceptionForHR ( #11640 )
...
`System.Runtime.InteropServices.Marshall.GetExceptionForHR` may not return an exception. Instead of `throw GetExceptionForHR` we can use `ThrowExceptionForHR`.
Fix warnings `CS8597:Thrown value may be null.`
2020-01-31 10:13:12 +05:00
xtqqczze
70d9ed4d55
Remove Unicode BOM from text files ( #11546 )
2020-01-11 12:15:34 +05:00
Steve Lee
03f10f052d
Add -AsPlainText
to ConvertFrom-SecureString
( #11142 )
2019-12-11 15:40:41 -08:00
David Smatlak
3923ca1728
Fixes FWLinks for PS7 online help documents ( #11071 )
2019-12-02 10:25:56 -08:00
Ilya
d58a82ad19
Cleanup: use the built-in type alias ( #10882 )
2019-11-06 08:47:32 +05:00
Ilya
fbf4f6c11b
Replace ArrayList with List<T> ( #10333 )
2019-09-05 10:54:18 -07:00
Christoph Bergmeister [MVP]
fe56f9d902
Upgrade .Net Core 3 SDK from preview5 to preview6 and related out of band Nuget packages from 2.1 to 3.0-preview6 ( #9888 )
2019-07-09 14:35:08 -07:00
Ilya
fae03446dc
Fix wrong comparison in CertificateProvider ( #9987 )
2019-06-24 10:24:49 -07:00
Steve Lee
a96b4c0404
Update use of "PowerShell Core" to just "PowerShell" ( #9513 )
2019-05-10 15:34:27 -07:00
Ilya
bd6fdae735
Cleanup: sort usings ( #9490 )
2019-04-30 10:25:11 +05:00
Ilya
1c8a89bcdc
Run CodeFormatter for Security module ( #9399 )
2019-04-19 08:28:29 +05:00
Rene Hernandez
75da390d1e
Add ItemSeparator
and AltItemSeparator
properties in ProviderInfo
( #8587 )
...
Add two properties in `ProviderInfo` class: `ItemSeparator` and `AltItemSeparator`.
On windows, the default values for those two properties are `ItemSeparator = '\'` and `AltItemSeparator = '/'`.
On unix, the default values for those two properties are `ItemSeparator = '/'` and `AltItemSeparator = '\'`.
Registry provider is the only exception, both properties for it have the value `\`.
2019-04-02 09:59:36 -07:00
Staffan Gustafsson
6c049d0cb3
Using supported syntax for restoring warnings - VS2019 complains about enable. ( #9107 )
2019-03-11 14:42:41 +05:00
Ilya
759c4abde8
Use Type.EmptyTypes
and Array.Empty<T>()
to replace our custom code of the same functionality ( #9042 )
2019-03-09 17:53:31 -08: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