Skip to content

Commit c473826

Browse files
authored
Merge branch 'PowerShell:main' into master
2 parents f977357 + 5ad99ba commit c473826

File tree

354 files changed

+19428
-13204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

354 files changed

+19428
-13204
lines changed

.config/tsaoptions.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"instanceUrl": "https://msazure.visualstudio.com",
3+
"projectName": "One",
4+
"areaPath": "One\\MGMT\\Compute\\Powershell\\Powershell",
5+
"notificationAliases": [ "[email protected]", "[email protected]" ],
6+
"codebaseName": "PowerShell_PowerShellEditorServices_20240313",
7+
"tools": [ "CredScan", "PoliCheck", "BinSkim" ]
8+
}

.devcontainer/Dockerfile

-32
This file was deleted.

.devcontainer/devcontainer.json

-14
This file was deleted.

.editorconfig

+170-26
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,19 @@ insert_final_newline = true
1010
[*.{cs}]
1111
indent_size = 4
1212
trim_trailing_whitespace = true
13+
file_header_template = Copyright (c) Microsoft Corporation.\nLicensed under the MIT License.
1314
csharp_space_before_open_square_brackets = true
1415
csharp_space_after_keywords_in_control_flow_statements = true
1516
csharp_space_before_open_square_brackets = false
17+
csharp_style_expression_bodied_constructors = when_on_single_line
18+
csharp_style_expression_bodied_methods = when_on_single_line
19+
csharp_style_expression_bodied_operators = when_on_single_line
20+
csharp_style_expression_bodied_properties = true
21+
csharp_style_expression_bodied_indexers = true
22+
csharp_style_expression_bodied_accessors = true
23+
csharp_style_expression_bodied_lambdas = when_on_single_line
24+
25+
# TODO: Fix silenced and suggested rules!
1626

1727
# CS0168: The variable 'var' is declared but never used
1828
dotnet_diagnostic.CS0168.severity = error
@@ -22,8 +32,43 @@ dotnet_diagnostic.CS0169.severity = error
2232
dotnet_diagnostic.CS0219.severity = error
2333
# CS0414: The private field 'field' is assigned but its value is never used
2434
dotnet_diagnostic.CS0414.severity = error
35+
# CS0618: A class member was marked with the Obsolete attribute
36+
dotnet_diagnostic.CS0618.severity = suggestion
37+
# CS0649: Uninitialized private or internal field declaration that is never assigned a value
38+
dotnet_diagnostic.CS0649.severity = error
39+
# CS1570: Parameter has no matching param tag in the XML comment
40+
dotnet_diagnostic.CS1570.severity = silent
41+
# CS1574: XML comment has cref attribute that could not be resolved.
42+
dotnet_diagnostic.CS1574.severity = silent
43+
# CS1591: Missing XML comment for publicly visible type or member
44+
dotnet_diagnostic.CS1591.severity = silent
45+
# CS1998: This async method lacks 'await' operators and will run synchronously
46+
dotnet_diagnostic.CS1998.severity = suggestion
47+
# CS4014: Consider applying the await operator to the result of the call
48+
dotnet_diagnostic.CS4014.severity = suggestion
49+
50+
# CA1067: Should override Equals because it implements IEquatable<T>
51+
dotnet_diagnostic.CA1067.severity = silent
2552
# CA1068: CancellationToken parameters must come last
2653
dotnet_diagnostic.CA1068.severity = error
54+
# CA1501: Avoid excessive inheritance
55+
dotnet_diagnostic.CA1501.severity = error
56+
# CA1502: Avoid excessive complexity
57+
dotnet_diagnostic.CA1502.severity = warning
58+
# CA1505: Avoid unmaintainable code
59+
dotnet_diagnostic.CA1505.severity = error
60+
# CA1506: Avoid excessive class coupling
61+
dotnet_diagnostic.CA1506.severity = warning
62+
# CA1507: Use nameof in place of string
63+
dotnet_diagnostic.CA1507.severity = error
64+
# CA1508: Avoid dead conditional code
65+
dotnet_diagnostic.CA1508.severity = error
66+
# CA1802: Use Literals Where Appropriate
67+
dotnet_diagnostic.CA1802.severity = error
68+
# CA1805: Do not initialize unnecessarily.
69+
dotnet_diagnostic.CA1805.severity = error
70+
# CA1820: Test for empty strings using string length
71+
dotnet_diagnostic.CA1820.severity = error
2772
# CA1822: Mark members as static
2873
dotnet_diagnostic.CA1822.severity = error
2974
# CA1823: Avoid unused private fields
@@ -32,34 +77,27 @@ dotnet_diagnostic.CA1823.severity = error
3277
dotnet_diagnostic.CA2007.severity = error
3378
# CA2016: Forward the CancellationToken parameter to methods that take one
3479
dotnet_diagnostic.CA2016.severity = error
80+
# CA2213: Disposable fields should be disposed
81+
dotnet_diagnostic.CA2213.severity = error
82+
# CA2254: The logging message template should not vary between calls to 'LoggerExtensions.*'
83+
dotnet_diagnostic.CA2254.severity = silent
3584

36-
# TODO: Enable all maintainability issues (dead code etc.) and enforce
37-
# See: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/maintainability-warnings
38-
dotnet_analyzer_diagnostic.category-Maintainability.severity = error
39-
40-
# TODO: Fix all of these issues and explicitly ignore the intentional ones!
41-
42-
# CA2016: Forward the CancellationToken parameter to methods that take one
43-
dotnet_diagnostic.CA2016.severity = suggestion
44-
# CS0618: A class member was marked with the Obsolete attribute
45-
dotnet_diagnostic.CS0618.severity = suggestion
46-
# CS0649: Uninitialized private or internal field declaration that is never assigned a value
47-
dotnet_diagnostic.CS0649.severity = suggestion
48-
# CS1998: This async method lacks 'await' operators and will run synchronously
49-
dotnet_diagnostic.CS1998.severity = suggestion
50-
# CS4014: Consider applying the await operator to the result of the call
51-
dotnet_diagnostic.CS4014.severity = suggestion
52-
85+
# RCS1049: Simplify boolean comparison
86+
dotnet_diagnostic.RCS1049.severity = error
5387
# RCS1102: Make class static
54-
dotnet_diagnostic.RCS1102.severity = suggestion
88+
dotnet_diagnostic.RCS1102.severity = error
5589
# RCS1139: Add summary element to documentation comment
56-
dotnet_diagnostic.RCS1139.severity = suggestion
90+
dotnet_diagnostic.RCS1139.severity = silent
5791
# RCS1194: Implement exception constructors
5892
dotnet_diagnostic.RCS1194.severity = suggestion
5993
# RCS1210: Return completed task instead of returning null
60-
dotnet_diagnostic.RCS1210.severity = suggestion
94+
dotnet_diagnostic.RCS1210.severity = error
95+
# RCS1036: Remove unnecessary blank line
96+
dotnet_diagnostic.RCS1036.severity = error
6197
# RCS1075: Avoid empty catch clause that catches System.Exception
6298
dotnet_diagnostic.RCS1075.severity = suggestion
99+
# RCS1170: Use read-only auto-implemented property
100+
dotnet_diagnostic.RCS1170.severity = error
63101

64102
# VSTHRD002: Avoid problematic synchronous waits
65103
dotnet_diagnostic.VSTHRD002.severity = suggestion
@@ -74,14 +112,120 @@ dotnet_diagnostic.VSTHRD103.severity = suggestion
74112
# VSTHRD110: Observe result of async calls
75113
dotnet_diagnostic.VSTHRD110.severity = suggestion
76114
# VSTHRD114: Avoid returning a null Task
77-
dotnet_diagnostic.VSTHRD114.severity = suggestion
115+
dotnet_diagnostic.VSTHRD114.severity = error
78116
# VSTHRD200: Use "Async" suffix for awaitable methods
79-
dotnet_diagnostic.VSTHRD200.severity = suggestion
117+
dotnet_diagnostic.VSTHRD200.severity = silent
80118

81-
# xUnit2013: Do not use equality check to check for collection size
82-
dotnet_diagnostic.xUnit2013.severity = suggestion
83-
# IDE0003: this and Me preferences
84-
dotnet_diagnostic.IDE0003.severity = suggestion
119+
# IDE0001: Simplify name
120+
dotnet_diagnostic.IDE0001.severity = error
121+
# IDE0002: Simplify member access
122+
dotnet_diagnostic.IDE0001.severity = error
123+
# IDE0003: Remove this or Me qualification
124+
dotnet_diagnostic.IDE0003.severity = error
125+
# IDE0004: Remove unnecessary cast
126+
dotnet_diagnostic.IDE0004.severity = error
127+
# IDE0005: Remove unnecessary import
128+
dotnet_diagnostic.IDE0005.severity = error
129+
# IDE0008: Use explicit type instead of var
130+
dotnet_diagnostic.IDE0008.severity = error
131+
# IDE0011: Add braces
132+
dotnet_diagnostic.IDE0011.severity = error
133+
# IDE0016: Use throw expression
134+
dotnet_diagnostic.IDE0016.severity = error
135+
# IDE0017: Use object initializers
136+
dotnet_diagnostic.IDE0017.severity = error
137+
# IDE0018: Inline variable declaration
138+
dotnet_diagnostic.IDE0018.severity = error
139+
# IDE0019: Use pattern matching to avoid 'as' followed by a 'null' check
140+
dotnet_diagnostic.IDE0019.severity = error
141+
# IDE0020: Use pattern matching to avoid 'is' check followed by a cast (with variable)
142+
dotnet_diagnostic.IDE0020.severity = error
143+
# IDE0021: Use expression body for constructors
144+
dotnet_diagnostic.IDE0021.severity = error
145+
# IDE0022: Use expression body for methods
146+
dotnet_diagnostic.IDE0022.severity = error
147+
# IDE0023: Use expression body for conversion operators
148+
dotnet_diagnostic.IDE0023.severity = error
149+
# IDE0024: Use expression body for operators
150+
dotnet_diagnostic.IDE0024.severity = error
151+
# IDE0025: Use expression body for properties
152+
dotnet_diagnostic.IDE0025.severity = error
153+
# IDE0026: Use expression body for indexers
154+
dotnet_diagnostic.IDE0026.severity = error
155+
# IDE0027: Use expression body for accessors
156+
dotnet_diagnostic.IDE0027.severity = error
157+
# IDE0028: Use collection initializers
158+
dotnet_diagnostic.IDE0028.severity = suggestion
159+
# IDE0029: Use coalesce expression (non-nullable types)
160+
dotnet_diagnostic.IDE0029.severity = error
161+
# IDE0030: Use coalesce expression (nullable types)
162+
dotnet_diagnostic.IDE0030.severity = error
163+
# IDE0031: Use null propagation
164+
dotnet_diagnostic.IDE0031.severity = error
165+
# IDE0032: Use auto property
166+
dotnet_diagnostic.IDE0032.severity = error
167+
# IDE0033: Use explicitly provided tuple name
168+
dotnet_diagnostic.IDE0033.severity = error
169+
# IDE0034: Simplify 'default' expression
170+
dotnet_diagnostic.IDE0034.severity = error
171+
# IDE0035: Remove unreachable code
172+
dotnet_diagnostic.IDE0035.severity = error
173+
# IDE0036: Order modifiers
174+
dotnet_diagnostic.IDE0036.severity = error
175+
# IDE0037: Use inferred member name
176+
dotnet_diagnostic.IDE0037.severity = error
177+
# IDE0038: Use pattern matching to avoid is check followed by a cast (without variable)
178+
dotnet_diagnostic.IDE0038.severity = error
179+
# IDE0040: Add accessibility modifiers
180+
dotnet_diagnostic.IDE0040.severity = error
181+
# IDE0041: Use is null check
182+
dotnet_diagnostic.IDE0041.severity = error
183+
# IDE0042: Deconstruct variable declaration
184+
dotnet_diagnostic.IDE0042.severity = error
185+
# IDE0044: Add readonly modifier
186+
dotnet_diagnostic.IDE0044.severity = error
187+
# IDE0045: Use conditional expression for assignment
188+
dotnet_diagnostic.IDE0045.severity = error
189+
# IDE0046: Use conditional expression for return
190+
dotnet_diagnostic.IDE0046.severity = silent
191+
# IDE0047: Remove unnecessary parentheses
192+
dotnet_diagnostic.IDE0047.severity = error
193+
# IDE0049: Use language keywords instead of framework type names for type references
194+
dotnet_diagnostic.IDE0049.severity = error
195+
# IDE0051: Remove unused private member
196+
dotnet_diagnostic.IDE0051.severity = error
197+
# IDE0052: Remove unread private member
198+
dotnet_diagnostic.IDE0052.severity = error
199+
# IDE0053: Use expression body for lambdas
200+
dotnet_diagnostic.IDE0053.severity = error
201+
# IDE0054: Use compound assignment
202+
dotnet_diagnostic.IDE0054.severity = error
203+
# IDE0059: Unnecessary assignment of a value
204+
dotnet_diagnostic.IDE0059.severity = error
205+
# IDE0063: Use simple 'using' statement
206+
dotnet_diagnostic.IDE0063.severity = error
207+
# IDE0066: Use switch expression
208+
dotnet_diagnostic.IDE0066.severity = error
209+
# IDE0071: Simplify interpolation
210+
dotnet_diagnostic.IDE0071.severity = error
211+
# IDE0073: Require file header
212+
dotnet_diagnostic.IDE0073.severity = error
213+
# IDE0075: Simplify conditional expression
214+
dotnet_diagnostic.IDE0075.severity = error
215+
# IDE0078: Use pattern matching
216+
dotnet_diagnostic.IDE0078.severity = error
217+
# IDE0082: Convert typeof to nameof
218+
dotnet_diagnostic.IDE0082.severity = error
219+
# IDE0083: Use pattern matching (not operator)
220+
dotnet_diagnostic.IDE0083.severity = error
221+
# IDE0090: Simplify new expression
222+
dotnet_diagnostic.IDE0090.severity = suggestion
223+
# IDE0100: Remove unnecessary equality operator
224+
dotnet_diagnostic.IDE0100.severity = error
225+
# IDE0110: Remove unnecessary discard
226+
dotnet_diagnostic.IDE0110.severity = error
227+
# IDE1005: Use conditional delegate call
228+
dotnet_diagnostic.IDE1005.severity = error
85229

86230
[*.{json}]
87231
indent_size = 2

.github/CODEOWNERS

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
# https://help.github.com/articles/about-codeowners/
22

3-
# Global reviewers
4-
* @andschwa
5-
6-
# Area: Analysis & Formatting
7-
src/PowerShellEditorServices/Analysis/ @rjmholt
8-
9-
# Area: Debugging
10-
src/PowerShellEditorServices/Debugging/ @rkeithhill
11-
src/PowerShellEditorServices.Protocol/DebugAdapter/ @rkeithhill
12-
13-
# Area: Integrated Console / Host
14-
src/PowerShellEditorServices/Console/ @SeeminglyScience
15-
src/PowerShellEditorServices/Session/*ReadLine*.cs @SeeminglyScience
16-
src/PowerShellEditorServices.Host/ @SeeminglyScience
3+
# Global pattern
4+
* @PowerShell/extension
5+
6+
# Developer files
7+
src/ @PowerShell/extension-dev
8+
test/ @PowerShell/extension-dev
9+
tools/ @PowerShell/extension-dev
10+
.editorconfig @PowerShell/extension-dev
11+
.gitattributes @PowerShell/extension-dev
12+
.gitignore @PowerShell/extension-dev
13+
PowerShellEditorServices.build.ps1 @PowerShell/extension-dev
14+
PowerShellEditorServices.sln @PowerShell/extension-dev

0 commit comments

Comments
 (0)