Dmitry Volodin
1779175935
Use null-coalescing assignment in the rest of /engine ( #17729 )
2022-07-26 12:31:14 -07:00
James Truher [MSFT]
65d8f11aeb
Update telemetry collecting with a few changes ( #17304 )
2022-05-16 17:10:51 -07:00
Dongbo Wang
e1f52dda77
Refactor module assembly loading logic to allow the whole module to be loaded in a custom ALC ( #16889 )
2022-02-23 15:01:12 -08:00
Dongbo Wang
cce64f49de
Report error when PowerShell built-in modules are missing ( #16628 )
2022-01-12 10:02:03 -08:00
Dongbo Wang
e2ee8e7e1f
Clean up code regarding AppDomain.CreateDomain and AppDomain.Unload ( #15554 )
2021-06-10 09:16:05 -07:00
Ilya
91e7298fd8
Use static lambda keyword ( #15154 )
2021-04-12 12:44:05 -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
c909541b77
Mark private members as static part 9 ( #14234 )
...
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822
2020-11-27 13:10:43 +05:00
xtqqczze
d05530fbd0
Wrap and name LoadBinaryModule arguments ( #14193 )
2020-11-21 19:34:52 +05:00
xtqqczze
1386d0054a
Remove LINQ Count method uses ( #13545 )
2020-11-11 09:39:59 -08:00
xtqqczze
d6727dcf1b
Simplify delegate creation ( #13578 )
...
* Autofix RCS1048
* Autofix RCS1021
2020-11-05 22:25:26 +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
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
52ecb6d18e
Run dotnet-format to improve formatting of source code ( #13503 )
2020-11-04 11:13:56 -08: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
0d5d017f0f
Code redundancy fixes ( #12916 )
...
* Autofix `RCS1036: Remove redundant empty line`
* Autofix `RCS1037: Remove trailing white-space`
* Autofix `RCS1033: Remove redundant boolean literal`
* Autofix: `RCS1038: Remove empty statement`
* Autofix `RCS1041: Remove empty initializer`
* Autofix `RCS1097: Remove redundant 'ToString' call
* Autofix: `RCS1420: Operator is unnecessary`
2020-06-11 11:25:35 +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
Andrew
0c695376b7
Fix WinCompat module loading to treat Core edition modules higher priority ( #12269 )
2020-04-16 16:57:55 -07:00
Steve Lee
f23be437af
Fix terms checker issues ( #12189 )
2020-03-24 11:38:45 -07:00
Steve Lee
b7cb335f03
Update copyright notice to latest guidance ( #12190 )
2020-03-24 11:08:37 -07:00
Andrew
d2cb3c3636
Sync current directory in WinCompat remote session ( #11809 )
2020-02-11 11:44:30 -08:00
Andrew
43c88a4ff1
Add WinCompat deny list support using a setting in powershell.… ( #11726 )
2020-02-04 16:33:26 -08:00
xtqqczze
a34d0f3e80
Reformat code according to EditorConfig rules ( #11681 )
2020-01-31 14:56:22 -08:00
Steve Lee
ed1f6e3144
Make approved features non-experimental ( #11303 )
2019-12-10 15:41:43 -08:00
Andrew
0c46e3e71d
Added WindowsPS version check for WinCompat ( #11148 )
2019-12-10 10:40:13 -08:00
Andrew
f8a321ae2b
Fix error-reporting in some WinCompat scenarios ( #11259 )
2019-12-09 15:20:40 -08:00
David Smatlak
3923ca1728
Fixes FWLinks for PS7 online help documents ( #11071 )
2019-12-02 10:25:56 -08:00
Andrew
b218e6f6cc
Support using non-compatible Windows PowerShell modules in PowerShell Core ( #10973 )
2019-11-18 10:44:55 -08:00
James Truher [MSFT]
fe2cc6aca8
Additional Telemetry - Implementation of RFC0036 ( #10336 )
2019-08-15 16:13:53 -07:00
Ilya
bd6fdae735
Cleanup: sort usings ( #9490 )
2019-04-30 10:25:11 +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
Dongbo Wang
c2dfae8ccb
Fix 'FixupFileName' to not load resolved assembly during module discovery ( #8634 )
2019-01-15 16:22:25 -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
56569b9315
Style: Replace String.IsNullOrEmpty with string.IsNullOrEmpty ( #8557 )
2018-12-31 15:10:15 +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
Dongbo Wang
289981a017
Change 'String' to 'string' for simple references ( #8519 )
2018-12-22 14:26:06 +05:00
Dongbo Wang
8d27eb44b1
Style: Remove extra space before colon in named parameters ( #8504 )
2018-12-21 10:26:34 -08:00
Meir Blachman
b7b386d209
Remove comments after closing brackets ( #8344 )
2018-12-08 21:53:30 +05:00
Travis Plunk
79f21b41de
Consolidation of all Windows PowerShell work ported to PSCore6 ( #8257 )
...
Consolidation of all Windows PowerShell work ported to PSCore6
* Added ps1 file import restriction. Refactored InvokeLanguageModeTestingSupportCmdlet to HelpersSecurity module
* JEA loop back fix. Debugger running commands in CL mode.
* Support for new AMSI codes. Changed to use AMSI buffer API. Unhandled exception fix.
* Fixes for module bugs while running in ConstrainedLanguage mode
* Untrusted input tracking work
* Configuration keyword bug fix, PSRP protocol version check for reconstruct reconnect, Sharing InitialSessionState in runspace pool.
* Restricted remote session in UMCI, Applocker detection collision, Help command exposing functions, Null reference exception fix.
* Added mitigation for debugger function exposure
2018-11-13 16:16:29 -08:00
Robert Holt
5d06fba366
Refactor module version/GUID comparison logic ( #7125 )
2018-11-01 13:41:51 -07:00
Robert Holt
c94fc31f97
Enforce the 'CompatiblePSEditions' check for modules from the legacy 'System32' module path ( #7183 )
...
- Add `%WINDIR%\System32\WindowsPowerShell\v1.0\Modules` (Windows PowerShell $PSHOME) to the end of the default PSCore 6 module path (i.e. the module path as initially set at startup).
- Cause an error to be thrown by `Import-Module` when a module with `CompatiblePSEditions` not containing `"Core"` is being loaded from the 'System32' module path.
- Suppress output of modules listed by `Get-Module -ListAvailable` from Windows PowerShell $PSHOME when `CompatiblePSEditions` does not contain `"Core"`.
- Introduce the `-SkipCompatibilityCheck` switch parameter on both `Import-Module` and `Get-Module` to respectively allow importing incompatible modules and listing incompatible modules.
- Adds a `PSEdition` column to the `PSModuleInfo` table view format.
- Ensures that completions are not given for incompatible modules on the System32 module path.
2018-07-16 16:58:40 -07: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
Ilya
e177fcaef6
CodeFactor code style cleanup: replace literal empty strings with 'string.Empty' ( #6950 )
2018-06-12 12:30:10 -07:00
Steve Lee
c2accff785
Support importing module paths that end in trailing directory separator ( #6602 )
2018-04-13 08:07:50 +04:00
Dongbo Wang
d1cf82ec20
Clean up workflow logic in the module loading component ( #6523 )
...
Clean up workflow logic in the module loading component.
Workflow module is not supported in PSCore.
Currently, Import-Module throws a terminating error when seeing .xaml modules. After the change, Import-Module throws a non-terminating error when seeing .xaml modules.
2018-04-02 16:18:56 -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
Steve Lee
efbdea5cfe
Fix importing remote module using version filters and added tests ( #4900 )
...
- Add tests for remote import-module
- Fix issue with remotely importing module where it was checking the version filter incorrectly against the proxy module
- The filters are applied when importing the module remotely
- After proxy module is generated it always has a module version of 1.0, so the filters will always fail when importing the proxy locally
2017-09-25 21:37:56 -07:00