Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
189 changes: 188 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ dotnet_code_quality.ca2208.api_surface = public
dotnet_diagnostic.RS0037.severity = none

# License header
file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.\n
file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.

# C++ Files
[*.{cpp,h,in}]
Expand Down Expand Up @@ -200,5 +200,192 @@ end_of_line = lf
end_of_line = crlf

[src/**/*.{cs,vb}]
# Code style checks
dotnet_analyzer_diagnostic.category-Style.severity = warning

# Cast is redundant
dotnet_diagnostic.IDE0004.severity = suggestion

# IDE0005: Remove unnecessary usings/imports
dotnet_diagnostic.IDE0005.severity = warning

# Use explicit type instead of 'var'
dotnet_diagnostic.IDE0008.severity = suggestion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

built-in: suggestion
apparent: suggestion
everything else: warning


# Populate switch
dotnet_diagnostic.IDE0010.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning


# Null check can be simplified
dotnet_diagnostic.IDE0016.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave suggestion, but open to moving to warning if an autofixer is available


# Object initialization can be simplified
dotnet_diagnostic.IDE0017.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion


# Variable declaration can be inlined
dotnet_diagnostic.IDE0018.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning


# Use pattern matching
dotnet_diagnostic.IDE0019.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning

dotnet_diagnostic.IDE0020.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning


# Use expression body for constructor
dotnet_diagnostic.IDE0021.severity = suggestion

# Use expression body for method
dotnet_diagnostic.IDE0022.severity = suggestion

# Use expression body for conversion operator
dotnet_diagnostic.IDE0023.severity = suggestion

# Use block body for operator
dotnet_diagnostic.IDE0024.severity = suggestion

# Use expression body for property
dotnet_diagnostic.IDE0025.severity = suggestion

# Use expression body for indexer
dotnet_diagnostic.IDE0026.severity = suggestion

# Use expression body for accessor
dotnet_diagnostic.IDE0027.severity = suggestion
Comment on lines +231 to +250
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expression bodies for everything, suggestion


# Collection initialization can be simplified
dotnet_diagnostic.IDE0028.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning


# Null check can be simplified
dotnet_diagnostic.IDE0031.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning


# Use auto property
dotnet_diagnostic.IDE0032.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion


# 'default' expression can be simplified
dotnet_diagnostic.IDE0034.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning


# Member name can be simplified
dotnet_diagnostic.IDE0037.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set dotnet_style_prefer_inferred_tuple_names to false severity suggestion


# Use local function
dotnet_diagnostic.IDE0039.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning


# Null check can be simplified
dotnet_diagnostic.IDE0041.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning


# Variable declaration can be deconstructed
dotnet_diagnostic.IDE0042.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none


# Made field readonly
dotnet_diagnostic.IDE0044.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning


# 'if' statement can be simplified
dotnet_diagnostic.IDE0045.severity = suggestion
dotnet_diagnostic.IDE0046.severity = suggestion
Comment on lines +280 to +281
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion


# Parentheses can be removed
dotnet_diagnostic.IDE0047.severity = suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none


# Parentheses should be added for clarity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

***** start here for follow up

dotnet_diagnostic.IDE0048.severity = suggestion

# Member name can be simplified
dotnet_diagnostic.IDE0049.severity = suggestion

# Use compound assignment
dotnet_diagnostic.IDE0054.severity = suggestion

# Indexing can be simplified
dotnet_diagnostic.IDE0056.severity = suggestion

# Slice can be simplified
dotnet_diagnostic.IDE0057.severity = suggestion

# Expression value is never used
dotnet_diagnostic.IDE0058.severity = suggestion

# Unnecessary assignment of a value
dotnet_diagnostic.IDE0059.severity = suggestion

# Remove unused parameter
dotnet_diagnostic.IDE0060.severity = suggestion

# Use expression body for a local function
dotnet_diagnostic.IDE0061.severity = suggestion

# Local function can be made static
dotnet_diagnostic.IDE0062.severity = suggestion

# Using directives must be placed outside of a namespace declaration
dotnet_diagnostic.IDE0065.severity = suggestion

# Use 'switch' expression
dotnet_diagnostic.IDE0066.severity = suggestion

# 'GetHashCode' implementation can be simplified
dotnet_diagnostic.IDE0070.severity = suggestion

# Interpolation can be simplified
dotnet_diagnostic.IDE0071.severity = suggestion

# Populate switch
dotnet_diagnostic.IDE0072.severity = suggestion

# Use compound assignment
dotnet_diagnostic.IDE0074.severity = suggestion

# Conditional expression can be simplified
dotnet_diagnostic.IDE0075.severity = suggestion

# Use pattern matching
dotnet_diagnostic.IDE0078.severity = suggestion
dotnet_diagnostic.IDE0083.severity = suggestion

# 'typeof' can be converted to 'nameof'
dotnet_diagnostic.IDE0082.severity = suggestion

# 'new' expression can be simplified
dotnet_diagnostic.IDE0090.severity = suggestion

# Simplify LINQ expression
dotnet_diagnostic.IDE0120.severity = suggestion

# namespace does not match folder structure
dotnet_diagnostic.IDE0130.severity = suggestion

# Null check can be clarified
dotnet_diagnostic.IDE0150.severity = suggestion

# Convert to block scoped namespaces
dotnet_diagnostic.IDE0160.severity = suggestion

# Simplify property pattern
dotnet_diagnostic.IDE0170.severity = suggestion

# Use tuple to swap values
dotnet_diagnostic.IDE0180.severity = suggestion

# Use tuple to swap values
dotnet_diagnostic.IDE0180.severity = suggestion

# Lambda expression can be removed
dotnet_diagnostic.IDE0200.severity = suggestion

# Convert to top-level statements
dotnet_diagnostic.IDE0210.severity = suggestion

# 'foreach' statement implicitly converts
dotnet_diagnostic.IDE0220.severity = suggestion

# Use UTF-8 string literal
dotnet_diagnostic.IDE0230.severity = suggestion

# Nullable directives
dotnet_diagnostic.IDE0240.severity = suggestion
dotnet_diagnostic.IDE0241.severity = suggestion

# Struct can be made 'readonly'
dotnet_diagnostic.IDE0250.severity = suggestion

# Null check can be simplified
dotnet_diagnostic.IDE0270.severity = suggestion

# naming rule violation
dotnet_diagnostic.IDE1006.severity = suggestion
7 changes: 4 additions & 3 deletions eng/Common.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -782,10 +782,10 @@ dotnet_diagnostic.SA1107.severity = suggestion
dotnet_diagnostic.SA1108.severity = none

# Opening parenthesis or bracket should be on declaration line
dotnet_diagnostic.SA1110.severity = suggestion
dotnet_diagnostic.SA1110.severity = warning

# Closing parenthesis should be on line of last parameter
dotnet_diagnostic.SA1111.severity = suggestion
dotnet_diagnostic.SA1111.severity = warning

dotnet_diagnostic.SA1112.severity = none

Expand Down Expand Up @@ -1093,7 +1093,8 @@ dotnet_diagnostic.SA1627.severity = suggestion
dotnet_diagnostic.SA1629.severity = suggestion

# File should have header
dotnet_diagnostic.SA1633.severity = suggestion
# Superseded by IDE0073
dotnet_diagnostic.SA1633.severity = none

# Constructor summary documentation should begin with standard text
dotnet_diagnostic.SA1642.severity = suggestion
Expand Down
2 changes: 1 addition & 1 deletion eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function Check-RequiredVersionBumps() {
if (($LASTEXITCODE -ne 0) -and (-not $versionLineChanged)) {
throw "##vso[task.logissue type=error] Detected changes in Framework\EngineServices.cs without a version bump. " +
"If you are making API changes, please bump the version. " +
"If the changes in the file are cosmetic, please add/change a comment on the Version prop to silence the error."
"If the changes in the file are cosmetic, please change an inline comment on the `"int Version =`" line in EngineServices.cs to silence the error."
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Build.OM.UnitTests/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

global using NativeMethodsShared = Microsoft.Build.Framework.NativeMethods;
4 changes: 2 additions & 2 deletions src/Build.OM.UnitTests/AssemblyResources.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;

Expand Down
Loading