Skip to content

Commit 5515ce9

Browse files
authored
Merge pull request #86 from messerli-informatik-ag/update-style-cop
2 parents 182050e + 89fce8f commit 5515ce9

File tree

5 files changed

+19
-7
lines changed

5 files changed

+19
-7
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717
- uses: actions/setup-dotnet@v1
18-
- uses: actions/setup-ruby@v1
19-
with:
20-
ruby-version: '2.7'
2118
- name: Install dependencies
2219
run: dotnet restore
2320
- name: Build

CodeStyle/CodeStyle.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</PropertyGroup>
1919
<ItemGroup>
2020
<PackageReference Include="IDisposableAnalyzers" Version="4.0.2" PrivateAssets="none" />
21-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="none" />
21+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" PrivateAssets="none" />
2222
</ItemGroup>
2323
<ItemGroup>
2424
<ProjectReference Include="..\CodeStyle.Analyzers\CodeStyle.Analyzers.csproj" PrivateAssets="none" />

Sandbox/ListPatterns.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
3+
namespace Sandbox;
4+
5+
public static class ListPatterns
6+
{
7+
public static void Patterns()
8+
{
9+
var firstFivePrimes = new[] { 2, 3, 5, 7, 11 };
10+
if (firstFivePrimes is [_, var second, ..])
11+
{
12+
Console.WriteLine($"Second prime is {second}");
13+
}
14+
}
15+
}

Sandbox/Sandbox.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\CodeStyle\build\Messerli.CodeStyle.props" />
33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<IsPackable>false</IsPackable>
6-
<LangVersion>10.0</LangVersion>
6+
<LangVersion>11.0</LangVersion>
77
</PropertyGroup>
88
<ItemGroup>
99
<ProjectReference Include="..\CodeStyle\CodeStyle.csproj" />

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "6.0.401",
3+
"version": "7.0.304",
44
"rollForward": "latestFeature"
55
},
66
"msbuild-sdks": {

0 commit comments

Comments
 (0)