build: 配置项目代码分析抑制与开发环境
1. 添加全局代码抑制文件,修复Unity消息方法的静态分析误报 2. 新增Directory.Build.props配置,禁用构建时代码风格强制检查 3. 更新packages配置,添加Antigravity IDE包并升级Visual Scripting版本 4. 优化VSCode调试配置与开发环境设置 5. 添加EditorConfig统一代码格式规则
This commit is contained in:
parent
f0a6f0f764
commit
89a05951f4
35
.editorconfig
Normal file
35
.editorconfig
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Antigravity IDE — Unity Analyzer Configuration
|
||||||
|
# Auto-generated. Safe to customize.
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*.cs]
|
||||||
|
|
||||||
|
# Formatting
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
# Unity-specific diagnostic suppressions
|
||||||
|
# IDE0051: Remove unused private members — false positive for Unity messages
|
||||||
|
dotnet_diagnostic.IDE0051.severity = none
|
||||||
|
|
||||||
|
# IDE0044: Add readonly modifier — false positive for serialized fields
|
||||||
|
dotnet_diagnostic.IDE0044.severity = none
|
||||||
|
|
||||||
|
# CS0649: Field is never assigned — false positive for [SerializeField]
|
||||||
|
dotnet_diagnostic.CS0649.severity = none
|
||||||
|
|
||||||
|
[*.shader]
|
||||||
|
indent_style = tab
|
||||||
|
|
||||||
|
[*.uss]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.uxml]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
15
.vscode/launch.json
vendored
15
.vscode/launch.json
vendored
@ -2,9 +2,18 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Attach to Unity",
|
"name": "Attach to Unity Editor",
|
||||||
"type": "vstuc",
|
"type": "unity",
|
||||||
"request": "attach"
|
"request": "attach",
|
||||||
|
"path": "${workspaceFolder}/Library/EditorInstance.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Attach to Unity Player",
|
||||||
|
"type": "unity",
|
||||||
|
"request": "attach",
|
||||||
|
"transportArgs": {
|
||||||
|
"port": 56000
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
13
.vscode/settings.json
vendored
13
.vscode/settings.json
vendored
@ -1,4 +1,14 @@
|
|||||||
{
|
{
|
||||||
|
"dotnet.defaultSolution": "Kill.sln",
|
||||||
|
"dotnet.dotnetPath": "C:/Program Files/dotnet/dotnet.exe",
|
||||||
|
"dotrush.roslyn.dotnetSdkDirectory": "C:/Program Files/dotnet/sdk/8.0.113",
|
||||||
|
"dotrush.msbuildProperties": {
|
||||||
|
"DefineConstants": "UNITY_EDITOR"
|
||||||
|
},
|
||||||
|
"dotrush.roslyn.projectOrSolutionFiles": [
|
||||||
|
"D:/unity_project/Kill/Kill.sln"
|
||||||
|
],
|
||||||
|
"dotrush.roslyn.restoreProjectsBeforeLoading": false,
|
||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
"**/.DS_Store": true,
|
"**/.DS_Store": true,
|
||||||
"**/.git": true,
|
"**/.git": true,
|
||||||
@ -50,6 +60,5 @@
|
|||||||
"ProjectSettings/": true,
|
"ProjectSettings/": true,
|
||||||
"temp/": true,
|
"temp/": true,
|
||||||
"Temp/": true
|
"Temp/": true
|
||||||
},
|
}
|
||||||
"dotnet.defaultSolution": "Kill.sln"
|
|
||||||
}
|
}
|
||||||
11
Assets/GlobalSuppressions.cs
Normal file
11
Assets/GlobalSuppressions.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// <auto-generated>
|
||||||
|
// Antigravity IDE — Unity analyzer suppressions
|
||||||
|
// This file suppresses false-positive diagnostics for Unity API messages.
|
||||||
|
// Safe to delete if not using Roslyn analyzers.
|
||||||
|
// </auto-generated>
|
||||||
|
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
// Suppress warnings for Unity message methods that appear unused to static analysis
|
||||||
|
[assembly: SuppressMessage("CodeQuality", "IDE0051:Remove unused private members",
|
||||||
|
Justification = "Unity message methods are called by the engine via reflection")]
|
||||||
11
Assets/GlobalSuppressions.cs.meta
Normal file
11
Assets/GlobalSuppressions.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b967e518f5ade0943abbc49708eeadc9
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Directory.Build.props
Normal file
8
Directory.Build.props
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
|
||||||
|
<!-- Suppress Unity-specific false positives -->
|
||||||
|
<!-- IDE0051: Remove unused private members (Unity messages like Start, Update) -->
|
||||||
|
<!-- IDE0044: Add readonly modifier (serialized fields) -->
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@ -8,7 +8,7 @@
|
|||||||
"com.unity.test-framework": "1.1.33",
|
"com.unity.test-framework": "1.1.33",
|
||||||
"com.unity.timeline": "1.7.7",
|
"com.unity.timeline": "1.7.7",
|
||||||
"com.unity.ugui": "1.0.0",
|
"com.unity.ugui": "1.0.0",
|
||||||
"com.unity.visualscripting": "1.9.4",
|
"com.unity.visualscripting": "1.9.11",
|
||||||
"com.unity.modules.ai": "1.0.0",
|
"com.unity.modules.ai": "1.0.0",
|
||||||
"com.unity.modules.androidjni": "1.0.0",
|
"com.unity.modules.androidjni": "1.0.0",
|
||||||
"com.unity.modules.animation": "1.0.0",
|
"com.unity.modules.animation": "1.0.0",
|
||||||
@ -39,6 +39,7 @@
|
|||||||
"com.unity.modules.video": "1.0.0",
|
"com.unity.modules.video": "1.0.0",
|
||||||
"com.unity.modules.vr": "1.0.0",
|
"com.unity.modules.vr": "1.0.0",
|
||||||
"com.unity.modules.wind": "1.0.0",
|
"com.unity.modules.wind": "1.0.0",
|
||||||
"com.unity.modules.xr": "1.0.0"
|
"com.unity.modules.xr": "1.0.0",
|
||||||
|
"com.antigravity.ide": "https://github.com/billythekidz/UnityAntigravityIDE.git"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,12 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"com.antigravity.ide": {
|
||||||
|
"version": "https://github.com/billythekidz/UnityAntigravityIDE.git",
|
||||||
|
"depth": 0,
|
||||||
|
"source": "git",
|
||||||
|
"dependencies": {},
|
||||||
|
"hash": "3520075082911bf236ade261e544078a3f9bed65"
|
||||||
|
},
|
||||||
"com.unity.2d.sprite": {
|
"com.unity.2d.sprite": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
@ -76,7 +83,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"com.unity.visualscripting": {
|
"com.unity.visualscripting": {
|
||||||
"version": "1.9.4",
|
"version": "1.9.11",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user