Skip to content

Commit 128c223

Browse files
committed
[ci skip] feat!: Better Analyzer
This will still fail rn
1 parent b33cb22 commit 128c223

File tree

63 files changed

+7404
-7067
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+7404
-7067
lines changed

DisCatSharp.ApplicationCommands/DisCatSharp.ApplicationCommands.csproj

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,30 @@
2323

2424
Documentation: https://docs.dcs.aitsys.dev/articles/modules/application_commands/intro.html
2525
</Description>
26-
<PackageTags>DisCatSharp,Discord API Wrapper,Discord,Bots,Discord Bots,AITSYS,Net8,Net9,Application Commands,Context Menu Commands</PackageTags>
27-
26+
<PackageTags>DisCatSharp,Discord API Wrapper,Discord,Bots,Discord Bots,AITSYS,Net8,Net9,Net10,Application Commands,Context Menu Commands</PackageTags>
2827
</PropertyGroup>
2928

30-
<ItemGroup>
29+
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
3130
<PackageReference Include="Backport.System.Threading.Lock" Version="3.1.4" />
32-
<PackageReference Include="DisCatSharp.Analyzer.Roselyn" Version="6.2.5">
31+
</ItemGroup>
32+
33+
<ItemGroup>
34+
<PackageReference Include="DisCatSharp.Analyzer" Version="1.0.0">
3335
<PrivateAssets>all</PrivateAssets>
3436
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3537
</PackageReference>
36-
<PackageReference Include="DisCatSharp.Attributes" Version="10.6.6" />
3738
<PackageReference Include="Microsoft.DependencyValidation.Analyzers" Version="0.11.0" />
3839
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.3" />
3940
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.3" />
40-
<PackageReference Include="System.Memory" Version="4.6.1" />
41+
<PackageReference Include="System.Memory" Version="4.6.2" />
4142
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.3" />
4243
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="9.0.3" />
44+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
4345
</ItemGroup>
4446

4547
<ItemGroup>
4648
<ProjectReference Include="..\DisCatSharp\DisCatSharp.csproj" />
4749
<ProjectReference Include="..\DisCatSharp.Common\DisCatSharp.Common.csproj" />
48-
</ItemGroup>
49-
50-
<ItemGroup>
51-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
50+
<PackageReference Include="DisCatSharp.Attributes" Version="2025.3.27" />
5251
</ItemGroup>
5352
</Project>
Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
using System;
22

3-
namespace DisCatSharp.Attributes;
4-
5-
/// <summary>
6-
/// Marks something as deprecated by DisCatSharp.
7-
/// </summary>
8-
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
9-
public sealed class DeprecatedAttribute : Attribute
3+
namespace DisCatSharp.Attributes
104
{
115
/// <summary>
12-
/// The additional information message.
6+
/// Marks something as deprecated by DisCatSharp.
137
/// </summary>
14-
public string Message { get; set; }
15-
16-
public DeprecatedAttribute(string message)
8+
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
9+
public sealed class DeprecatedAttribute : Attribute
1710
{
18-
this.Message = message;
19-
}
11+
public DeprecatedAttribute(string message)
12+
{
13+
this.Message = message;
14+
}
2015

21-
public DeprecatedAttribute()
22-
{ }
16+
public DeprecatedAttribute()
17+
{ }
18+
19+
/// <summary>
20+
/// The additional information message.
21+
/// </summary>
22+
public string Message { get; set; }
23+
}
2324
}
Lines changed: 107 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,119 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
3-
<Project Sdk="Microsoft.NET.Sdk">
4-
5-
<Import Project="../DisCatSharp.Targets/DisCatSharp.targets" />
6-
<Import Project="../DisCatSharp.Targets/Package.targets" />
7-
<Import Project="../DisCatSharp.Targets/NuGet.targets" />
8-
<Import Project="../DisCatSharp.Targets/Version.targets" />
1+
<Project Sdk="Microsoft.NET.Sdk">
92

103
<PropertyGroup>
11-
<TargetFramework>netstandard2.1</TargetFramework>
4+
<VersionPrefix>2025.03.27</VersionPrefix>
5+
</PropertyGroup>
6+
<PropertyGroup Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' != ''">
7+
<Version>$(VersionPrefix)-$(VersionSuffix)-$(BuildNumber)</Version>
8+
<AssemblyVersion>$(VersionPrefix).$(BuildNumber)</AssemblyVersion>
9+
<FileVersion>$(VersionPrefix).$(BuildNumber)</FileVersion>
10+
<PackageVersion>$(VersionPrefix).$(BuildNumber)</PackageVersion>
11+
</PropertyGroup>
12+
<PropertyGroup Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' == ''">
13+
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
14+
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
15+
<FileVersion>$(VersionPrefix).0</FileVersion>
16+
<PackageVersion>$(VersionPrefix).0</PackageVersion>
17+
</PropertyGroup>
18+
<PropertyGroup Condition="'$(VersionSuffix)' == ''">
19+
<Version>$(VersionPrefix)</Version>
20+
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
21+
<FileVersion>$(VersionPrefix).0</FileVersion>
22+
<PackageVersion>$(VersionPrefix).0</PackageVersion>
23+
</PropertyGroup>
24+
<PropertyGroup>
25+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
1226
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
1327
<OutputType>Library</OutputType>
1428
</PropertyGroup>
29+
30+
<PropertyGroup>
31+
<IncludeSymbols>true</IncludeSymbols>
32+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
33+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
34+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
35+
<DebugType>Portable</DebugType>
36+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
37+
<PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../RELEASENOTES.md"))</PackageReleaseNotes>
38+
</PropertyGroup>
39+
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
40+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
41+
<DefineConstants>$(DefineConstants);CI_BUILD</DefineConstants>
42+
<Deterministic>true</Deterministic>
43+
</PropertyGroup>
44+
<PropertyGroup Condition="'$(CI)' == 'True'">
45+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
46+
<DefineConstants>$(DefineConstants);CI_BUILD</DefineConstants>
47+
<Deterministic>true</Deterministic>
48+
</PropertyGroup>
49+
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
50+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
51+
<DefineConstants>$(DefineConstants);CI_BUILD</DefineConstants>
52+
<Deterministic>true</Deterministic>
53+
</PropertyGroup>
54+
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' != 'true' And '$(TF_BUILD)' != 'true' And '$(CI)' != 'True'">
55+
<ContinuousIntegrationBuild>false</ContinuousIntegrationBuild>
56+
</PropertyGroup>
57+
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true' And '$(SENTRY_AUTH_TOKEN)' != ''">
58+
<SentryOrg>aitsys</SentryOrg>
59+
<SentryProject>discatsharp</SentryProject>
60+
<SentryUploadSymbols>true</SentryUploadSymbols>
61+
<SentryUploadSources>true</SentryUploadSources>
62+
<UseSentryCLI>true</UseSentryCLI>
63+
<SentryCreateRelease>true</SentryCreateRelease>
64+
<SentrySetCommits>true</SentrySetCommits>
65+
</PropertyGroup>
66+
67+
<PropertyGroup>
68+
<Authors>AITSYS, DisCatSharp, DisCatSharp Contributors</Authors>
69+
<Company>AITSYS</Company>
70+
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
71+
<PackageProjectUrl>https://docs.dcs.aitsys.dev</PackageProjectUrl>
72+
<RepositoryUrl>https://github.com/Aiko-IT-Systems/DisCatSharp</RepositoryUrl>
73+
<RepositoryType>Git</RepositoryType>
74+
<PackageIcon>logo-pride.png</PackageIcon>
75+
<PackageLicenseExpression />
76+
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
77+
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
78+
<RunAnalyzersDuringBuild>False</RunAnalyzersDuringBuild>
79+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
80+
</PropertyGroup>
81+
82+
<ItemGroup>
83+
<None Include="..\LICENSE.md">
84+
<Pack>True</Pack>
85+
<PackagePath></PackagePath>
86+
</None>
87+
<None Include="..\RELEASENOTES.md">
88+
<Pack>True</Pack>
89+
<PackagePath></PackagePath>
90+
</None>
91+
</ItemGroup>
92+
<ItemGroup>
93+
<None Include="..\DisCatSharp.Logos\logo-pride.png">
94+
<Pack>True</Pack>
95+
<PackagePath></PackagePath>
96+
</None>
97+
</ItemGroup>
1598

1699
<PropertyGroup>
17100
<AssemblyName>DisCatSharp.Attributes</AssemblyName>
18101
<RootNamespace>DisCatSharp.Attributes</RootNamespace>
102+
<Title>DisCatSharp Attributes</Title>
103+
</PropertyGroup>
104+
105+
<PropertyGroup>
106+
<NoWarn>1591;NU5128;DV2001;NETSDK1188;CS8600;CS8625;CS8601;CS8604;CS0219;CS8618;CS8619;CS8597;CS8603;CS8602;CS8765;CS8632;CS8633;CS8714;CS8629;CS8767;CS8620</NoWarn>
107+
<NuGetAuditSuppress>true</NuGetAuditSuppress>
108+
<NuGetAudit>false</NuGetAudit>
109+
</PropertyGroup>
110+
111+
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
112+
<Optimize>False</Optimize>
113+
</PropertyGroup>
114+
115+
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
116+
<Optimize>True</Optimize>
19117
</PropertyGroup>
20118

21119
<PropertyGroup>
@@ -28,8 +126,4 @@
28126
<PackageTags>DisCatSharp,DisCatSharp Attributes</PackageTags>
29127
</PropertyGroup>
30128

31-
<ItemGroup>
32-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
33-
</ItemGroup>
34-
35129
</Project>
Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
using System;
22

3-
namespace DisCatSharp.Attributes;
4-
5-
/// <summary>
6-
/// Marks something as deprecated by discord.
7-
/// </summary>
8-
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
9-
public sealed class DiscordDeprecatedAttribute : Attribute
3+
namespace DisCatSharp.Attributes
104
{
115
/// <summary>
12-
/// The additional information message.
6+
/// Marks something as deprecated by discord.
137
/// </summary>
14-
public string Message { get; set; }
15-
16-
public DiscordDeprecatedAttribute(string message)
8+
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
9+
public sealed class DiscordDeprecatedAttribute : Attribute
1710
{
18-
this.Message = message;
19-
}
11+
public DiscordDeprecatedAttribute(string message)
12+
{
13+
this.Message = message;
14+
}
2015

21-
public DiscordDeprecatedAttribute()
22-
{ }
16+
public DiscordDeprecatedAttribute()
17+
{ }
18+
19+
/// <summary>
20+
/// The additional information message.
21+
/// </summary>
22+
public string Message { get; set; }
23+
}
2324
}
Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
using System;
22

3-
namespace DisCatSharp.Attributes;
4-
5-
/// <summary>
6-
/// Marks something as in experiment by discord.
7-
/// </summary>
8-
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
9-
public sealed class DiscordInExperimentAttribute : Attribute
3+
namespace DisCatSharp.Attributes
104
{
115
/// <summary>
12-
/// The additional information message.
6+
/// Marks something as in experiment by discord.
137
/// </summary>
14-
public string Message { get; set; }
15-
16-
public DiscordInExperimentAttribute(string message)
8+
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
9+
public sealed class DiscordInExperimentAttribute : Attribute
1710
{
18-
this.Message = message;
19-
}
11+
public DiscordInExperimentAttribute(string message)
12+
{
13+
this.Message = message;
14+
}
2015

21-
public DiscordInExperimentAttribute()
22-
{ }
16+
public DiscordInExperimentAttribute()
17+
{ }
18+
19+
/// <summary>
20+
/// The additional information message.
21+
/// </summary>
22+
public string Message { get; set; }
23+
}
2324
}
Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
using System;
22

3-
namespace DisCatSharp.Attributes;
4-
5-
/// <summary>
6-
/// Marks something as unreleased by discord.
7-
/// </summary>
8-
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
9-
public sealed class DiscordUnreleasedAttribute : Attribute
3+
namespace DisCatSharp.Attributes
104
{
115
/// <summary>
12-
/// The additional information message.
6+
/// Marks something as unreleased by discord.
137
/// </summary>
14-
public string Message { get; set; }
15-
16-
public DiscordUnreleasedAttribute(string message)
8+
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
9+
public sealed class DiscordUnreleasedAttribute : Attribute
1710
{
18-
this.Message = message;
19-
}
11+
public DiscordUnreleasedAttribute(string message)
12+
{
13+
this.Message = message;
14+
}
2015

21-
public DiscordUnreleasedAttribute()
22-
{ }
16+
public DiscordUnreleasedAttribute()
17+
{ }
18+
19+
/// <summary>
20+
/// The additional information message.
21+
/// </summary>
22+
public string Message { get; set; }
23+
}
2324
}
Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
using System;
22

3-
namespace DisCatSharp.Attributes;
4-
5-
/// <summary>
6-
/// Marks something as experimental by DisCatSharp.
7-
/// </summary>
8-
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
9-
public sealed class ExperimentalAttribute : Attribute
3+
namespace DisCatSharp.Attributes
104
{
115
/// <summary>
12-
/// The additional information message.
6+
/// Marks something as experimental by DisCatSharp.
137
/// </summary>
14-
public string Message { get; set; }
15-
16-
public ExperimentalAttribute(string message)
8+
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
9+
public sealed class ExperimentalAttribute : Attribute
1710
{
18-
this.Message = message;
19-
}
11+
public ExperimentalAttribute(string message)
12+
{
13+
this.Message = message;
14+
}
2015

21-
public ExperimentalAttribute()
22-
{ }
16+
public ExperimentalAttribute()
17+
{ }
18+
19+
/// <summary>
20+
/// The additional information message.
21+
/// </summary>
22+
public string Message { get; set; }
23+
}
2324
}

0 commit comments

Comments
 (0)