Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix_inline_temporar…
Browse files Browse the repository at this point in the history
…y_variable_adds_unnecessary_cast
  • Loading branch information
CyrusNajmabadi committed Nov 23, 2024
2 parents 952ee2f + c2deeae commit f768f38
Show file tree
Hide file tree
Showing 13,240 changed files with 1,638,920 additions and 1,291,684 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
18 changes: 15 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/dotnet/.devcontainer/base.Dockerfile

# [Choice] .NET version: 6.0, 5.0, 3.1, 2.1
ARG VARIANT="6.0"
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
FROM mcr.microsoft.com/dotnet/sdk:8.0

ARG DOTNET_SDK_INSTALL_URL=https://dot.net/v1/dotnet-install.sh
# Install the correct Roslyn SDK into the same directory that the base image installs the SDK in.
ENV DOTNET_INSTALL_DIR=/usr/share/dotnet

# Copy the global.json file so its available in the image before the repo is cloned
COPY global.json /tmp/

RUN cd /tmp \
&& curl --location --output dotnet-install.sh "${DOTNET_SDK_INSTALL_URL}" \
&& chmod +x dotnet-install.sh \
&& mkdir -p "${DOTNET_INSTALL_DIR}" \
&& ./dotnet-install.sh --jsonfile "./global.json" --install-dir "${DOTNET_INSTALL_DIR}" \
&& rm dotnet-install.sh

# Set up machine requirements to build the repo
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
Expand Down
99 changes: 52 additions & 47 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,61 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/dotnetcore
{
"name": "C# (.NET 6)",
"name": "C# (.NET 9)",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "6.0",
}
// Set the context to the workspace folder to allow us to copy files from it.
"context": ".."
},
"settings": {
"files.associations": {
"*.csproj": "msbuild",
"*.fsproj": "msbuild",
"*.globalconfig": "ini",
"*.manifest": "xml",
"*.nuspec": "xml",
"*.pkgdef": "ini",
"*.projitems": "msbuild",
"*.props": "msbuild",
"*.resx": "xml",
"*.rsp": "Powershell",
"*.ruleset": "xml",
"*.settings": "xml",
"*.shproj": "msbuild",
"*.slnf": "json",
"*.targets": "msbuild",
"*.vbproj": "msbuild",
"*.vsixmanifest": "xml",
"*.vstemplate": "xml",
"*.xlf": "xml",
"*.yml": "azure-pipelines"
},
// ms-dotnettools.csharp settings
"omnisharp.defaultLaunchSolution": "Roslyn.sln",
"omnisharp.disableMSBuildDiagnosticWarning": true,
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableImportCompletion": true,
"omnisharp.useModernNet": true,
"omnisharp.enableAsyncCompletion": true,
// ms-vscode.powershell settings
"powershell.promptToUpdatePowerShell": false,
"powershell.integratedConsole.showOnStartup": false,
"powershell.startAutomatically": false,
// ms-azure-devops.azure-pipelines settings
"azure-pipelines.customSchemaFile": ".vscode/dnceng-schema.json"
"customizations": {
"vscode": {
"settings": {
"files.associations": {
"*.csproj": "msbuild",
"*.fsproj": "msbuild",
"*.globalconfig": "ini",
"*.manifest": "xml",
"*.nuspec": "xml",
"*.pkgdef": "ini",
"*.projitems": "msbuild",
"*.props": "msbuild",
"*.resx": "xml",
"*.rsp": "Powershell",
"*.ruleset": "xml",
"*.settings": "xml",
"*.shproj": "msbuild",
"*.slnf": "json",
"*.targets": "msbuild",
"*.vbproj": "msbuild",
"*.vsixmanifest": "xml",
"*.vstemplate": "xml",
"*.xlf": "xml",
"*.yml": "azure-pipelines"
},
// ms-dotnettools.csharp settings
"omnisharp.disableMSBuildDiagnosticWarning": true,
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableImportCompletion": true,
"omnisharp.useModernNet": true,
"omnisharp.enableAsyncCompletion": true,
// ms-dotnettools.csdevkit settings
"dotnet.defaultSolution": "Roslyn.sln",
// ms-vscode.powershell settings
"powershell.promptToUpdatePowerShell": false,
"powershell.integratedConsole.showOnStartup": false,
"powershell.startAutomatically": false,
// ms-azure-devops.azure-pipelines settings
"azure-pipelines.customSchemaFile": ".vscode/dnceng-schema.json"
},
"extensions": [
"ms-dotnettools.csharp",
"ms-dotnettools.csdevkit",
"EditorConfig.EditorConfig",
"ms-vscode.powershell",
"tintoy.msbuild-project-tools",
"ms-azure-devops.azure-pipelines"
]
}
},
"extensions": [
"ms-dotnettools.csharp",
"EditorConfig.EditorConfig",
"ms-vscode.powershell",
"tintoy.msbuild-project-tools",
"ms-azure-devops.azure-pipelines"
],
"postCreateCommand": "${containerWorkspaceFolder}/restore.sh"
}
37 changes: 37 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,26 @@ file_header_template = Licensed to the .NET Foundation under one or more agreeme
# RS0016: Only enable if API files are present
dotnet_public_api_analyzer.require_api_files = true

# IDE0055: Fix formatting
# Workaround for https://github.com/dotnet/roslyn/issues/70570
dotnet_diagnostic.IDE0055.severity = warning

# https://github.com/dotnet/roslyn-analyzers/issues/7436 - False positives from valid GetDeclaredSymbol calls
dotnet_diagnostic.RS1039.severity = none

# These xUnit analyzers were disabled temporarily to let us move to the
# new xUnit and get past several component governance issues. The
# following issue tracks enabling them
#
# https://github.com/dotnet/roslyn/issues/75093
dotnet_diagnostic.xUnit1012.severity = none
dotnet_diagnostic.xUnit1030.severity = none
dotnet_diagnostic.xUnit1031.severity = none
dotnet_diagnostic.xUnit2005.severity = none
dotnet_diagnostic.xUnit2020.severity = none
dotnet_diagnostic.xUnit2023.severity = none
dotnet_diagnostic.xUnit2029.severity = none

# CSharp code style settings:
[*.cs]
# Newline settings
Expand Down Expand Up @@ -280,3 +300,20 @@ dotnet_diagnostic.IDE2006.severity = warning
# CA1822: Make member static
# There is a risk of accidentally breaking an internal API that partners rely on though IVT.
dotnet_code_quality.CA1822.api_surface = private

[**/{ExternalAccess}/**/*.{cs,vb}]

# RS0016: Only enable if API files are present
dotnet_public_api_analyzer.require_api_files = true

dotnet_diagnostic.RS0051.severity = error
dotnet_diagnostic.RS0052.severity = error
dotnet_diagnostic.RS0053.severity = error
dotnet_diagnostic.RS0054.severity = error
dotnet_diagnostic.RS0055.severity = error
dotnet_diagnostic.RS0056.severity = error
dotnet_diagnostic.RS0057.severity = error
dotnet_diagnostic.RS0058.severity = error
dotnet_diagnostic.RS0059.severity = error
dotnet_diagnostic.RS0060.severity = error
dotnet_diagnostic.RS0061.severity = error
16 changes: 15 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# dotnet-format -w Roslyn.sln on June 18, 2021
abce41d282ac631be5217140f1bd46d0e250ad02
fbdb56063e761643707f6bc1e1ba469f6fb9a31a
57278e7dcbf7bffb310e8b14105f657f0fdbab78
57278e7dcbf7bffb310e8b14105f657f0fdbab78
# Converting to file scoped namespaces on 2/27/2024. https://github.com/dotnet/roslyn/pull/72294
ec6c8b40e23a595b1e75aec920e3fb29e55f61cf
de42965cf9b64d71bccc549dd9940210cda5abf1
4262648cadff59cc703b6be8c00b9814a6b13c5a
17e64d5773140ae5813664932bbfa4722a983805
3f632c70e8e28a5ede881784600d0f3d06d3138d
27b50978f636ac0588ea7c19664fac4502e964a7
f125c2664d3bffb59536f4d3dfee7fa5323c7721
# Converting to file scoped namespaces on 5/22/2024. https://github.com/dotnet/roslyn/pull/73634
42e80231c1351d8b90d425446e8b9e8a50c1e1b6
32e21b64138876a065081ab4bbe15b1fbea12316
8ab847ca4cbe30baeb0e5d1cbd68ba40385b01ae
077012c5bc43649fc705698859143226e48686cf

4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ docs/compilers @dotnet/roslyn-compiler
docs/ide @dotnet/roslyn-ide

eng/ @dotnet/roslyn-infrastructure
eng/SourceBuild* @dotnet/source-build-internal
/eng/DotNetBuild.props @dotnet/product-construction
/eng/SourceBuild* @dotnet/source-build
scripts/ @dotnet/roslyn-infrastructure

src/Analyzers/ @dotnet/roslyn-ide
Expand All @@ -21,6 +22,7 @@ src/Compilers/Test/Core/Traits/Traits.cs
src/EditorFeatures/ @dotnet/roslyn-ide
src/Features/ @dotnet/roslyn-ide
src/Interactive/ @dotnet/roslyn-interactive
src/LanguageServer/ @dotnet/roslyn-ide
src/NuGet/ @dotnet/roslyn-infrastructure
src/Scripting/ @dotnet/roslyn-interactive
src/Setup/ @dotnet/roslyn-infrastructure
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ about: Report a bug in Roslyn
2.
3.

A minimal repro, with source-code provided, is ideal. Using [sharplab](https://sharplab.io/) is preferred for compiler/language issues whenever possible.
A minimal repro, with source-code provided, is ideal. Most compiler/language issues can be distilled into a snippet that can be pasted into [sharplab](https://sharplab.io/).

**Diagnostic Id**:

If this is a report about a bug in an analyzer, please include the diagnostic if possible (e.g. `"IDE0030"`).
If this is a report about a bug in an analyzer, please include the diagnostic ID and message if possible (e.g. `"IDE0030: Use coalesce expression"`).

**Expected Behavior**:

Expand Down
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/z-apidocs-feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Learn feedback control.
description: |
⛔ This template is hooked into the feedback control on Roslyn API documentation on docs.microsoft.com. It automatically fills in several fields for you. Don't use for other purposes. ⛔
body:
- type: markdown
attributes:
value: "## Issue information"
- type: markdown
attributes:
value: Select the issue type, and describe the issue in the text box below. Add as much detail as needed to help us resolve the issue.
- type: dropdown
id: issue-type
attributes:
label: Type of issue
options:
- Typo
- Code doesn't work
- Missing information
- Outdated article
- Other (describe below)
validations:
required: true
- type: textarea
id: feedback
validations:
required: true
attributes:
label: Description
- type: markdown
attributes:
value: "## 🚧 Article information 🚧"
- type: markdown
attributes:
value: "*Don't modify the following fields*. They are automatically filled in for you. Doing so will disconnect your issue from the affected article. *Don't edit them*."
- type: input
id: pageUrl
validations:
required: true
attributes:
label: Page URL
- type: input
id: contentSourceUrl
validations:
required: true
attributes:
label: Content source URL
Loading

0 comments on commit f768f38

Please sign in to comment.