Skip to content

Commit

Permalink
Merge branch 'main' into prefer-readonlyspan-properties-to-array-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
NewellClark committed Oct 4, 2021
2 parents d8b92bb + 20c4998 commit 5ad4dd9
Show file tree
Hide file tree
Showing 75 changed files with 2,051 additions and 2,045 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,18 @@ 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

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

Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/community-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Label community PRs
on:
pull_request_target:
types: [opened]
permissions:
issues: write
pull-requests: write
jobs:
add_community_label:
runs-on: ubuntu-latest
if: ${{ github.repository == 'dotnet/roslyn-analyzers' && github.event.pull_request.user.login != 'dotnet-bot' && github.event.pull_request.user.login != 'dotnet-maestro[bot]' }}
steps:
- name: Get data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORGANIZATION: dotnet
REPOSITORY: roslyn-analyzers
LABEL_NAME: Community
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
run: |
gh api graphql -f query='
query($org: String!, $repo: String!, $pull: Int!, $label: String!) {
repository(name: $repo, owner: $org) {
label(name: $label) {
id
}
pullRequest(number: $pull) {
authorAssociation
}
}
}' -f org=$ORGANIZATION -f repo=$REPOSITORY -F pull=$PULL_REQUEST_NUMBER -f label="$LABEL_NAME" > data.json
cat data.json
echo 'LABEL_ID='$(jq -r '.data.repository.label.id' data.json) >> $GITHUB_ENV
echo 'AUTHOR_ASSOCIATION='$(jq -r '.data.repository.pullRequest.authorAssociation' data.json) >> $GITHUB_ENV
- name: Assign label
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_ID: ${{ github.event.pull_request.node_id }}
if: ${{ env.LABEL_ID != '' && env.LABEL_ID != 'null' && env.AUTHOR_ASSOCIATION != 'MEMBER' }}
run: |
gh api graphql -f query='
mutation($pull: ID!, $label: ID!) {
addLabelsToLabelable(input: {labelableId: $pull, labelIds: [$label]}) {
clientMutationId
}
}' -f pull=$PULL_REQUEST_ID -f label=$LABEL_ID
28 changes: 28 additions & 0 deletions .github/workflows/enable-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Enable auto merge
on:
pull_request_target:
types: [opened, ready_for_review]
permissions:
contents: write
jobs:
add_milestone:
runs-on: ubuntu-latest
if: ${{ github.repository == 'dotnet/roslyn-analyzers' && github.event.pull_request.user.login == 'dotnet-bot' && startsWith(github.event.pull_request.title, 'Localized file check-in') }}
steps:
- name: Enable pull request auto-merge
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_ID: ${{ github.event.pull_request.node_id }}
run: |
gh api graphql -f query='
mutation($pull: ID!) {
enablePullRequestAutoMerge(input: {pullRequestId: $pull}) {
pullRequest {
id
number
autoMergeRequest {
mergeMethod
}
}
}
}' -f pull=$PULL_REQUEST_ID
33 changes: 22 additions & 11 deletions .github/workflows/milestone-tracking.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: Milestone tracking
on:
pull_request:
pull_request_target:
types: [closed]
permissions:
issues: write
pull-requests: write
jobs:
add_milestone:
runs-on: ubuntu-latest
if: ${{ github.repository == 'dotnet/roslyn-analyzers' && github.event.pull_request.merged_at != null && github.event.pull_request.milestone == null && github.event.pull_request.base.ref == 'main' }}
steps:
- name: Get milestone data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORGANIZATION: dotnet
REPOSITORY: roslyn-analyzers
MILESTONE_NAME: vNext
Expand All @@ -25,18 +29,25 @@ jobs:
}
}' -f org=$ORGANIZATION -f repo=$REPOSITORY -f milestone="$MILESTONE_NAME" > milestone_data.json
cat milestone_data.json
echo 'MILESTONE_ID='$(jq 'if (((.data.repository.milestones.nodes | length) == 1) and .data.repository.milestones.nodes[0].title == "$MILESTONE_NAME") then .data.repository.milestones.nodes[0].id else null end' label_data.json) >> $GITHUB_ENV
echo 'MILESTONE_ID='$(jq -r 'if (((.data.repository.milestones.nodes | length) == 1) and .data.repository.milestones.nodes[0].title == $MILESTONE_NAME) then .data.repository.milestones.nodes[0].id else "" end' --arg MILESTONE_NAME "$MILESTONE_NAME" milestone_data.json) >> $GITHUB_ENV
- name: Assign milestone
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_ID: ${{ github.event.pull_request.node_id }}
if: ${{ env.MILESTONE_ID != '' }}
run: |
echo $MILESTONE_ID
#gh api graphql -f query='
# mutation($pull: ID!, $milestone: ID!) {
# updatePullRequest(input: {pullRequestId: $pull, milestoneId: $milestone}) {
# clientMutationId
# }
# }' -f pull=$PULL_REQUEST_ID -f milestone=$MILESTONE_ID
gh api graphql -f query='
mutation($pull: ID!, $milestone: ID!) {
updatePullRequest(input: {pullRequestId: $pull, milestoneId: $milestone}) {
pullRequest {
id
number
milestone {
id
number
title
}
}
}
}' -f pull=$PULL_REQUEST_ID -f milestone=$MILESTONE_ID
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Recently the set of analyzer packages produced by this repository have been cons

*Latest pre-release version (.NET6 analyzers):* [here](https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet6&package=Microsoft.CodeAnalysis.NetAnalyzers&protocolType=NuGet)

*Latest pre-release version (.NET7 analyzers):* [here](https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet7&package=Microsoft.CodeAnalysis.NetAnalyzers&protocolType=NuGet)

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 [docs.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings](https://docs.microsoft.com/visualstudio/code-quality/code-analysis-for-managed-code-warnings).

You do not need to manually install this NuGet package to your project if you are using .NET5 SDK or later. These analyzers are enabled by default for projects targeting .NET5 or later. For projects targeting earlier .NET frameworks, you can enable them in your MSBuild project file by setting one of the following properties:
Expand Down
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="6.0.0-beta.21379.2">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.21474.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>62a8aafffd4c68ef887680f6837abdff906a662c</Sha>
<Sha>3ea0d860c6973f2cbadc9e895c7ec2cbdaec4ad5</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
</ToolsetDependencies>
Expand Down
6 changes: 2 additions & 4 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project>
<Import Project="$(SourceBuildPackageVersionPropsPath)" Condition="'$(SourceBuildPackageVersionPropsPath)' != ''"/>

<Import Project="$(SourceBuildPackageVersionPropsPath)" Condition="'$(SourceBuildPackageVersionPropsPath)' != ''" />
<PropertyGroup>
<!--
Binaries that need to be executable during source build are restricted to versions available within source build.
Expand All @@ -14,7 +13,6 @@
<MicrosoftCodeAnalysisExecutableVersion>$(MicrosoftCodeAnalysisVersion)</MicrosoftCodeAnalysisExecutableVersion>
<MicrosoftCodeAnalysisExecutableVersion Condition="'$(MicrosoftCodeAnalysisExecutableVersion)' == ''">3.8.0</MicrosoftCodeAnalysisExecutableVersion>
</PropertyGroup>

<PropertyGroup>
<VersionPrefix>3.3.3</VersionPrefix>
<PreReleaseVersionLabel>beta1</PreReleaseVersionLabel>
Expand All @@ -40,7 +38,7 @@
<!-- Use the correct compiler version -->
<UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
<!-- Dependencies from https://github.com/dotnet/roslyn -->
<MicrosoftNETCoreCompilersPackageVersion>3.9.0</MicrosoftNETCoreCompilersPackageVersion>
<MicrosoftNETCoreCompilersPackageVersion>4.0.0-4.final</MicrosoftNETCoreCompilersPackageVersion>
<MicrosoftNetCompilersToolsetVersion>$(MicrosoftNETCoreCompilersPackageVersion)</MicrosoftNetCompilersToolsetVersion>
<CodeStyleAnalyersVersion>$(MicrosoftNETCoreCompilersPackageVersion)</CodeStyleAnalyersVersion>
<!-- Roslyn -->
Expand Down
4 changes: 4 additions & 0 deletions eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ function InitializeCustomToolset {
}

function Build {

if [[ "$ci" == true ]]; then
TryLogClientIpAddress
fi
InitializeToolset
InitializeCustomToolset

Expand Down
11 changes: 0 additions & 11 deletions eng/common/cross/arm/sources.list.trusty

This file was deleted.

71 changes: 0 additions & 71 deletions eng/common/cross/arm/trusty-lttng-2.4.patch

This file was deleted.

97 changes: 0 additions & 97 deletions eng/common/cross/arm/trusty.patch

This file was deleted.

Loading

0 comments on commit 5ad4dd9

Please sign in to comment.