Skip to content

Commit 005a1aa

Browse files
Update dependencies. (#10)
- Migrate *.ruleset files to .editorconfig files. - Update the target framework to netcoreapp3.1. - Fix warnings.
1 parent c3c0629 commit 005a1aa

File tree

13 files changed

+138
-197
lines changed

13 files changed

+138
-197
lines changed

.circleci/config.yml

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,49 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: mcr.microsoft.com/dotnet/core/sdk:2.2.300
5+
- image: mcr.microsoft.com/dotnet/core/sdk:3.1.201
66
steps:
7-
- run: curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
8-
- run: apt-get install git-lfs
7+
- run:
8+
name: Register Microsoft key and feed
9+
command: |
10+
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
11+
mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
12+
wget -q https://packages.microsoft.com/config/debian/9/prod.list
13+
mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
14+
chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
15+
chown root:root /etc/apt/sources.list.d/microsoft-prod.list
16+
- run:
17+
name: Install .NET Core runtime 2.2
18+
command: |
19+
apt-get install apt-transport-https
20+
apt-get update
21+
apt-get -y install dotnet-runtime-2.2
22+
- run:
23+
name: Install Git LFS
24+
command: |
25+
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
26+
apt-get install git-lfs
927
- checkout
1028
- run: pwd
1129
- run: dotnet restore
12-
- run: dotnet tool install -g BomSweeper.GlobalTool
13-
- run: /root/.dotnet/tools/bomsweeper '**/*.cs' '**/*.csproj' '**/*.sln'
14-
- run: dotnet build
15-
- run: dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=opencover --no-build BomSweeper.Test
16-
- run: dotnet tool install -g dotnet-reportgenerator-globaltool
17-
- run: /root/.dotnet/tools/reportgenerator --reports:BomSweeper.Test/coverage.opencover.xml --targetdir:Coverlet-html
30+
- run:
31+
name: Check BOM
32+
command: |
33+
dotnet tool install -g BomSweeper.GlobalTool
34+
/root/.dotnet/tools/bomsweeper '**/*.cs' '**/*.csproj' '**/*.sln'
35+
- run:
36+
name: Build
37+
command: |
38+
dotnet build
39+
- run:
40+
name: Test
41+
command: |
42+
dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=opencover --no-build BomSweeper.Test
43+
- run:
44+
name: Coverage
45+
command: |
46+
dotnet tool install -g dotnet-reportgenerator-globaltool
47+
/root/.dotnet/tools/reportgenerator --reports:BomSweeper.Test/coverage.opencover.xml --targetdir:Coverlet-html
1848
- store_artifacts:
1949
path: /root/project/Coverlet-html
2050
workflows:

BomSweeper.GlobalTool/BomSweeper.GlobalTool.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.2</TargetFramework>
5+
<TargetFramework>netcoreapp3.1</TargetFramework>
66
<PackAsTool>true</PackAsTool>
77
<ToolCommandName>bomsweeper</ToolCommandName>
88
</PropertyGroup>

BomSweeper.Test/.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[*.cs]
2+
3+
# SA1633: File should have header
4+
dotnet_diagnostic.SA1633.severity = none
5+
6+
# SA1600: Elements should be documented
7+
dotnet_diagnostic.SA1600.severity = none
8+
9+
# SA1513: Closing brace should be followed by blank line
10+
dotnet_diagnostic.SA1513.severity = none
11+
12+
# SA1101: Prefix local calls with this
13+
dotnet_diagnostic.SA1101.severity = none
14+
15+
# SA1302: Interface names should begin with I
16+
dotnet_diagnostic.SA1302.severity = none
17+
18+
# SA1122: Use string.Empty for empty strings
19+
dotnet_diagnostic.SA1122.severity = none
20+
21+
# IsNull: Do not use 'is' pattern matching with 'null'.
22+
dotnet_diagnostic.IsNull.severity = none

BomSweeper.Test/BomSweeper.Test.csproj

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.2</TargetFramework>
5-
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
65
<IsPackable>false</IsPackable>
7-
86
<LangVersion>8.0</LangVersion>
9-
<NullableContextOptions>enable</NullableContextOptions>
7+
<Nullable>enable</Nullable>
108
</PropertyGroup>
119

1210
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
13-
<CodeAnalysisRuleSet>BomSweeper.Test.ruleset</CodeAnalysisRuleSet>
11+
<CodeAnalysisRuleSet></CodeAnalysisRuleSet>
1412
</PropertyGroup>
1513

1614
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
17-
<CodeAnalysisRuleSet>BomSweeper.Test.ruleset</CodeAnalysisRuleSet>
15+
<CodeAnalysisRuleSet></CodeAnalysisRuleSet>
1816
<DocumentationFile>dcx\BomSweeper.Test.xml</DocumentationFile>
1917
<NoWarn>1701;1702;1591</NoWarn>
2018
</PropertyGroup>
@@ -28,14 +26,14 @@
2826
</ItemGroup>
2927

3028
<ItemGroup>
31-
<PackageReference Include="coverlet.msbuild" Version="2.6.1" PrivateAssets="all" />
32-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.0" />
33-
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
34-
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
35-
<PackageReference Include="ReportGenerator" Version="4.1.5" />
36-
<PackageReference Include="StyleChecker" Version="1.0.24" PrivateAssets="all" />
29+
<PackageReference Include="coverlet.msbuild" Version="2.9.0" PrivateAssets="all" />
30+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
31+
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
32+
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
33+
<PackageReference Include="ReportGenerator" Version="4.6.0" />
34+
<PackageReference Include="StyleChecker" Version="1.0.25" PrivateAssets="all" />
3735
<PackageReference Include="StyleChecker.Annotations" Version="1.0.1" />
38-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
36+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.164" PrivateAssets="all" />
3937
</ItemGroup>
4038

4139
<ItemGroup>

BomSweeper.Test/BomSweeper.Test.ruleset

Lines changed: 0 additions & 77 deletions
This file was deleted.

BomSweeper.Test/PathFinder/BasicTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void GetFilesWithThreeOrMoreMaxDepth()
5555
{
5656
Toolkit.TheInstance = new TestToolkit();
5757

58-
void Perform(int depth)
58+
static void Perform(int depth)
5959
{
6060
var actual = PathFinder.GetFiles(".", depth);
6161
var array = actual.ToArray();

BomSweeper.sln

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BomSweeper.Test", "BomSweep
88
EndProject
99
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BomSweeper.GlobalTool", "BomSweeper.GlobalTool\BomSweeper.GlobalTool.csproj", "{3661017B-C54A-4DBD-BB74-6B35FFB97458}"
1010
EndProject
11+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CD67C713-47A8-4C1A-86C9-92BC012E80EC}"
12+
EndProject
1113
Global
1214
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1315
Debug|Any CPU = Debug|Any CPU

BomSweeper/.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[*.cs]
2+
3+
# SA1101: Prefix local calls with this
4+
dotnet_diagnostic.SA1101.severity = none
5+
6+
# SA1122: Use string.Empty for empty strings
7+
dotnet_diagnostic.SA1122.severity = none
8+
9+
# SA1302: Interface names should begin with I
10+
dotnet_diagnostic.SA1302.severity = none
11+
12+
# SA1513: Closing brace should be followed by blank line
13+
dotnet_diagnostic.SA1513.severity = none
14+
15+
# SA1633: File should have header
16+
dotnet_diagnostic.SA1633.severity = none
17+
18+
# IsNull: Do not use 'is' pattern matching with 'null'.
19+
dotnet_diagnostic.IsNull.severity = none

BomSweeper/BomSweeper.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.2</TargetFramework>
5+
<TargetFramework>netcoreapp3.1</TargetFramework>
66
<LangVersion>8.0</LangVersion>
77
<NullableContextOptions>enable</NullableContextOptions>
88
</PropertyGroup>
99

1010
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
11-
<CodeAnalysisRuleSet>BomSweeper.ruleset</CodeAnalysisRuleSet>
11+
<CodeAnalysisRuleSet></CodeAnalysisRuleSet>
1212
</PropertyGroup>
1313

1414
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
15-
<CodeAnalysisRuleSet>BomSweeper.ruleset</CodeAnalysisRuleSet>
15+
<CodeAnalysisRuleSet></CodeAnalysisRuleSet>
1616
<DocumentationFile>dcx\BomSweeper.xml</DocumentationFile>
1717
</PropertyGroup>
1818

@@ -26,9 +26,9 @@
2626

2727
<ItemGroup>
2828
<PackageReference Include="Maroontress.CuiMallet" Version="1.0.0" />
29-
<PackageReference Include="StyleChecker" Version="1.0.24" PrivateAssets="all" />
29+
<PackageReference Include="StyleChecker" Version="1.0.25" PrivateAssets="all" />
3030
<PackageReference Include="StyleChecker.Annotations" Version="1.0.1" />
31-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
31+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.164" PrivateAssets="all" />
3232
</ItemGroup>
3333

3434
</Project>

BomSweeper/BomSweeper.ruleset

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)