Skip to content

Commit

Permalink
Merge branch 'main' into compare-symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 authored Dec 26, 2022
2 parents 792dd0a + bad1e3c commit 75fd3ad
Show file tree
Hide file tree
Showing 214 changed files with 2,472 additions and 5,851 deletions.
97 changes: 5 additions & 92 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ root = true
indent_style = space
# (Please don't specify an indent_size here; that has too many unintended consequences.)

# RS1024: Compare symbols correctly
# https://github.com/dotnet/roslyn-analyzers/issues/3389
dotnet_diagnostic.RS1024.severity = none

# IDE0078: Use pattern matching
# https://github.com/dotnet/roslyn/issues/51691
# https://github.com/dotnet/roslyn/issues/51693
dotnet_diagnostic.IDE0078.severity = silent

# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
Expand Down Expand Up @@ -181,67 +172,9 @@ visual_basic_style_unused_value_assignment_preference = unused_local_variable:wa
### Configuration for IDE code style by diagnostic IDs ###
[*.{cs,vb}]

# Default severity for all IDE code style rules with category 'Style'
dotnet_analyzer_diagnostic.category-Style.severity = warning

# Default severity for all IDE code quality rules with category 'CodeQuality'
dotnet_analyzer_diagnostic.category-CodeQuality.severity = warning

# IDE0066: Convert switch statement to expression
dotnet_diagnostic.IDE0066.severity = suggestion

# IDE0073: File header
file_header_template = Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information.

# IDE0001: Name can be simplified
dotnet_diagnostic.IDE0001.severity = silent

# IDE0002: Name can be simplified
dotnet_diagnostic.IDE0002.severity = silent

# IDE0003: Name can be simplified
dotnet_diagnostic.IDE0003.severity = silent

# IDE0007: Use 'var' instead of explicit type
dotnet_diagnostic.IDE0007.severity = silent

# IDE0010: Add missing cases in switch statement
dotnet_diagnostic.IDE0010.severity = silent

# IDE0017: Object initialization can be simplified
dotnet_diagnostic.IDE0017.severity = silent

# IDE0045: 'if' statement can be simplified
dotnet_diagnostic.IDE0045.severity = silent

# IDE0046: 'if' statement can be simplified
dotnet_diagnostic.IDE0046.severity = silent

# IDE0048: Parentheses should be added for clarity
dotnet_diagnostic.IDE0048.severity = silent

# IDE0058: Expression value is never used
dotnet_diagnostic.IDE0058.severity = silent

# IDE0065: Using directives must be placed outside of a namespace declaration
# Can remove the below entry and turn it into a warning once https://github.com/dotnet/roslyn/issues/43271 is resolved.
dotnet_diagnostic.IDE0065.severity = silent

# IDE0072: Populate switch
dotnet_diagnostic.IDE0072.severity = silent

# IDE0083: Use pattern matching
dotnet_diagnostic.IDE0083.severity = silent

# IDE0120: Simplify linq expression
dotnet_diagnostic.IDE0120.severity = silent

# IDE0130: Namespace does not match folder structure
dotnet_diagnostic.IDE0130.severity = silent

# IDE0150: Null check can be clarified
dotnet_diagnostic.IDE0150.severity = silent

# IDE2000: Allow multiple blank lines
dotnet_style_allow_multiple_blank_lines_experimental = false

Expand All @@ -257,7 +190,7 @@ dotnet_style_allow_statement_immediately_after_block_experimental = false
# IDE2004: Blank line not allowed after constructor initializer colon
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false

### Configuration for FxCop analyzers executed on this repo ###
### Configuration for .Net analyzers executed on this repo ###
[*.{cs,vb}]

# Default analyzed API surface = 'all' (public APIs + non-public APIs)
Expand All @@ -275,35 +208,15 @@ dotnet_code_quality.CA1720.api_surface = public
# CA1715: Identifiers should have correct prefix
dotnet_code_quality.CA1715.exclude_single_letter_type_parameters = true

# CA1002: Do not expose generic lists
dotnet_diagnostic.CA1002.severity = suggestion

# CA1024: Use properties where appropriate
dotnet_diagnostic.CA1024.severity = suggestion
# CA1305: Pass IFormatProvider - https://github.com/dotnet/roslyn-analyzers/issues/6379
dotnet_diagnostic.CA1305.severity = suggestion

# CA1033: Interface methods should be callable by child types
dotnet_diagnostic.CA1033.severity = suggestion

# CA1307: Specify StringComparison for clarity
dotnet_diagnostic.CA1307.severity = suggestion

# CA1711: Identifiers should not have incorrect suffix
dotnet_diagnostic.CA1711.severity = suggestion

# CA1309: Use ordinal string comparison
dotnet_diagnostic.CA1309.severity = suggestion
# CA1851: Possible multiple enumerations of 'IEnumerable' collection - https://github.com/dotnet/roslyn-analyzers/issues/6379
dotnet_diagnostic.CA1851.severity = suggestion

### Configuration for PublicAPI analyzers executed on this repo ###
[*.{cs,vb}]

# Analyzers bail-out if the PublicAPI.*.txt file is not found
dotnet_public_api_analyzer.require_api_files = true

### Configuration for vs-threading analyzers executed on this repo ###
[*.{cs,vb}]

# VSTHRD002: Avoid problematic synchronous waits
dotnet_diagnostic.VSTHRD002.severity = none

# VSTHRD011: Use AsyncLazy<T>
dotnet_diagnostic.VSTHRD011.severity = none
12 changes: 11 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@
<ExcludeByFile></ExcludeByFile>
</PropertyGroup>

<!-- Global Analyzer Config -->
<ItemGroup>
<!-- Always include Common.globalconfig -->
<EditorConfigFiles Include="$(RepositoryEngineeringDir)globalconfigs\Common.globalconfig" />
<!-- Include Shipping.globalconfig for shipping projects -->
<EditorConfigFiles Condition="'$(IsShipping)' == 'true'" Include="$(RepositoryEngineeringDir)globalconfigs\Shipping.globalconfig" />
<!-- Include NonShipping.globalconfig for non-shipping projects -->
<EditorConfigFiles Condition="'$(IsShipping)' != 'true'" Include="$(RepositoryEngineeringDir)globalconfigs\NonShipping.globalconfig" />
</ItemGroup>

<Target Name="OuterInstrumentModulesNoBuild" BeforeTargets="RunTests" Condition="'$(IsUnitTestProject)' == 'true' AND '$(TargetFramework)' == ''">
<MSBuild
Projects="$(MSBuildProjectFullPath)"
Expand All @@ -73,4 +83,4 @@
BeforeTargets="Test"
DependsOnTargets="GenerateCoverageResult"
Condition="'$(IsUnitTestProject)' == 'true' AND '$(TargetFramework)' != '' AND '$(CollectCoverage)' == 'true'" />
</Project>
</Project>
1 change: 1 addition & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<clear />
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ Recently the set of analyzer packages produced by this repository have been cons

*Latest stable version:* <sub>[![NuGet](https://img.shields.io/nuget/v/Microsoft.CodeAnalysis.NetAnalyzers.svg)](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers)</sub>

*Latest pre-release version (.NET6 analyzers):* [here](https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet6/NuGet/Microsoft.CodeAnalysis.NetAnalyzers/versions)

*Latest pre-release version (.NET7 analyzers):* [here](https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet7/NuGet/Microsoft.CodeAnalysis.NetAnalyzers/versions)
*Latest pre-release version (.NET8 analyzers):* [here](https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet8/NuGet/Microsoft.CodeAnalysis.NetAnalyzers/versions)

This is the **primary analyzer package** for this repo that contains all **the .NET code analysis rules (CAxxxx)** that are built into the .NET SDK starting .NET5 release. The documentation for CA rules can be found at [learn.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings](https://learn.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings).

Expand Down Expand Up @@ -144,7 +142,7 @@ For instructions on using this tutorial, see [Instructions](https://github.com/d

## Getting Started

1. Install Visual Studio 2019 or later, with at least the following workloads:
1. Install Visual Studio 2022 or later, with at least the following workloads:
1. .NET desktop development
2. .NET Core cross-platform development
3. Visual Studio extension development
Expand Down
5 changes: 3 additions & 2 deletions docs/NetCore_GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
|Branch| SDK | Description|
|--------|--------|--------|
|[2.9.x](https://github.com/dotnet/roslyn-analyzers/tree/2.9.x)| Does not ship in the .NET SDK | A special branch compatible with Visual Studio 2017 where security analyzers are shipped from.
|[main](https://github.com/dotnet/roslyn-analyzers/tree/main)| .NET SDK 7.0.0xx | Currently active branch. All work should target this branch unless it is a bugfix for a previous release
|[main](https://github.com/dotnet/roslyn-analyzers/tree/main)| .NET SDK 8.0.0xx | Currently active branch. All work should target this branch unless it is a bugfix for a previous release
|[release/5.0.3xx](https://github.com/dotnet/roslyn-analyzers/tree/release/5.0.3xx)| .NET SDK 5.0.3xx | Servicing branch for the .NET 5 SDK.
|[release/6.0.1xx](https://github.com/dotnet/roslyn-analyzers/tree/release/6.0.1xx)| .NET SDK 6.0.0xx | Servicing branch for the .NET 6 SDK. Currently accepting targeting fixes until the .NET 6 SDK ships
|[release/6.0.1xx](https://github.com/dotnet/roslyn-analyzers/tree/release/6.0.1xx)| .NET SDK 6.0.0xx | Servicing branch for the .NET 6 SDK.
|[release/7.0.1xx](https://github.com/dotnet/roslyn-analyzers/tree/release/7.0.1xx)| .NET SDK 7.0.1xx | Servicing branch for the .NET 7 SDK.

## Definition of done

Expand Down
40 changes: 0 additions & 40 deletions eng/Analyzers_NonShippingRules.ruleset

This file was deleted.

41 changes: 0 additions & 41 deletions eng/Analyzers_ShippingRules.ruleset

This file was deleted.

4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.22552.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.22621.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>5be556106f26f171f32187951b9a141f9580d03a</Sha>
<Sha>3003926e4126f827bca50d5b3ee179afc86d8a7b</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
</ToolsetDependencies>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<MicrosoftCodeAnalysisForRoslynDiagnosticsAnalyzersVersion>3.7.0</MicrosoftCodeAnalysisForRoslynDiagnosticsAnalyzersVersion>
<MicrosoftCodeAnalysisVersionForTests>4.4.0-2.22416.9</MicrosoftCodeAnalysisVersionForTests>
<DogfoodAnalyzersVersion>3.3.4-beta1.22418.3</DogfoodAnalyzersVersion>
<DogfoodNetAnalyzersVersion>5.0.4-preview1.21126.5</DogfoodNetAnalyzersVersion>
<DogfoodNetAnalyzersVersion>8.0.0-preview1.22621.6</DogfoodNetAnalyzersVersion>
<MicrosoftCodeAnalysisBannedApiAnalyzersVersion>$(DogfoodAnalyzersVersion)</MicrosoftCodeAnalysisBannedApiAnalyzersVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>$(DogfoodAnalyzersVersion)</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisPerformanceSensitiveAnalyzersVersion>3.3.3-beta1.21126.3</MicrosoftCodeAnalysisPerformanceSensitiveAnalyzersVersion>
Expand Down
4 changes: 4 additions & 0 deletions eng/common/BuildConfiguration/build-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RetryCountLimit": 1,
"RetryByAnyError": false
}
35 changes: 0 additions & 35 deletions eng/common/cross/arm/tizen-build-rootfs.sh

This file was deleted.

Loading

0 comments on commit 75fd3ad

Please sign in to comment.