Files
daluandou/.codely.packages/cn.tuanjie.codely.bridge@1.0.85-47f31100/Editor/Bridge/Tools/ScriptFix/FixMissingSquareBracket.cs
T
huadexuan 13d0c80335 ```
chore(bridge): 删除桥接包的提交记录和Git属性配置

删除了 .codely-bridge-commit 文件中存储的提交哈希值
移除了 .gitattributes 文件中的行结束符配置规则
```
2026-09-24 21:41:14 +08:00

20 lines
666 B
C#

using Codely.Microsoft.CodeAnalysis;
using Codely.Microsoft.CodeAnalysis.CSharp;
using SyntaxTree = Codely.Microsoft.CodeAnalysis.SyntaxTree;
namespace UnityTcp.Editor.Tools
{
internal class FixMissingSquareBracket : ScriptFixProvider
{
public override bool CanFix(Diagnostic diagnostic) => diagnostic.Id == "CS1003";
public override bool ApplyFix(ref SyntaxTree tree, Diagnostic diagnostic, ScriptFixContext context)
{
var updated = tree.InsertTextAtLocation(diagnostic.Location, "]");
if (ReferenceEquals(updated, tree)) return false;
tree = updated;
return true;
}
}
}