Skip to content

Commit f19f07a

Browse files
committed
fixing linting
1 parent 767bf6c commit f19f07a

19 files changed

Lines changed: 36 additions & 43 deletions

Explorer/Assets/DCL/Infrastructure/Global/Dynamic/DynamicWorldContainer.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ public class DynamicWorldContainer : DCLWorldContainer<DynamicWorldSettings>
8787

8888
public IGlobalRealmController RealmController { get; }
8989

90-
public IRealmNavigator RealmNavigator { get; }
91-
9290
public GlobalWorldFactory GlobalWorldFactory { get; }
9391

9492
public IReadOnlyList<IDCLGlobalPlugin> GlobalPlugins { get; }
@@ -132,7 +130,6 @@ private DynamicWorldContainer(
132130
{
133131
this.uiShellContainer = uiShellContainer;
134132
RealmController = realmController;
135-
RealmNavigator = realmNavigator;
136133
GlobalWorldFactory = globalWorldFactory;
137134
GlobalPlugins = globalPlugins;
138135
WorldPlugins = worldPlugins;

Explorer/Assets/DCL/McpServer/Components/McpMovementOverride.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace DCL.McpServer.Components
66
{
77
/// <summary>
88
/// Held movement input requested by the MCP walk tool. While present on the player entity,
9-
/// <see cref="McpInputOverrideSystem" /> re-asserts it into <see cref="MovementInputComponent" /> every frame.
9+
/// <see cref="DCL.McpServer.Systems.McpInputOverrideSystem" /> re-asserts it into <see cref="MovementInputComponent" /> every frame.
1010
/// </summary>
1111
public struct McpMovementOverride
1212
{

Explorer/Assets/DCL/McpServer/Components/McpPointerClickIntent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace DCL.McpServer.Components
77
{
88
/// <summary>
99
/// Present on the player entity while an agent-requested pointer click is in flight.
10-
/// <see cref="McpPointerClickSystem" /> validates the aim with a physics raycast each frame,
10+
/// <see cref="DCL.McpServer.Systems.McpPointerClickSystem" /> validates the aim with a physics raycast each frame,
1111
/// delivers the press through the target's <see cref="PBPointerEvents.AppendPointerEventResultsIntent" />
1212
/// and removes the component once the click completes or fails.
1313
/// </summary>

Explorer/Assets/DCL/McpServer/Core/McpJsonSchema.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace DCL.McpServer.Core
1111
public sealed class McpJsonSchema
1212
{
1313
private readonly JObject properties = new ();
14-
private readonly JArray required = new ();
14+
private readonly JArray requiredNames = new ();
1515

1616
private McpJsonSchema() { }
1717

@@ -72,8 +72,8 @@ public JObject Build()
7272
["properties"] = properties,
7373
};
7474

75-
if (required.Count > 0)
76-
schema["required"] = required;
75+
if (requiredNames.Count > 0)
76+
schema["required"] = requiredNames;
7777

7878
return schema;
7979
}
@@ -106,7 +106,7 @@ private McpJsonSchema AddField(string name, JObject field, bool isRequired)
106106
properties[name] = field;
107107

108108
if (isRequired)
109-
required.Add(name);
109+
requiredNames.Add(name);
110110

111111
return this;
112112
}

Explorer/Assets/DCL/McpServer/Core/McpToolsRegistry.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public McpToolsRegistry Build()
3232
{
3333
JObject inputSchema = tool.InputSchema;
3434

35-
if (inputSchema == null || !IsObjectSchema(inputSchema))
35+
if (!IsObjectSchema(inputSchema))
3636
throw new InvalidOperationException($"MCP tool '{tool.Name}' produced an invalid input schema: expected a JSON Schema object (\"type\": \"object\"). Build it with McpJsonSchema.");
3737

3838
if (tool.OutputSchema != null && !IsObjectSchema(tool.OutputSchema))

Explorer/Assets/DCL/McpServer/Tests/FakeMcpTool.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ internal sealed class FakeMcpTool : IMcpTool
2727

2828
public JObject? LastArguments { get; private set; }
2929

30-
public CancellationToken LastCancellationToken { get; private set; }
31-
3230
private FakeMcpTool(string name, string description, JObject inputSchema, McpToolAnnotations annotations,
3331
Func<JObject, CancellationToken, McpToolResult> execute)
3432
{
@@ -61,7 +59,6 @@ public UniTask<McpToolResult> ExecuteAsync(JObject arguments, CancellationToken
6159
{
6260
CallCount++;
6361
LastArguments = arguments;
64-
LastCancellationToken = ct;
6562
return UniTask.FromResult(execute(arguments, ct));
6663
}
6764
}

Explorer/Assets/DCL/McpServer/Tests/GetPlayerStateToolShould.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Arch.Core;
22
using DCL.Character.Components;
33
using DCL.CharacterCamera;
4-
using DCL.CharacterCamera.Components;
54
using DCL.McpServer.Core;
65
using DCL.McpServer.Tools;
76
using ECS.SceneLifeCycle.CurrentScene;
@@ -41,20 +40,20 @@ public void TearDown()
4140
[Test]
4241
public void DeclareAnObjectOutputSchema()
4342
{
44-
Assert.That(tool.OutputSchema!["type"]!.Value<string>(), Is.EqualTo("object"));
43+
Assert.That(tool.OutputSchema["type"]!.Value<string>(), Is.EqualTo("object"));
4544
}
4645

4746
[Test]
4847
public void ModelTheAddressAsANullableString()
4948
{
50-
var addressType = (JArray)tool.OutputSchema!["properties"]!["address"]!["type"]!;
49+
var addressType = (JArray)tool.OutputSchema["properties"]!["address"]!["type"]!;
5150
Assert.That(addressType.ToObject<string[]>(), Is.EqualTo(new[] { "string", "null" }));
5251
}
5352

5453
[Test]
5554
public void ModelTheCameraAsANestedObject()
5655
{
57-
JToken camera = tool.OutputSchema!["properties"]!["camera"]!;
56+
JToken camera = tool.OutputSchema["properties"]!["camera"]!;
5857

5958
Assert.That(camera["type"]!.Value<string>(), Is.EqualTo("object"));
6059
Assert.That(camera["properties"]!["mode"]!["type"]!.Value<string>(), Is.EqualTo("string"));
@@ -67,7 +66,7 @@ public void KeepTheOutputSchemaInSyncWithTheStructuredPayload()
6766
var structured = (JObject)Execute().Payload["structuredContent"]!;
6867

6968
// Assert
70-
McpSchemaAssert.KeysMatch(tool.OutputSchema!, structured);
69+
McpSchemaAssert.KeysMatch(tool.OutputSchema, structured);
7170
}
7271

7372
private McpToolResult Execute() =>

Explorer/Assets/DCL/McpServer/Tests/GetSceneStateToolShould.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void ReportAnAbsentSceneAsAJsonNull()
6464
public void DeclareAnObjectOutputSchemaThatAdmitsANullScene()
6565
{
6666
// Act
67-
JObject schema = tool.OutputSchema!;
67+
JObject schema = tool.OutputSchema;
6868

6969
// Assert
7070
Assert.That(schema["type"]!.Value<string>(), Is.EqualTo("object"));
@@ -96,7 +96,7 @@ public void KeepTheOutputSchemaInSyncWithTheStructuredPayload()
9696
var structured = (JObject)Execute().Payload["structuredContent"]!;
9797

9898
// Assert
99-
McpSchemaAssert.KeysMatch(tool.OutputSchema!, structured);
99+
McpSchemaAssert.KeysMatch(tool.OutputSchema, structured);
100100
}
101101

102102
private McpToolResult Execute() =>

Explorer/Assets/DCL/McpServer/Tests/ListSceneEntitiesToolShould.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void KeepTheOutputSchemaInSyncWithTheStructuredPayload()
8585
var structured = (JObject)Execute(limit: 200).Payload["structuredContent"]!;
8686

8787
// Assert
88-
McpSchemaAssert.KeysMatch(tool.OutputSchema!, structured);
88+
McpSchemaAssert.KeysMatch(tool.OutputSchema, structured);
8989
}
9090

9191
private McpToolResult Execute(int limit) =>

Explorer/Assets/DCL/McpServer/Tests/McpJsonRpcDispatcherShould.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ public void CallAKnownToolAndWrapItsResult()
7878
Assert.That(tool.LastArguments!["value"]!.Value<string>(), Is.EqualTo("hi"));
7979

8080
var content = (JArray)result["content"]!;
81-
Assert.That(content[0]!["type"]!.Value<string>(), Is.EqualTo("text"));
82-
Assert.That(content[0]!["text"]!.Value<string>(), Is.EqualTo("done"));
81+
Assert.That(content[0]["type"]!.Value<string>(), Is.EqualTo("text"));
82+
Assert.That(content[0]["text"]!.Value<string>(), Is.EqualTo("done"));
8383
Assert.That(result.ContainsKey("isError"), Is.False);
8484
}
8585

0 commit comments

Comments
 (0)