build(all): configure Go and Roslyn checks, exclude generated game sources and simplify contribution rules
This commit is contained in:
@@ -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
|
||||||
@@ -12,6 +12,8 @@
|
|||||||
*.cs text eol=lf
|
*.cs text eol=lf
|
||||||
*.csproj text eol=lf
|
*.csproj text eol=lf
|
||||||
*.ps1 text eol=crlf
|
*.ps1 text eol=crlf
|
||||||
|
*.cmd text eol=crlf
|
||||||
|
bd2w text eol=lf
|
||||||
|
|
||||||
*.dll binary
|
*.dll binary
|
||||||
*.exe binary
|
*.exe binary
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
|
run:
|
||||||
|
timeout: 5m
|
||||||
|
tests: true
|
||||||
|
|
||||||
|
linters:
|
||||||
|
default: none
|
||||||
|
enable:
|
||||||
|
- errcheck
|
||||||
|
- govet
|
||||||
|
- ineffassign
|
||||||
|
- staticcheck
|
||||||
|
- unused
|
||||||
|
- rowserrcheck
|
||||||
|
- modernize
|
||||||
+3
-1
@@ -10,4 +10,6 @@ Commit messages must follow this format:
|
|||||||
- `client` — for client-side changes
|
- `client` — for client-side changes
|
||||||
- `plugin` — for plugin-related changes
|
- `plugin` — for plugin-related changes
|
||||||
- `all` — when changes involve multiple parts (`server`, `client`, and/or `plugin`)
|
- `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.
|
||||||
|
|||||||
@@ -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,6 +3,9 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<BD2PluginsDir>$(MSBuildThisFileDirectory)</BD2PluginsDir>
|
<BD2PluginsDir>$(MSBuildThisFileDirectory)</BD2PluginsDir>
|
||||||
<BD2RepositoryDir>$([System.IO.Path]::GetFullPath('$(BD2PluginsDir)..'))/</BD2RepositoryDir>
|
<BD2RepositoryDir>$([System.IO.Path]::GetFullPath('$(BD2PluginsDir)..'))/</BD2RepositoryDir>
|
||||||
|
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||||
|
<AnalysisLevel>8.0-recommended</AnalysisLevel>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(BD2PluginsDir)Directory.Build.local.props" Condition="Exists('$(BD2PluginsDir)Directory.Build.local.props')" />
|
<Import Project="$(BD2PluginsDir)Directory.Build.local.props" Condition="Exists('$(BD2PluginsDir)Directory.Build.local.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user