diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..cc94ac0 --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/.gitattributes b/.gitattributes index f03a561..959f7df 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..b202a2a --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,16 @@ +version: "2" + +run: + timeout: 5m + tests: true + +linters: + default: none + enable: + - errcheck + - govet + - ineffassign + - staticcheck + - unused + - rowserrcheck + - modernize diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c49d3c3..219825d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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`) -- `` must be **concise but complete**, clearly covering **all changes made in the commit**. Do not omit important changes for the sake of brevity. \ No newline at end of file +- `` 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. diff --git a/plugins/.editorconfig b/plugins/.editorconfig new file mode 100644 index 0000000..0cda99a --- /dev/null +++ b/plugins/.editorconfig @@ -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 diff --git a/plugins/Directory.Build.props b/plugins/Directory.Build.props index 205933d..83ff503 100644 --- a/plugins/Directory.Build.props +++ b/plugins/Directory.Build.props @@ -3,6 +3,9 @@ $(MSBuildThisFileDirectory) $([System.IO.Path]::GetFullPath('$(BD2PluginsDir)..'))/ + true + 8.0-recommended + true