Skip to content

Commit 357e91e

Browse files
committed
Ran code updated on this project
1 parent a21b17d commit 357e91e

File tree

6 files changed

+51
-8
lines changed

6 files changed

+51
-8
lines changed

build/Build.csproj

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
7-
<LangVersion>preview</LangVersion>
7+
<LangVersion>latest</LangVersion>
88
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
9+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
10+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
911
</PropertyGroup>
1012
<ItemGroup>
1113
<PackageReference Include="Cake.Frosting" Version="4.0.0" />
14+
<PackageReference Include="NuGet.Packaging" Version="6.11.1" />
15+
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
1216
</ItemGroup>
17+
<PropertyGroup>
18+
<NuGetAudit>true</NuGetAudit>
19+
<NuGetAuditMode>all</NuGetAuditMode>
20+
<NuGetAuditLevel>low</NuGetAuditLevel>
21+
</PropertyGroup>
1322
</Project>

src/CodeUpdater/CodeUpdater/CodeUpdater.csproj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<LangVersion>latest</LangVersion>
1010
<RootNamespace>ProgrammerAL.Tools.CodeUpdater</RootNamespace>
1111
<AssemblyName>ProgrammerAL.Tools.CodeUpdater</AssemblyName>
12+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
13+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1214
</PropertyGroup>
1315
<PropertyGroup>
1416
<Version>0.1.0</Version>
@@ -27,7 +29,7 @@
2729

2830
<ItemGroup>
2931
<PackageReference Include="CommandLineParser" Version="2.9.1" />
30-
<PackageReference Include="ProgrammerAl.SourceGenerators.PublicInterfaceGenerator" Version="1.0.0.62" PrivateAssets="All" />
32+
<PackageReference Include="ProgrammerAl.SourceGenerators.PublicInterfaceGenerator" Version="1.0.0.62" PrivateAssets="all" />
3133
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
3234
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
3335
</ItemGroup>
@@ -36,4 +38,9 @@
3638
<!--Include the ReadMe in the nuget package-->
3739
<None Include="../../../README.md" Pack="true" PackagePath="/" />
3840
</ItemGroup>
41+
<PropertyGroup>
42+
<NuGetAudit>true</NuGetAudit>
43+
<NuGetAuditMode>all</NuGetAuditMode>
44+
<NuGetAuditLevel>low</NuGetAuditLevel>
45+
</PropertyGroup>
3946
</Project>

src/CodeUpdater/CodeUpdater/Options/UpdateOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class UpdateOptions
8080
public string? LogLevel { get; set; } = "verbose";
8181

8282
public record NugetAuditOptions(
83-
[property: Required] bool NuGetAudit,
83+
[property: Required] bool NuGetAudit,
8484
[property: Required] string AuditMode,
8585
[property: Required] string AuditLevel);
8686
}

src/CodeUpdater/CodeUpdater/Results.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
namespace ProgrammerAL.Tools.CodeUpdater;
99

1010
public record CSharpUpdateResult(
11-
string CsprojFile,
12-
NugetUpdateResults NugetUpdates,
13-
CsprojValueUpdateResultType LangVersionUpdate,
11+
string CsprojFile,
12+
NugetUpdateResults NugetUpdates,
13+
CsprojValueUpdateResultType LangVersionUpdate,
1414
CsprojValueUpdateResultType TargetFrameworkUpdate,
1515
DotnetFormatResult DotnetFormatUpdate);
1616

@@ -54,4 +54,4 @@ public enum DotnetFormatResultType
5454
DidNotRun,
5555
RanSuccessfully,
5656
Erroreded
57-
}
57+
}

utils/code-updater-config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"RootDirectory": "./",
3+
"IgnorePatterns": [],
4+
"NpmBuildCommand": "publish",
5+
"DotNetTargetFramework": "net8.0",
6+
"DotNetLangVersion": "latest",
7+
"EnableNetAnalyzers": true,
8+
"EnforceCodeStyleInBuild": true,
9+
"RunDotnetFormat": true,
10+
"NugetAudit": {
11+
"NuGetAudit": true,
12+
"AuditMode": "all",
13+
"AuditLevel": "low"
14+
}
15+
}

utils/run-code-updater.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
$configPath = "$PSScriptRoot/code-updater-config.json"
3+
$runLocation = "$PSScriptRoot/../"
4+
5+
$startPath = Get-Location
6+
7+
Set-Location $runLocation
8+
& "code-updater" --config "$configPath"
9+
10+
Read-Host "Press enter to exit..."
11+
12+
Set-Location $startPath

0 commit comments

Comments
 (0)