Commit Graph
1043 Commits
Author SHA1 Message Date
xtqqczze 03a58c4186 Use is not syntax part 2 (#13338) 2020-11-05 10:23:50 +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 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 47c92090db Enable CA1068: CancellationToken parameters must come last (#13867)
* Enable CA1068: CancellationToken parameters must come last
2020-11-05 09:08:28 +05:00
xtqqczze 4ed88dedbc Fix IDE0044: MakeFieldReadonly part 12 (#13967)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0044
2020-11-05 08:36:23 +05:00
xtqqczze 52ecb6d18e Run dotnet-format to improve formatting of source code (#13503) 2020-11-04 11:13:56 -08:00
xtqqczze 1d7a93c2e0 Enable CA1825: Avoid zero-length array allocations (#13961) 2020-11-04 08:56:26 +05:00
xtqqczze 4b9f9dc457 Enable CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder (#13926)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1830
2020-11-02 08:46:40 +05:00
Pat Leong 72608fb829 Use Environment.CurrentManagedThreadId (#13803) 2020-10-30 12:42:17 +05:00
xtqqczze 2c1546cd47 Enable CA1836: Prefer IsEmpty over Count when available (#13877)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1836
2020-10-30 12:15:29 +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 69ded7777a Use span-based string.Concat inatead of string.Substring (#13500)
Before:

```csharp
str1 + str2.Substring(...) + str3
```

After:
```csharp
string.Concat(str1, str2.AsSpan(...), str3)
```
2020-10-28 13:01:05 +05:00
krishnayalavarthiandKrishna Yalavarthi c8feddb214 Make dispose in TranscriptionOption idempotent (#13839)
Co-authored-by: Krishna Yalavarthi <kryalava@microsoft.com>
2020-10-23 11:36:53 -07:00
Jordan Borean 5fe17baa3b Relax further SSL verification checks for WSMan on non-Windows hosts with verification available (#13786) 2020-10-16 09:57:42 -07:00
Robert Holt 56ad41b143 Add missing PSToken entries (#13779) 2020-10-14 11:02:54 -07:00
Dongbo Wang 2728574df7 Rename 'Get-Subsystem' to 'Get-PSSubsystem' and fix two minor issues (#13765) 2020-10-14 09:42:37 -07:00
Xavier Hahn cf251a97d2 Change default fallback encoding for GetEncoding in Start-Transcript (#13732) 2020-10-09 10:43:31 -07:00
Thomas Nieto 5aca8637ae Add Get-ExperimentalFeature OutputType attribute (#13738) 2020-10-08 13:32:19 -07:00
Steve Lee 16cc9aaaf8 Fix blocking wait when starting file associated with a Windows application (#13750)
* Fix blocking wait when starting file associated with a Windows application in elevated process

* refactor check if app is WindowsApp
2020-10-07 12:58:24 +05:00
Steve Lee fc8ca61b3d Revert "Change PSNativePSPathResolution to not be Experimental" (#13734)
* Revert "Change `PSNativePSPathResolution` to not be Experimental (#13522)"

This reverts commit 74c743d279.
2020-10-03 21:20:24 +05:00
Dongbo Wang 10237bdeb3 Update PowerShell to build against dotnet 5.0-RC.1 (#13643) 2020-09-23 14:04:01 -07:00
David Reis 3effa20410 Recognize CONOUT$ and CONIN$ as reserved device names (#13508) 2020-09-14 11:10:12 -07:00
Dongbo Wang ad88bd60fc Make a couple of fixes to ComInterop code as suggested by .NET team (#13533) 2020-09-08 09:19:13 -07:00
xtqqczze 88e706f3d7 Autofix RCS1068: Simplify logical negation (#13555) 2020-09-04 08:40:05 +05:00
xtqqczze 152456d7a0 Add single blank line after copyright header (#13486) 2020-09-02 08:15:16 +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 4e21101ba5 Use boolean instead of bitwise operators on bools (#13506)
* Autofix RCS1233: Use short-circuiting operator
https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1233.md
2020-09-02 08:07:49 +05:00
Tamás Vajk 0f02fd7f1d Fix erroneous assert (#13495) 2020-09-01 09:47:26 +05:00
xtqqczze 8f37cced70 Cleanup: remove duplicate words in comments (#13539) 2020-08-31 11:39:00 -07:00
Robert Holt 6a37eb9313 Update to .NET 5 preview 8 (#13530) 2020-08-31 10:38:05 -07:00
Ilya 4e2b6e9540 Process reparse points for Microsoft Store applications (#13481) 2020-08-27 11:51:19 -07:00
Aditya Patwardhan cb8165eeef Move PSNullConditionalOperators feature out of experimental (#13529) 2020-08-27 10:11:01 -07:00
Steve Lee 74c743d279 Change PSNativePSPathResolution to not be Experimental (#13522) 2020-08-27 12:08:52 +05:00
The Dumb 126d94218a Use field if property does not exist for ObRoot (#13375) 2020-08-25 14:35:43 -07:00
xtqqczze 16f0b74187 Cleanup: Remove redundant empty lines (#13404) 2020-08-25 11:29:26 -07:00
Dongbo Wang 44bb5861cb Avoid multiple enumerations of an IEnumerable<Expression> instance in Compiler.cs (#13491) 2020-08-21 10:28:16 -07:00
Dongbo Wang fc4c9cbfd7 Initial work of the subsystem plugin model (for minimal powershell) (#13186) 2020-08-20 17:41:44 -07:00
Steve Lee d67649c300 Fix $? to not be $false when native command writes to stderr (#13395) 2020-08-19 09:31:38 -07:00
xtqqczze d8f8f0a8bc Fix comparison of value type object to null (#13285) 2020-08-10 14:56:14 -07:00
xtqqczze dd85bd1178 Use 'is' operator instead of 'as' operator (#13287) 2020-08-10 09:07:31 +05:00
Dongbo Wang 4214800690 Refresh and enable the ComInterop code in PowerShell (#13304) 2020-08-07 16:24:10 -07:00
Steve Lee 511858a267 Make $ErrorActionPreference not affect stderr output of native commands (#13361) 2020-08-07 14:19:17 -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
Christopher Yeleighton 8626937ac4 Change "operable" to "executable" (#13281)
* Change "operable" to "executable" in a resource string
2020-08-06 13:02:43 +05:00
xtqqczze aa43d867af Switch to MIT license for files copied from Roslyn (#13305) 2020-08-05 10:51:57 -07:00
Dongbo Wang 63cf0c330c Allow explicitly specified named parameter to supersede the same one from hashtable splatting (#13162)
Allow explicitly specified named parameter to supersede the same one from hashtable splatting.
The work is done in parameter binder, so that parameters can be resolved to cover a parameter's official name, alias name, and unambiguous partial prefix name.

The changes covers covers Hashtable splatting in 3 scenarios:

- Cmdlet or advanced script invocation;
- Simple function invocation;
- ScriptBlock.GetPowerShell(...), where the script block contains command invocation only and uses Hashtable splatting.

Some code refactoring is done to ParameterBinderController to avoid redundant code being duplicated in CmdletParameterBinderController and ScriptParameterBinderController.
2020-08-05 10:59:53 +05:00
Joel Sallow (/u/ta11ow) 6aa08f9559 Improve BigInteger casting behaviours (#12629) 2020-08-04 10:45:36 +05:00
xtqqczze 4597b41396 Use is not syntax where appropriate and remove unnecessary parentheses (#13323) 2020-07-31 16:41:59 -07:00