build(all): configure Go and Roslyn checks, exclude generated game sources and simplify contribution rules

This commit is contained in:
2026-10-06 21:26:46 +08:00
parent b9f1ac4aa6
commit e8e9d77974
6 changed files with 65 additions and 1 deletions
+9
View File
@@ -0,0 +1,9 @@
root = true
[.build/game-sdk/**/*.cs]
generated_code = true
dotnet_analyzer_diagnostic.severity = none
[data/dev/client-source-readable/**/*.cs]
generated_code = true
dotnet_analyzer_diagnostic.severity = none
+2
View File
@@ -12,6 +12,8 @@
*.cs text eol=lf
*.csproj text eol=lf
*.ps1 text eol=crlf
*.cmd text eol=crlf
bd2w text eol=lf
*.dll binary
*.exe binary
+16
View File
@@ -0,0 +1,16 @@
version: "2"
run:
timeout: 5m
tests: true
linters:
default: none
enable:
- errcheck
- govet
- ineffassign
- staticcheck
- unused
- rowserrcheck
- modernize
+3 -1
View File
@@ -10,4 +10,6 @@ Commit messages must follow this format:
- `client` — for client-side changes
- `plugin` — for plugin-related changes
- `all` — when changes involve multiple parts (`server`, `client`, and/or `plugin`)
- `<description>` must be **concise but complete**, clearly covering **all changes made in the commit**. Do not omit important changes for the sake of brevity.
- `<description>` must be **concise but complete**, clearly covering **all changes made in the commit**. Do not omit important changes for the sake of brevity.
Before pushing, run the code checks for each language you modified.
+32
View File
@@ -0,0 +1,32 @@
root = true
[*.cs]
generated_code = false
dotnet_diagnostic.CA2000.severity = warning
dotnet_code_quality.CA2000.interprocedural_analysis_kind = none
dotnet_diagnostic.CA2016.severity = warning
dotnet_diagnostic.CA2200.severity = warning
dotnet_diagnostic.IDE0005.severity = suggestion
dotnet_diagnostic.IDE0059.severity = warning
dotnet_diagnostic.IDE0055.severity = suggestion
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = false:suggestion
csharp_style_namespace_declarations = file_scoped:suggestion
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
[**/obj/**/*.cs]
generated_code = true
[*.g.cs]
generated_code = true
[*.generated.cs]
generated_code = true
+3
View File
@@ -3,6 +3,9 @@
<PropertyGroup>
<BD2PluginsDir>$(MSBuildThisFileDirectory)</BD2PluginsDir>
<BD2RepositoryDir>$([System.IO.Path]::GetFullPath('$(BD2PluginsDir)..'))/</BD2RepositoryDir>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>8.0-recommended</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<Import Project="$(BD2PluginsDir)Directory.Build.local.props" Condition="Exists('$(BD2PluginsDir)Directory.Build.local.props')" />
<PropertyGroup>