Dongbo Wang
b195088c5a
Revert some of the interpolated string changes ( #19018 )
2023-01-25 09:46:47 -08:00
CarloToso
e815e57601
Use interpolated strings 6 ( #18983 )
2023-01-20 16:59:55 +05:00
xtqqczze
dd884459c1
Use generic GetValues<T>, GetNames<T> enum methods ( #18391 )
2022-10-27 09:42:33 -07:00
Steve Lee
6e36446b6f
Make experimental feature PSCleanBlock stable ( #18043 )
2022-09-07 10:26:21 -07:00
Dongbo Wang
7cc9c87473
Do not generate clean block in proxy function when the feature is disabled ( #17112 )
2022-04-05 12:00:41 -07:00
Dongbo Wang
bbb11dd07a
Fix the clean block for generated proxy function ( #16827 )
2022-02-03 11:39:08 -08:00
Dongbo Wang
a32700a1c1
Add clean block to script block as a peer to begin, process, and end to allow easy resource cleanup ( #15177 )
2021-10-11 14:49:09 -07: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
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
006fe4d2dd
Enable IDE0082: ConvertTypeOfToNameOf ( #14042 )
...
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0082
2020-11-16 19:56:07 +05:00
xtqqczze
b521b858ad
Fix RCS1049: Simplify boolean comparison ( #13994 )
...
* Fix RCS1049: Simplify boolean comparison
https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1049.md
Related https://github.com/dotnet/runtime/pull/44564
2020-11-13 09:39:25 +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
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
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
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
David Smatlak
3923ca1728
Fixes FWLinks for PS7 online help documents ( #11071 )
2019-12-02 10:25:56 -08:00
Ilya
bd6fdae735
Cleanup: sort usings ( #9490 )
2019-04-30 10:25:11 +05: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
56569b9315
Style: Replace String.IsNullOrEmpty with string.IsNullOrEmpty ( #8557 )
2018-12-31 15:10:15 +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
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
Meir Blachman
b7b386d209
Remove comments after closing brackets ( #8344 )
2018-12-08 21:53:30 +05:00
Ilya
5d03e1653a
Remove empty xml comment lines ( #7401 )
2018-08-01 10:39:13 +05:00
Ilya
e177fcaef6
CodeFactor code style cleanup: replace literal empty strings with 'string.Empty' ( #6950 )
2018-06-12 12:30:10 -07:00
Dongbo Wang
11631e7412
Clean up 'GetTypeInfo()' calls in engine folder ( #6634 )
...
'GetTypeInfo()' were added when porting PowerShell to early version of .NET Core (prior .NET Core 1.0).
Most properties and methods in 'System.Type' were missing at that time. Now the call is not needed anymore and should be removed.
2018-04-13 15:10:10 -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
Dongbo Wang
db33d90479
First round of workflow cleanup ( #4777 )
...
This round of cleanup focuses on the following areas
- Tab completion code
- InitialSessionState
- Compiler/MiscOps
- Utils/SessionStateFunctionAPIs
Changes in the rest affected files are mainly some corresponding changes due to the cleanup work in the above areas.
2017-09-11 08:55:13 -07:00
Paul Higinbotham
7fa0dd0549
Fix for implicit remote regression in restricted session ( #4222 )
2017-07-14 12:28:22 -07:00
Jason Shirk
02b5f357a2
Remove trailing whitespace ( #3001 )
2017-01-16 13:31:14 -08:00
Sergei Vorobev
3363b248a0
Fix code errors found by PVS-Studio ( #2695 )
...
* Fix errors found by PSV-studio analyzer
http://www.viva64.com/en/b/0447/
* Remove old redundent comment
errorAsts is passed by ref
2016-11-17 11:20:04 -08:00
Dongbo Wang
58a2ba730d
Merge pull request #2046 from xiaoyinl/use-https-links
...
Use HTTPS links for go.microsoft.com
2016-09-01 17:23:09 -07:00
Josh Soref
c59e992c25
spelling: comments in src/System.Management.Automation/engine
2016-08-28 05:44:55 +00:00
xiaoyinl
f538eeb416
Use HTTPS links for go.microsoft.com
...
I replace all occurrences of http://go.microsoft.com with https://go.microsoft.com in text files.
2016-08-23 21:21:31 -04:00
PowerShell Team
85d6e9f022
Refactoring - adjust modifiers declaration order
2016-08-03 12:14:28 -07:00
PowerShell Team
ae8d2ed794
Refactor - convert to auto-property
...
Mostly using R# to automatically refactor, with some manual
fixups where it wouldn't work automatically (e.g. xml comments
on fields) or some it seemed to miss.
Some minor code reformatting was also done on properties near
other stuff I was manually inspecting.
2016-08-03 12:14:28 -07:00
PowerShell Team
403ae3f53f
Initial run of code formatter
...
I (Jason Shirk) ran https://github.com/dotnet/codeformatter with the default rules, basically:
codeformatter /nocopyright "/c:DEBUG,UNIX,CORECLR" @files.rsp
This caused a few problems building, which were fixed up manually.
Notable changes:
`this.` is removed unless needed to disambiguate.
private instance fields are renamed to have a `_` prefix.
private static fields are renamed to have a `s_` prefix.
I left some projects alone (like PackageManagement) and also left some generated code alone.
2016-08-01 15:57:03 -07:00
PowerShell Team
60b3b304f2
Move files from psl-monad submodule to super-project
...
This commit uses psl-monad branch source-depot 7209cb9
And corresponds to [SD:688741]
2016-03-30 17:16:23 -07:00