You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Cleanup C# projects, code quality & style
New rules: - Do not silence CA1805 any more - Limit where we silence CA1707, CA1711, CA1720 - Enforce severity=warning for IDE0040 - Enforce Allman style braces - Enforce naming conventions (IDE1006 is still severity=suggestion) Fixes: - Fix REFL045, CS1572, CS1573 - Suppress CS0618 when generating `InvokeGodotClassMethod` - Fix indent when generating GD_constants.cs - Temporarily silence CS1734 in generated code - Fix a lot of naming rule violations Misc.: - Remove ReSharper comments for RedundantNameQualifier - Remove suppression attributes for RedundantNameQualifier - Remove severity=warnings for CA1716, CA1304 (already included in the level of analysis we run)
This commit is contained in:
@@ -312,7 +312,7 @@ def generate_sdk_package_versions():
|
||||
)
|
||||
|
||||
# We write in ../SdkPackageVersions.props.
|
||||
with open(os.path.join(dirname(script_path), "SdkPackageVersions.props"), "w") as f:
|
||||
with open(os.path.join(dirname(script_path), "SdkPackageVersions.props"), "w", encoding="utf-8") as f:
|
||||
f.write(props)
|
||||
f.close()
|
||||
|
||||
@@ -320,6 +320,8 @@ def generate_sdk_package_versions():
|
||||
|
||||
constants = """namespace Godot.SourceGenerators
|
||||
{{
|
||||
// TODO: This is currently disabled because of https://github.com/dotnet/roslyn/issues/52904
|
||||
#pragma warning disable IDE0040 // Add accessibility modifiers.
|
||||
partial class Common
|
||||
{{
|
||||
public const string VersionDocsUrl = "https://docs.godotengine.org/en/{docs_branch}";
|
||||
@@ -338,7 +340,7 @@ def generate_sdk_package_versions():
|
||||
)
|
||||
os.makedirs(generators_dir, exist_ok=True)
|
||||
|
||||
with open(os.path.join(generators_dir, "Common.Constants.cs"), "w") as f:
|
||||
with open(os.path.join(generators_dir, "Common.Constants.cs"), "w", newline="\n", encoding="utf-8") as f:
|
||||
f.write(constants)
|
||||
f.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user