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
xtqqczze
fde00de77f
Update docs.microsoft.com links ( #12653 )
...
# PR Summary
* remove explicit en-us from links
* remove view parameter
## PR Context
follow-up #7013
## 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 )**
- [ ] 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-15 03:29:43 +00:00
Steve Lee
b7cb335f03
Update copyright notice to latest guidance ( #12190 )
2020-03-24 11:08:37 -07:00
Steve Lee
db370dcc79
Enable pwsh to work on Windows systems where mpr.dll and STA is not available ( #11748 )
2020-02-04 10:52:19 -08:00
Ilya
58d53b53fd
Fix FileSystem provider error message ( #11741 )
2020-02-03 13:13:48 -08:00
Robert Holt
8ad4997f3c
Fix error message during symlink deletion ( #11331 )
2020-01-30 14:46:44 -08:00
Ilya
c17d5a7a27
Review currentculture ( #11044 )
...
Replace StringComparison.CurrentCulture with StringComparison.Ordinal where it is used without the need.
2019-11-22 08:37:42 +05:00
Steve Lee
e185f89591
Handle exception if enumerating files fails when rebuilding path to have correct casing ( #11014 )
2019-11-12 08:53:33 -08:00
Ilya
d58a82ad19
Cleanup: use the built-in type alias ( #10882 )
2019-11-06 08:47:32 +05:00
Steve Lee
4b8462766f
Fix setting original path of filesystem object to not have extra trailing slash ( #10959 )
2019-11-02 22:09:08 +05:00
Steve Lee
a3d73d751f
Handle IO Exception as non-terminating ( #10950 )
2019-11-01 10:06:40 -07:00
Steve Lee
229762737d
Fix GetCorrectCasedPath() to first check if any system file entries is returned before calling First() ( #10930 )
2019-10-31 11:42:23 -07:00
Ilya
70a74fbfc8
Replace api-ms-win-core-file-l1-2-2.dll with Kernell32.dll for FindFirstStreamW and FindNextStreamW APIs ( #10680 )
2019-10-03 17:37:05 -07:00
Ilya
91bf34679c
Read special reparse points without accessing it ( #10662 )
...
* Enhance enum FileDesiredAccess with zero value GenericZero
* Use the GenericZero as desired access mode to read reparse point without access it
From docs:
If desired access is zero, the application can query certain metadata such as file, directory, or device attributes without accessing that file or device, even if GENERIC_READ access would have been denied
2019-10-03 19:41:18 +05:00
Ilya
79e80a8e06
Refactor reparse tag checks ( #10431 )
...
Reparse tag consts is absolute numbers, not flags so we should use a comparison instead of bit operations
2019-09-17 10:48:07 +05:00
Steve Lee
b0a3755b17
Minor fix for recursion into OneDrive - Change FindFirstFileEx() to use SafeFindHandle type ( #10405 )
2019-08-29 14:50:54 -07:00
Steve Lee
5974afaa8d
Add support for AppX reparse points ( #10331 )
2019-08-13 17:45:41 -07:00
Steve Lee
5bc3d15a30
Check if a reparsepoint is a symlink before trying to get target ( #9895 )
2019-07-08 11:40:53 +05:00
Ilya
dd7e45fe2e
Code cleanup: use IndexOf(char) overload ( #9722 )
...
- Use IndexOf(char) overload instead of IndexOf(string) to benefit from Ordinal search
- Replace IndexOf with Contains to get more understandable code
- Use StringComparison.Ordinal for ASCII chars
2019-06-26 11:02:07 +05:00
Ilya
74c87ab20b
Cleanup: Use EndsWith(char) and StartsWith(char) ( #9994 )
2019-06-25 11:02:31 -07:00
Steve Lee
981c990d74
Make UseAbbreviationExpansion and TempDrive official features ( #9872 )
2019-06-13 13:05:37 -07:00
Ilya
8bd16d13cb
Remove IsSymLink() P/Invoke on Unix ( #9534 )
2019-05-07 13:31:54 -07:00
Steve Lee
1d28144e99
Enable recursion into OneDrive ( #9509 )
2019-05-06 17:28:00 -07:00
Steve Lee
346ab8c9d4
Change MatchType for EnumerationOptions to be Win32 ( #9529 )
2019-05-06 17:20:08 -07:00
Ilya
bd6fdae735
Cleanup: sort usings ( #9490 )
2019-04-30 10:25:11 +05:00
Ilya
ceed73d737
Run Codeformatter for SMA ( #9402 )
2019-04-24 19:27:22 +05:00
Andrew
095be4655e
Return correct casing of filesystem path during normalization ( #9250 )
...
* return correct casing of filesystem path during normalization
* handle UNC case
* handle case to add trailing separator back
* add support for NTFS streams syntax
* add case-sensitive test
* only apply correct casing to directories
* handle 8.3 path syntax
* fix short path processing
2019-04-23 13:31:43 -07: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
Steve Lee (POWERSHELL)
586084fb6b
fix short path processing
2019-04-01 12:05:45 -07:00
Steve Lee (POWERSHELL)
11f93c5a2b
handle 8.3 path syntax
2019-04-01 10:41:03 -07:00
Steve Lee (POWERSHELL)
9e7fe9a9d1
only apply correct casing to directories
2019-03-31 12:06:38 -07:00
Steve Lee (POWERSHELL)
f0264d0147
add support for NTFS streams syntax
2019-03-30 08:40:32 -07:00
Steve Lee (POWERSHELL)
a3f80e7e9b
handle case to add trailing separator back
2019-03-30 07:29:18 -07:00
Steve Lee (POWERSHELL)
bc4b1085d9
handle UNC case
2019-03-29 22:48:11 -07:00
Steve Lee
6bc2b55fdf
return correct casing of filesystem path during normalization
2019-03-29 13:22:52 -07:00
Reece Dunham
df37094092
Minor FileSystemProvider cleanup ( #9182 )
2019-03-24 22:07:25 +05:00
Staffan Gustafsson
9983297254
Removing Hardlink from Mode property in default file system format ( #8789 )
2019-03-12 15:49:16 -07:00
Reece Dunham
4cd6a3beb7
Fix CodeFactor brace style issues in FileSystemProvider ( #8992 )
2019-02-28 20:00:23 +05:00
Ilya
11ae24fcad
Cleanup dllimport ( #8847 )
2019-02-27 08:33:46 +05:00
Ilya
ff3edaa2e3
Fix lgtm issues ( #8843 )
...
Add some null checks
Remove unused code
2019-02-13 16:51:05 +05:00
Reece Dunham
0606c27cb0
Fix many instances of CodeFactor style issue A single-line comment must not be followed by a blank line ( #8825 )
2019-02-05 09:47:19 -08:00
Stéphane BARIZIEN
d032cb2c87
Expose file attributes of OneDrive placeholders ( #8745 )
2019-02-04 12:11:46 -08:00
Aditya Patwardhan
6ccbebda27
Improve check for developer mode by checking minimum required build number ( #8749 )
...
* Improve check for developer mode by checking minimum required build number
The test would fail if the developer mode is enabled but the machine has an older build than the minimum required build.
The change adds a check for the build version in the test.
* Update test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1
2019-01-25 13:14:29 -08:00
xtqqczze
863528881f
Use https in URLs where available ( #8622 )
...
Use https in URLS across the repository where the domain serves content by https.
2019-01-24 12:50:11 -08:00
Steve Lee
7e2cd7954f
Add the experimental feature for creating 'Temp:\' drive when FileSystemProvider initializes ( #8696 )
...
Adds Experimental Feature called `PSTempDrive` that, if enabled, creates a PSDrive called `Temp:` that maps to `[System.IO.Path]::GetTempPath()`.
2019-01-23 13:53:04 -08:00
Steve Lee
f7c25e8f7c
Update code to use single method to check if path is UNC ( #8680 )
...
update all checks if path is unc to one method
2019-01-23 09:37:45 -08:00
Ilya
d80154430d
Style: Change first char to upper in summary comments ( #8597 )
2019-01-09 13:07:40 -08:00
Steve Lee
d6000fdea8
Allow Windows users in developer mode to create symlinks without elevation ( #8534 )
2019-01-08 10:43:24 -08:00
Ilya
f95dae55f7
Style: Use the type aliases 'char' and 'bool' instead of 'Char' and 'Boolean' ( #8572 )
2019-01-07 11:40:07 -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